@fluid-topics/ft-search-selected-facets 1.2.60 → 1.2.61

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.
@@ -9,7 +9,7 @@
9
9
  .ft-search-selected-facets--container > * {
10
10
  min-width: 0;
11
11
  }
12
- `;var rl=h(A()),ol=h(j());var Ke=h(A());var Wo=h(A()),Ep={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{var o;let n=+((o=e.payload)!==null&&o!==void 0?o:20);t.request.paging.perPage=isNaN(n)?20:(0,Wo.minmax)(1,n,1e3)},setPageNumber:(t,e)=>{t.request.paging.page=isNaN(e.payload)?1:Math.max(1,e.payload)},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.metadataFilters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setOtherQueryParams:(t,e)=>{t.request.otherQueryParams=e.payload},setRequestClusterSortCriterion:(t,e)=>{var o;t.request.clusterSortCriterions=(o=e.payload)!==null&&o!==void 0?o:[]}},Ra=t=>Wo.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:"",paging:void 0,facets:void 0,spellcheck:void 0,locales:[],results:void 0,suggestResults:void 0},reducers:Ep});var Ap=h(La(),1);var Na;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Na||(Na={}));var Ia;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Ia||(Ia={}));var Ir;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.RESOURCE="RESOURCE"})(Ir||(Ir={}));var _a;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(_a||(_a={}));var Pa;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Pa||(Pa={}));var pr;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",t.GEN_AI__RATE="GEN_AI__RATE",t.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",t.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_CONTEXT_MENU="SEARCH_RESULT__OPEN_CONTEXT_MENU",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(pr||(pr={}));var ka;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(ka||(ka={}));var Da;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(Da||(Da={}));var $a;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})($a||($a={}));var Ba;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Ba||(Ba={}));var Fa;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Fa||(Fa={}));var Ma;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ma||(Ma={}));var Ua;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Ua||(Ua={}));var za;(function(t){t.ASC="ASC",t.DESC="DESC"})(za||(za={}));var Wa;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Wa||(Wa={}));var _r;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(_r||(_r={}));var Ha;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Ha||(Ha={}));var Va;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Va||(Va={}));var ja;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(ja||(ja={}));var jo;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(jo||(jo={}));var Ft;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Ft||(Ft={}));var Pr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Pr||(Pr={}));var ce;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ce||(ce={}));var Ga;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Ga||(Ga={}));var Ka;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Ka||(Ka={}));var Za;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Za||(Za={}));var wp={[ce.PERSONAL_BOOK_SHARE_USER]:[ce.PERSONAL_BOOK_USER],[ce.HTML_EXPORT_USER]:[ce.PERSONAL_BOOK_USER],[ce.PDF_EXPORT_USER]:[ce.PERSONAL_BOOK_USER],[ce.KHUB_ADMIN]:[ce.CONTENT_PUBLISHER],[ce.ADMIN]:[ce.KHUB_ADMIN,ce.USERS_ADMIN,ce.PORTAL_ADMIN],[ce.GENERATIVE_AI_EXPORT_USER]:[ce.GENERATIVE_AI_USER]};function qa(t,e){return t===e||(wp[t]??[]).some(o=>qa(o,e))}function Ya(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>qa(n,e))}var el=h(A());var es=h(k()),$e=h(j()),at=h(A());var Qa=h(k());var Xa=Qa.css`
12
+ `;var rl=h(A()),ol=h(j());var Ke=h(A());var Wo=h(A()),Ep={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{var o;let n=+((o=e.payload)!==null&&o!==void 0?o:20);t.request.paging.perPage=isNaN(n)?20:(0,Wo.minmax)(1,n,1e3)},setPageNumber:(t,e)=>{t.request.paging.page=isNaN(e.payload)?1:Math.max(1,e.payload)},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.metadataFilters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setOtherQueryParams:(t,e)=>{t.request.otherQueryParams=e.payload},setRequestClusterSortCriterion:(t,e)=>{var o;t.request.clusterSortCriterions=(o=e.payload)!==null&&o!==void 0?o:[]}},Ra=t=>Wo.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:"",paging:void 0,facets:void 0,spellcheck:void 0,locales:[],results:void 0,suggestResults:void 0},reducers:Ep});var Ap=h(La(),1);var Na;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Na||(Na={}));var Ia;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Ia||(Ia={}));var Ir;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.RESOURCE="RESOURCE"})(Ir||(Ir={}));var _a;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(_a||(_a={}));var Pa;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Pa||(Pa={}));var pr;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",t.GEN_AI__RATE="GEN_AI__RATE",t.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",t.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(pr||(pr={}));var ka;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(ka||(ka={}));var Da;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(Da||(Da={}));var $a;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})($a||($a={}));var Ba;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Ba||(Ba={}));var Fa;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Fa||(Fa={}));var Ma;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ma||(Ma={}));var Ua;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Ua||(Ua={}));var za;(function(t){t.ASC="ASC",t.DESC="DESC"})(za||(za={}));var Wa;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Wa||(Wa={}));var _r;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(_r||(_r={}));var Ha;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Ha||(Ha={}));var Va;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Va||(Va={}));var ja;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(ja||(ja={}));var jo;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(jo||(jo={}));var Ft;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Ft||(Ft={}));var Pr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Pr||(Pr={}));var ce;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ce||(ce={}));var Ga;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Ga||(Ga={}));var Ka;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Ka||(Ka={}));var Za;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Za||(Za={}));var wp={[ce.PERSONAL_BOOK_SHARE_USER]:[ce.PERSONAL_BOOK_USER],[ce.HTML_EXPORT_USER]:[ce.PERSONAL_BOOK_USER],[ce.PDF_EXPORT_USER]:[ce.PERSONAL_BOOK_USER],[ce.KHUB_ADMIN]:[ce.CONTENT_PUBLISHER],[ce.ADMIN]:[ce.KHUB_ADMIN,ce.USERS_ADMIN,ce.PORTAL_ADMIN],[ce.GENERATIVE_AI_EXPORT_USER]:[ce.GENERATIVE_AI_USER]};function qa(t,e){return t===e||(wp[t]??[]).some(o=>qa(o,e))}function Ya(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>qa(n,e))}var el=h(A());var es=h(k()),$e=h(j()),at=h(A());var Qa=h(k());var Xa=Qa.css`
13
13
  `;var Go=h(A()),Rp="ft-app-info",Xn=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},Tp={session:(t,e)=>{(0,Go.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>I.dispatchEvent(new Xn(e.payload)),0))}},I=Go.FtReduxStore.get({name:Rp,reducers:Tp,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],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}});var xt=h(A());var Jn=h(A());var ur=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=I.getState(),i=e??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let i=I.subscribe(()=>{n=t.get(e),n&&(i(),o(n))})}})}};var kr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ur.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ur.await()}};var bt=class extends kr{constructor(e=!0,o){var n;super(o);let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Jn.CacheRegistry,this.cache=e?i.commonCache:new Jn.CacheRegistry}clearCache(){this.cache.clearAll()}};var Ja,Lp=Symbol("clearAfterUnitTest"),Ko=class extends bt{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ja]=()=>{this.defaultMessages={},this.cache=new xt.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=I.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,xt.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new xt.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(o,...n)}async fetchContext(e){let o=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e))}catch(i){!(i instanceof xt.CanceledPromiseError)&&o&&console.error(i)}return o&&await this.notify(e),n}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,xt.delay)(0).then(()=>o()).catch(()=>null)))}};Ja=Lp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ko{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ko{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Dr=window.FluidTopicsI18nService,Zo=window.FluidTopicsCustomI18nService;var Ce=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},oe=class extends at.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>ur.get(),this.messageContexts=[],this.cache=new at.CacheRegistry,this.cleanSessionDebouncer=new at.Debouncer}render(){return es.html`
14
14
  <slot></slot>
15
15
  `}update(e){var o,n,i,a,s;super.update(e),e.has("baseUrl")&&(I.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&I.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&I.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&I.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&I.actions.noCustom(this.noCustom),e.has("editorMode")&&I.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&I.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&I.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>Dr.addContext(c)),e.has("openExternalDocumentInNewTab")&&I.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&I.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&I.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(I.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),I.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),I.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};oe.elementDefinitions={};oe.styles=Xa;Ce([(0,$e.property)()],oe.prototype,"baseUrl",void 0);Ce([(0,$e.property)()],oe.prototype,"apiIntegrationIdentifier",void 0);Ce([(0,$e.property)()],oe.prototype,"uiLocale",void 0);Ce([(0,at.jsonProperty)(null)],oe.prototype,"availableUiLocales",void 0);Ce([(0,at.jsonProperty)(null)],oe.prototype,"metadataConfiguration",void 0);Ce([(0,$e.property)({type:Boolean})],oe.prototype,"editorMode",void 0);Ce([(0,$e.property)({type:Boolean})],oe.prototype,"noCustom",void 0);Ce([(0,$e.property)({type:Boolean})],oe.prototype,"openExternalDocumentInNewTab",void 0);Ce([(0,$e.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],oe.prototype,"noCustomComponent",void 0);Ce([(0,$e.property)({type:Boolean})],oe.prototype,"withManualResources",void 0);Ce([(0,$e.property)({type:Boolean})],oe.prototype,"navigatorOnline",void 0);Ce([(0,$e.property)({type:Boolean})],oe.prototype,"forcedOffline",void 0);Ce([(0,$e.property)({type:Object})],oe.prototype,"apiProvider",void 0);Ce([(0,at.jsonProperty)([])],oe.prototype,"messageContexts",void 0);Ce([(0,at.jsonProperty)(void 0)],oe.prototype,"session",void 0);Ce([(0,$e.state)()],oe.prototype,"localesConfiguration",void 0);var Ei=h(j());function Np(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!qo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!qo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(i=a(t),o=i.length,o!==a(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!qo(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function qo(t,e){try{return Np(t,e)}catch{return!1}}function lo(t,e){return!qo(t,e)}var ts=h(j(),1);var ei=t=>{let e=t??{};return(o,n)=>{var i;let a={hasChanged:lo,attribute:!1,...e};(0,ts.property)(a)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:c=>c[n],store:e.store})}};var Yo=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var $r=h(j(),1);var rs=h(j(),1);function os(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,rs.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:lo,...e??{}})}var Qo=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var is=h(k(),1);var Xo=globalThis,Ip=Xo.ShadowRoot&&(Xo.ShadyCSS===void 0||Xo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,zf=Symbol();var ns=(t,e)=>{if(Ip)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),i=Xo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)}};var Jo=class extends is.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ns(n,e.elementStyles),n}};function as(t,e,...o){var n;let i=t.querySelector(e);for(let a of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var co=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},ds,ss=Symbol("constructorPrototype"),ls=Symbol("constructorName"),ps=Symbol("exportpartsDebouncer"),cs=Symbol("dynamicDependenciesLoaded"),At=class extends Jo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ds]=new Qo(5),this[ls]=this.constructor.name,this[ss]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ls]&&Object.setPrototypeOf(this,this[ss])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[cs]||(e[cs]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];o=as(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[ps].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,s,c;let p=b=>b!=null&&b.trim().length>0,u=e.filter(p).map(b=>b.trim());if(u.length===0){this.removeAttribute("exportparts");return}let g=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(a=(i=b.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],S=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...v,...S).filter(p).map(O=>O.trim()).forEach(O=>g.add(O))}if(g.size===0){this.removeAttribute("exportparts");return}let y=[...g.values()].flatMap(b=>u.map(v=>`${b}:${v}--${b}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};ds=ps;co([(0,$r.property)()],At.prototype,"exportpartsPrefix",void 0);co([os([])],At.prototype,"exportpartsPrefixes",void 0);co([(0,$r.property)()],At.prototype,"customStylesheet",void 0);co([(0,$r.property)()],At.prototype,"elementToFocus",void 0);co([(0,$r.state)()],At.prototype,"useAdoptedStyleSheets",void 0);function po(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var us,fs,hs,uo=Symbol("internalReduxEventsUnsubscribers"),Mt=Symbol("internalStoresUnsubscribers"),fr=Symbol("internalStores"),fo=class extends At{constructor(){super(...arguments),this[us]=new Map,this[fs]=new Map,this[hs]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[fr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[fr].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[fr].get(e)}addStore(e,o){var n;o=(n=o??(po(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[fr].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[fr].delete(o)}setupStores(){this.unsubscribeFromStores(),this[fr].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[Mt].has(e.store):this[Mt].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[Mt].set(e,o.subscribe(()=>this.updateFromStores())),this[uo].set(e,[]),po(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=c=>this[a](c);o.addEventListener(i.eventName,s),this[uo].get(e).push(()=>o.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Mt].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[Mt].has(e)&&this[Mt].get(e)(),this[Mt].delete(e),(o=this[uo].get(e))===null||o===void 0||o.forEach(n=>n()),this[uo].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};us=Mt,fs=fr,hs=uo;fo.reduxProperties=new Map;fo.reduxReactiveProperties=new Set;fo.reduxEventListeners=new Map;function et(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Rt(t){return!!t&&!!t[Q]}function st(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Mp}(t)||Array.isArray(t)||!!t[Ss]||!!(!((e=t.constructor)===null||e===void 0)&&e[Ss])||ci(t)||di(t))}function hr(t,e,o){o===void 0&&(o=!1),Mr(t)===0?(o?Object.keys:Fr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Mr(t){var e=t[Q];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ci(t)?2:di(t)?3:0}function Br(t,e){return Mr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function _p(t,e){return Mr(t)===2?t.get(e):t[e]}function Os(t,e,o){var n=Mr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Cs(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ci(t){return Bp&&t instanceof Map}function di(t){return Fp&&t instanceof Set}function Ut(t){return t.o||t.t}function pi(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=As(t);delete e[Q];for(var o=Fr(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ui(t,e){return e===void 0&&(e=!1),fi(t)||Rt(t)||!st(t)||(Mr(t)>1&&(t.set=t.add=t.clear=t.delete=Pp),Object.freeze(t),e&&hr(t,function(o,n){return ui(n,!0)},!0)),t}function Pp(){et(2)}function fi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function vt(t){var e=li[t];return e||et(18,t),e}function kp(t,e){li[t]||(li[t]=e)}function ii(){return yo}function ti(t,e){e&&(vt("Patches"),t.u=[],t.s=[],t.v=e)}function en(t){ai(t),t.p.forEach(Dp),t.p=null}function ai(t){t===yo&&(yo=t.l)}function ys(t){return yo={p:[],l:yo,h:t,m:!0,_:0}}function Dp(t){var e=t[Q];e.i===0||e.i===1?e.j():e.g=!0}function ri(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||vt("ES5").S(e,t,n),n?(o[Q].P&&(en(e),et(4)),st(t)&&(t=tn(e,t),e.l||rn(e,t)),e.u&&vt("Patches").M(o[Q].t,t,e.u,e.s)):t=tn(e,o,[]),en(e),e.u&&e.v(e.u,e.s),t!==ws?t:void 0}function tn(t,e,o){if(fi(e))return e;var n=e[Q];if(!n)return hr(e,function(c,p){return ms(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return rn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=pi(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),hr(a,function(c,p){return ms(t,n,i,c,p,o,s)}),rn(t,i,!1),o&&t.u&&vt("Patches").N(n,o,t.u,t.s)}return n.o}function ms(t,e,o,n,i,a,s){if(Rt(i)){var c=tn(t,i,a&&e&&e.i!==3&&!Br(e.R,n)?a.concat(n):void 0);if(Os(o,n,c),!Rt(c))return;t.m=!1}else s&&o.add(i);if(st(i)&&!fi(i)){if(!t.h.D&&t._<1)return;tn(t,i),e&&e.A.l||rn(t,i)}}function rn(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&ui(e,o)}function oi(t,e){var o=t[Q];return(o?Ut(o):t)[e]}function gs(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function zt(t){t.P||(t.P=!0,t.l&&zt(t.l))}function ni(t){t.o||(t.o=pi(t.t))}function si(t,e,o){var n=ci(e)?vt("MapSet").F(e,o):di(e)?vt("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:ii(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,u=mo;s&&(p=[c],u=ho);var g=Proxy.revocable(p,u),y=g.revoke,b=g.proxy;return c.k=b,c.j=y,b}(e,o):vt("ES5").J(e,o);return(o?o.A:ii()).p.push(n),n}function $p(t){return Rt(t)||et(22,t),function e(o){if(!st(o))return o;var n,i=o[Q],a=Mr(o);if(i){if(!i.P&&(i.i<4||!vt("ES5").K(i)))return i.t;i.I=!0,n=bs(o,a),i.I=!1}else n=bs(o,a);return hr(n,function(s,c){i&&_p(i.t,s)===c||Os(n,s,e(c))}),a===3?new Set(n):n}(t)}function bs(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return pi(t)}function Es(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[Q];return mo.get(u,s)},set:function(u){var g=this[Q];mo.set(g,s,u)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][Q];if(!p.P)switch(p.i){case 5:n(p)&&zt(p);break;case 4:o(p)&&zt(p)}}}function o(s){for(var c=s.t,p=s.k,u=Fr(p),g=u.length-1;g>=0;g--){var y=u[g];if(y!==Q){var b=c[y];if(b===void 0&&!Br(c,y))return!0;var v=p[y],S=v&&v[Q];if(S?S.t!==b:!Cs(v,b))return!0}}var O=!!c[Q];return u.length!==Fr(c).length+(O?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&et(3,JSON.stringify(Ut(s)))}var a={};kp("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(y,b){if(y){for(var v=Array(b.length),S=0;S<b.length;S++)Object.defineProperty(v,""+S,t(S,!0));return v}var O=As(b);delete O[Q];for(var _=Fr(O),L=0;L<_.length;L++){var N=_[L];O[N]=t(N,y||!!O[N].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(p,s),g={i:p?5:4,A:c?c.A:ii(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,Q,{value:g,writable:!0}),u},S:function(s,c,p){p?Rt(c)&&c[Q].A===s&&e(s.p):(s.u&&function u(g){if(g&&typeof g=="object"){var y=g[Q];if(y){var b=y.t,v=y.k,S=y.R,O=y.i;if(O===4)hr(v,function(F){F!==Q&&(b[F]!==void 0||Br(b,F)?S[F]||u(v[F]):(S[F]=!0,zt(y)))}),hr(b,function(F){v[F]!==void 0||Br(v,F)||(S[F]=!1,zt(y))});else if(O===5){if(n(y)&&(zt(y),S.length=!0),v.length<b.length)for(var _=v.length;_<b.length;_++)S[_]=!1;else for(var L=b.length;L<v.length;L++)S[L]=!0;for(var N=Math.min(v.length,b.length),D=0;D<N;D++)v.hasOwnProperty(D)||(S[D]=!0),S[D]===void 0&&u(v[D])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var xs,yo,hi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Bp=typeof Map<"u",Fp=typeof Set<"u",vs=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ws=hi?Symbol.for("immer-nothing"):((xs={})["immer-nothing"]=!0,xs),Ss=hi?Symbol.for("immer-draftable"):"__$immer_draftable",Q=hi?Symbol.for("immer-state"):"__$immer_state";var Mp=""+Object.prototype.constructor,Fr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,As=Object.getOwnPropertyDescriptors||function(t){var e={};return Fr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},li={},mo={get:function(t,e){if(e===Q)return t;var o=Ut(t);if(!Br(o,e))return function(i,a,s){var c,p=gs(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!st(n)?n:n===oi(t.t,e)?(ni(t),t.o[e]=si(t.A.h,n,t)):n},has:function(t,e){return e in Ut(t)},ownKeys:function(t){return Reflect.ownKeys(Ut(t))},set:function(t,e,o){var n=gs(Ut(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=oi(Ut(t),e),a=i?.[Q];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Cs(o,i)&&(o!==void 0||Br(t.t,e)))return!0;ni(t),zt(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return oi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,ni(t),zt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Ut(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){et(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){et(12)}},ho={};hr(mo,function(t,e){ho[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ho.deleteProperty=function(t,e){return ho.set.call(this,t,e,void 0)},ho.set=function(t,e,o){return mo.set.call(this,t[0],e,o,t[0])};var Up=function(){function t(o){var n=this;this.O=vs,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(O){var _=this;O===void 0&&(O=c);for(var L=arguments.length,N=Array(L>1?L-1:0),D=1;D<L;D++)N[D-1]=arguments[D];return p.produce(O,function(F){var U;return(U=a).call.apply(U,[_,F].concat(N))})}}var u;if(typeof a!="function"&&et(6),s!==void 0&&typeof s!="function"&&et(7),st(i)){var g=ys(n),y=si(n,i,void 0),b=!0;try{u=a(y),b=!1}finally{b?en(g):ai(g)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(O){return ti(g,s),ri(O,g)},function(O){throw en(g),O}):(ti(g,s),ri(u,g))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===ws&&(u=void 0),n.D&&ui(u,!0),s){var v=[],S=[];vt("Patches").M(i,u,v,S),s(v,S)}return u}et(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var g=arguments.length,y=Array(g>1?g-1:0),b=1;b<g;b++)y[b-1]=arguments[b];return n.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(y))})};var s,c,p=n.produce(i,a,function(u,g){s=u,c=g});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){st(o)||et(8),Rt(o)&&(o=$p(o));var n=ys(this),i=si(this,o,void 0);return i[Q].C=!0,ai(n),i},e.finishDraft=function(o,n){var i=o&&o[Q],a=i.A;return ti(a,n),ri(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!vs&&et(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=vt("Patches").$;return Rt(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),Ge=new Up,zp=Ge.produce,th=Ge.produceWithPatches.bind(Ge),rh=Ge.setAutoFreeze.bind(Ge),oh=Ge.setUseProxies.bind(Ge),nh=Ge.applyPatches.bind(Ge),ih=Ge.createDraft.bind(Ge),ah=Ge.finishDraft.bind(Ge),on=zp;function yr(t){"@babel/helpers - typeof";return yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yr(t)}function Rs(t,e){if(yr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ts(t){var e=Rs(t,"string");return yr(e)=="symbol"?e:e+""}function Ls(t,e,o){return(e=Ts(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Ns(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function yi(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Ns(Object(o),!0).forEach(function(n){Ls(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ns(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Ee(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Is=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),mi=function(){return Math.random().toString(36).substring(7).split("").join(".")},nn={INIT:"@@redux/INIT"+mi(),REPLACE:"@@redux/REPLACE"+mi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+mi()}};function Wp(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function gi(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Ee(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Ee(1));return o(gi)(t,e)}if(typeof t!="function")throw new Error(Ee(2));var i=t,a=e,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function g(){if(p)throw new Error(Ee(3));return a}function y(O){if(typeof O!="function")throw new Error(Ee(4));if(p)throw new Error(Ee(5));var _=!0;return u(),c.push(O),function(){if(_){if(p)throw new Error(Ee(6));_=!1,u();var N=c.indexOf(O);c.splice(N,1),s=null}}}function b(O){if(!Wp(O))throw new Error(Ee(7));if(typeof O.type>"u")throw new Error(Ee(8));if(p)throw new Error(Ee(9));try{p=!0,a=i(a,O)}finally{p=!1}for(var _=s=c,L=0;L<_.length;L++){var N=_[L];N()}return O}function v(O){if(typeof O!="function")throw new Error(Ee(10));i=O,b({type:nn.REPLACE})}function S(){var O,_=y;return O={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Ee(11));function D(){N.next&&N.next(g())}D();var F=_(D);return{unsubscribe:F}}},O[Is]=function(){return this},O}return b({type:nn.INIT}),n={dispatch:b,subscribe:y,getState:g,replaceReducer:v},n[Is]=S,n}function Hp(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:nn.INIT});if(typeof n>"u")throw new Error(Ee(12));if(typeof o(void 0,{type:nn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ee(13))})}function _s(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{Hp(o)}catch(p){c=p}return function(u,g){if(u===void 0&&(u={}),c)throw c;if(0)var y;for(var b=!1,v={},S=0;S<a.length;S++){var O=a[S],_=o[O],L=u[O],N=_(L,g);if(typeof N>"u"){var D=g&&g.type;throw new Error(Ee(14))}v[O]=N,b=b||N!==L}return b=b||a.length!==Object.keys(u).length,b?v:u}}function Ur(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Ps(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Ee(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=Ur.apply(void 0,c)(i.dispatch),yi(yi({},i),{},{dispatch:a})}}}function ks(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var Ds=ks();Ds.withExtraArgument=ks;var bi=Ds;var Us=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Vp=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(g){return p([u,g])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(g){u=[6,g],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},zr=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},jp=Object.defineProperty,Gp=Object.defineProperties,Kp=Object.getOwnPropertyDescriptors,$s=Object.getOwnPropertySymbols,Zp=Object.prototype.hasOwnProperty,qp=Object.prototype.propertyIsEnumerable,Bs=function(t,e,o){return e in t?jp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Wt=function(t,e){for(var o in e||(e={}))Zp.call(e,o)&&Bs(t,o,e[o]);if($s)for(var n=0,i=$s(e);n<i.length;n++){var o=i[n];qp.call(e,o)&&Bs(t,o,e[o])}return t},xi=function(t,e){return Gp(t,Kp(e))},Yp=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(u){i(u)}},s=function(p){try{c(o.throw(p))}catch(u){i(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var Qp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ur:Ur.apply(null,arguments)},Eh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Xp(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var Jp=function(t){Us(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,zr([void 0],o[0].concat(this)))):new(e.bind.apply(e,zr([void 0],o.concat(this))))},e}(Array),eu=function(t){Us(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,zr([void 0],o[0].concat(this)))):new(e.bind.apply(e,zr([void 0],o.concat(this))))},e}(Array);function Oi(t){return st(t)?on(t,function(){}):t}function tu(t){return typeof t=="boolean"}function ru(){return function(e){return ou(e)}}function ou(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new Jp;if(o&&(tu(o)?c.push(bi):c.push(bi.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var u}return c}var vi=!0;function zs(t){var e=ru(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,g=u===void 0?void 0:u,y=o.enhancers,b=y===void 0?void 0:y,v;if(typeof i=="function")v=i;else if(Xp(i))v=_s(i);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 S=s;if(typeof S=="function"&&(S=S(e),!vi&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!vi&&S.some(function(F){return typeof F!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Ps.apply(void 0,S),_=Ur;p&&(_=Qp(Wt({trace:!vi},typeof p=="object"&&p)));var L=new eu(O),N=L;Array.isArray(b)?N=zr([O],b):typeof b=="function"&&(N=b(L));var D=_.apply(void 0,N);return gi(v,g,D)}function Ht(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Wt(Wt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Ws(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function nu(t){return typeof t=="function"}function iu(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Ws(e):[e,o,n],a=i[0],s=i[1],c=i[2],p;if(nu(t))p=function(){return Oi(t())};else{var u=Oi(t);p=function(){return u}}function g(y,b){y===void 0&&(y=p());var v=zr([a[b.type]],s.filter(function(S){var O=S.matcher;return O(b)}).map(function(S){var O=S.reducer;return O}));return v.filter(function(S){return!!S}).length===0&&(v=[c]),v.reduce(function(S,O){if(O)if(Rt(S)){var _=S,L=O(_,b);return L===void 0?S:L}else{if(st(S))return on(S,function(N){return O(N,b)});var L=O(S,b);if(L===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return L}return S},y)}return g.getInitialState=p,g}function au(t,e){return t+"/"+e}function Hs(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Oi(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(g){var y=n[g],b=au(e,g),v,S;"reducer"in y?(v=y.reducer,S=y.prepare):v=y,a[g]=v,s[b]=v,c[g]=S?Ht(b,S):Ht(b)});function p(){var g=typeof t.extraReducers=="function"?Ws(t.extraReducers):[t.extraReducers],y=g[0],b=y===void 0?{}:y,v=g[1],S=v===void 0?[]:v,O=g[2],_=O===void 0?void 0:O,L=Wt(Wt({},b),s);return iu(o,function(N){for(var D in L)N.addCase(D,L[D]);for(var F=0,U=S;F<U.length;F++){var De=U[F];N.addMatcher(De.matcher,De.reducer)}_&&N.addDefaultCase(_)})}var u;return{name:e,reducer:function(g,y){return u||(u=p()),u(g,y)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var su="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",lu=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=su[Math.random()*64|0];return e},cu=["name","message","stack","code"],Si=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Fs=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),du=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=cu;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},Th=function(){function t(e,o,n){var i=Ht(e+"/fulfilled",function(g,y,b,v){return{payload:g,meta:xi(Wt({},v||{}),{arg:b,requestId:y,requestStatus:"fulfilled"})}}),a=Ht(e+"/pending",function(g,y,b){return{payload:void 0,meta:xi(Wt({},b||{}),{arg:y,requestId:g,requestStatus:"pending"})}}),s=Ht(e+"/rejected",function(g,y,b,v,S){return{payload:v,error:(n&&n.serializeError||du)(g||"Rejected"),meta:xi(Wt({},S||{}),{arg:b,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:g?.name==="AbortError",condition:g?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function g(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return g.prototype.abort=function(){},g}();function u(g){return function(y,b,v){var S=n?.idGenerator?n.idGenerator(g):lu(),O=new p,_,L=!1;function N(F){_=F,O.abort()}var D=function(){return Yp(this,null,function(){var F,U,De,mt,Ie,gt,be;return Vp(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),mt=(F=n?.condition)==null?void 0:F.call(n,g,{getState:b,extra:v}),uu(mt)?[4,mt]:[3,2];case 1:mt=m.sent(),m.label=2;case 2:if(mt===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return L=!0,Ie=new Promise(function(x,P){return O.signal.addEventListener("abort",function(){return P({name:"AbortError",message:_||"Aborted"})})}),y(a(S,g,(U=n?.getPendingMeta)==null?void 0:U.call(n,{requestId:S,arg:g},{getState:b,extra:v}))),[4,Promise.race([Ie,Promise.resolve(o(g,{dispatch:y,getState:b,extra:v,requestId:S,signal:O.signal,abort:N,rejectWithValue:function(x,P){return new Si(x,P)},fulfillWithValue:function(x,P){return new Fs(x,P)}})).then(function(x){if(x instanceof Si)throw x;return x instanceof Fs?i(x.payload,S,g,x.meta):i(x,S,g)})])];case 3:return De=m.sent(),[3,5];case 4:return gt=m.sent(),De=gt instanceof Si?s(null,S,g,gt.payload,gt.meta):s(gt,S,g),[3,5];case 5:return be=n&&!n.dispatchConditionRejection&&s.match(De)&&De.meta.condition,be||y(De),[2,De]}})})}();return Object.assign(D,{abort:N,requestId:S,arg:g,unwrap:function(){return D.then(pu)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function pu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function uu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Vs="listener",js="completed",Gs="cancelled",Lh="task-"+Gs,Nh="task-"+js,Ih=Vs+"-"+Gs,_h=Vs+"-"+js;var Ci="listenerMiddleware";var Ph=Ht(Ci+"/add"),kh=Ht(Ci+"/removeAll"),Dh=Ht(Ci+"/remove");var Ms,$h=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Ms||(Ms=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},fu=function(t){return function(e){setTimeout(e,t)}},Bh=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:fu(10);Es();function hu(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var an=class extends hu(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ks=class t extends an{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(po(a))return a;if(i==null)return;let s=Hs({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=zs({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Yo;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let p=s,u=a[p];return u?(...g)=>{let y=u(...g.map(i));return this.reduxStore.dispatch(y),y}:g=>{this.setState({[p]:i(g)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var sn=class{static format(e,o,n,i){return window.moment?window.moment(e).locale(o).format(this.getDateFormat(n,i)):e}static getDateFormat(e,o){return e?o?"lll":"ll":o?"L LT":"L"}};var ln=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a};function Zs(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(I)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===n))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?c=>sn.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ln([(0,Ei.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),ln([(0,Ei.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),ln([ei({store:I.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),ln([ei({store:I.name})],e.prototype,"uiLocale",void 0),e}var un=h(A());var cn=class extends bt{async listMySearches(){let{session:e}=I.getState();return Ya(e,ce.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var dn=class extends bt{async listMyBookmarks(){let e=I.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var yu="ft-user-assets",pn=un.FtReduxStore.get({name:yu,initialState:{savedSearches:void 0,bookmarks:void 0}}),wi=class{constructor(){this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new dn,this.savedSearchesService=new cn,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=I.getState();(0,un.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),pn.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),pn.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();pn.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;pn.actions.bookmarks(o)}}},qs=new wi;var Ai=class{addCommand(e,o=!1){I.commands.add(e,o)}consumeCommand(e){return I.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ai;var Ys=h(A()),Ri=class{highlightHtml(e,o,n){(0,Ys.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Ri;var Qs=h(A());var Ti=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=I.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Qs.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Ti;var Xs=h(A());var go=class{static get(e,o){var n,i,a,s;let c=I.getState(),{lang:p,region:u}=(i=(n=c.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Xs.SearchPlaceConverter(c.baseUrl,(s=(a=window.FluidTopicsClientConfiguration)===null||a===void 0?void 0:a.predefinedSorts)!==null&&s!==void 0?s:{},e??20,c.searchInAllLanguagesAllowed,o??`${p}-${u}`)}};var fn=class extends kr{async sendDocumentStartDisplayEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send document.start_display event"),console.debug(o)})}async sendTopicStartDisplayEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send topic.start_display event"),console.debug(o)})}async sendKhubSearchEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send khub.search event"),console.debug(o)})}async sendDocumentSearchEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send document.search event"),console.debug(o)})}async sendSearchPageSelectEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send search_page.select event"),console.debug(o)})}async sendSearchResultOpenContextMenuEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send search_result.open_context_menu event"),console.debug(o)})}};var Li=class{urlToSearchRequest(e){return go.get().parse(e)}searchRequestToUrl(e){return go.get().serialize(e)}};window.FluidTopicsUrlService=new Li;var Vt=h(A());var mr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};mr.eventName="change";var Ni=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},Js=new Ni;var hn=class t extends Vt.WithEventBus{static build(){return new t(window.history,Js,()=>window.location,!1)}constructor(e,o,n,i){var a,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Vt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new mr(this.currentItem())),0)}installProxies(){let e=o=>(n,i,[a,s,c])=>{let p=o(),u={...p===this.currentIndex?this.currentState:void 0,...a,index:p,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(i,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e,o=!1){var n,i,a;let s={...this.buildCurrentState(),...e,index:this.currentIndex,title:(n=e?.title)!==null&&n!==void 0?n:this.currentState.title},c=o?(i=e?.majorState)!==null&&i!==void 0?i:this.currentState.majorState:(a=this.currentState.majorState)!==null&&a!==void 0?a:e?.majorState;c!=null&&(s.majorState=c),this.setCurrentState(s)}addHistoryChangeListener(e){this.addEventListener(mr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(mr.eventName,e)}currentItem(){return(0,Vt.deepCopy)(this.currentState)}back(){let e=this.previousMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Vt.deepCopy)(this.states[this.previousMajorPosition()])}previousMajorPosition(){let e=this.currentIndex;for(;e>0&&!this.isMajorState(e);)e--;return this.previousExistingPosition(e)}forward(){let e=this.nextMajorPosition();e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){return(0,Vt.deepCopy)(this.states[this.nextMajorPosition()])}nextMajorPosition(){let e=this.currentIndex;do e++;while(e<this.states.length&&!this.isMajorState(e));do e++;while(e<this.states.length&&!this.isMajorState(e));return this.previousExistingPosition(e)}previousExistingPosition(e){let o=e;do o--;while(o>0&&!this.hasState(o));return o}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isMajorState(e){var o,n;return this.hasState(e)&&((n=(o=this.states[e])===null||o===void 0?void 0:o.majorState)!==null&&n!==void 0?n:!0)}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=hn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});(0,el.customElement)("ft-app-context")(oe);var yn=class extends bt{constructor(e){super(!0,e),this.sortObjectFields=(o,n)=>typeof n!="object"||n==null||Array.isArray(n)?n:Object.fromEntries(Object.entries(n).sort(([i],[a])=>i.localeCompare(a)))}async launchSearch(e){let o={...e,metadataFilters:this.sortFilters(e.metadataFilters),facets:[...e.facets].sort((n,i)=>n.id.localeCompare(i.id))};return this.cache.get("search-"+this.hash(o),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){let o={...e,metadataFilters:this.sortFilters(e.metadataFilters)};return this.cache.get("suggest-"+this.hash(o),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}sortFilters(e){return e.map(o=>o.valueFilter==null?o:{...o,valueFilter:{...o.valueFilter,values:[...o.valueFilter.values].sort((n,i)=>n.localeCompare(i))}}).sort((o,n)=>o.key.localeCompare(n.key))}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var xo=t=>t.request.virtualField===_r.TITLE_ONLY&&t.request.scope===Pr.DOCUMENTS,mn=class t extends Event{constructor(){super(t.eventName)}};mn.eventName="search-context-clear-all-filters";var bo=class t{static build(e,o){return new t(Ra(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new Ke.Debouncer(10),this.searchDebouncer=new Ke.Debouncer(100),this.launchSearch=n=>this.searchDebouncer.run(()=>this.fetchSearchData(n??this.buildSearchRequest(this.store.getState()))),this.buildSearchRequest=n=>({...n.request,facets:this.facetIds.map(i=>({id:i}))}),this.suggestDebouncer=new Ke.Debouncer(300),this.launchSuggest=n=>this.suggestDebouncer.run(()=>this.fetchSuggestData(n??this.buildSuggestRequest(this.store.getState()))),this.buildSuggestRequest=n=>({input:n.liveQuery,metadataFilters:n.request.metadataFilters,sort:n.request.sort,contentLocale:n.request.contentLocale,scope:n.request.scope}),this.service=o??new yn,this.service.cache.addEventListener("clear-cache",n=>{n.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=(0,Ke.watch)(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=(0,Ke.watch)(e,this.buildSuggestRequest,this.launchSuggest)}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1)}setContentLocale(e){var o;let n=(o=this.store.getState().locales)!==null&&o!==void 0?o:[],i=this.store.getState().request.contentLocale;if(e!=i){if(n.length>0){let a=s=>n.some(c=>c.lang==s);a(e)||(e=a(i)?i:n[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([])}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e)}setPageSize(e){this.store.actions.setPageSize(e)}setPageNumber(e){this.store.actions.setPageNumber(e)}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1)}setFilters(e){let o=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1)}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e)}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(_r.TITLE_ONLY),this.store.actions.setRequestScope(Pr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(_r.EVERYWHERE),this.store.actions.setRequestScope(Pr.DEFAULT))}setVirtualField(e){this.store.actions.setRequestVirtualField(e)}get searchInDocumentTitlesOnly(){return xo(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new mn)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,o){let n=this.facetIds.filter(i=>i!=e);o&&n.push(o),this.facetIds=n}get facetIds(){var e;let o=this.store.getState().request;return[...new Set([...o.facets.map(n=>n.id),...((e=o.metadataFilters)!==null&&e!==void 0?e:[]).map(n=>n.key)])]}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,o){this.setValueFilter(e,o)}setValueFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,valueFilter:{values:o,negative:!1}},a=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==i.key),i];this.setFilters(a)}setDateFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,dateFilter:{type:o}},a=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==i.key),i];this.setFilters(a)}removeDateFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.dateFilter),...o.filter(i=>i.dateFilter&&i.key!==e)];this.setFilters(n)}setRangeFilter(e,o,n){let i=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:o,to:n}},s=[...i.filter(c=>!c.rangeFilter),...i.filter(c=>c.rangeFilter&&c.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.rangeFilter),...o.filter(i=>i.rangeFilter&&i.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1)}setScope(e){this.store.actions.setRequestScope(e)}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var o,n,i,a;try{if((o=this.cancelableSearch)===null||o===void 0||o.cancel(),this.store.actions.paging(void 0),this.ignoreEmptyQuery&&e.query.length==0)this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{this.cancelableSearch=(0,Ke.cancelable)(this.service.launchSearch(e));let s=await this.cancelableSearch;if(s.paging.currentPage<=1)this.store.actions.results(s.results),this.store.actions.facets(s.facets),this.store.actions.spellcheck(s.spellcheck);else{let c=((n=this.store.getState().results)!==null&&n!==void 0?n:[]).concat(s.results);this.store.actions.results(c),this.store.commands.clear(/^focus-result-/),this.store.commands.add({type:`focus-result-${(s.paging.currentPage-1)*((i=e.paging.perPage)!==null&&i!==void 0?i:20)+1}`})}this.store.actions.paging(s.paging)}}catch(s){s instanceof Ke.CanceledPromiseError||(console.error(s),(a=this.errorHandler)===null||a===void 0||a.call(this,s))}}async fetchSuggestData(e){var o;try{(o=this.cancelableSuggest)===null||o===void 0||o.cancel(),this.cancelableSuggest=(0,Ke.cancelable)(this.service.launchSuggest(e));let n=await this.cancelableSuggest;this.store.actions.suggestResults(n.suggestions)}catch(n){!(n instanceof Ke.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}clear(){this.store.clear()}clearResults(){this.store.actions.paging(void 0),this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0)}};var mu=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},_i=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},tl=Symbol("registerInterval"),Ii=Symbol("registerAttempts"),gu=40;function bu(t){class e extends t{setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Ii]=0,this[tl]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Ii]>gu?window.clearInterval(this[tl]):(this[Ii]++,this.dispatchEvent(new _i))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return mu([(0,ol.state)()],e.prototype,"stateManager",void 0),e}var jt=class extends bu(rl.FtLitElementRedux){};var ca=h(A());var kn=h(k()),Ae=h(j()),yd=h(Gt()),no=h(A());var hl=h(A());var ul=h(k()),ve=h(j()),fl=h(Gt()),vo=h(A());var dl=h(k()),se=h(A()),il=se.FtCssVariableFactory.extend("--ft-ripple-color","",se.designSystemVariables.colorContent),E={color:il,backgroundColor:se.FtCssVariableFactory.extend("--ft-ripple-background-color","",il),opacityContentOnSurfacePressed:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:se.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},al=se.FtCssVariableFactory.extend("--ft-ripple-color","",se.designSystemVariables.colorPrimary),sl={color:al,backgroundColor:se.FtCssVariableFactory.extend("--ft-ripple-background-color","",al)},ll=se.FtCssVariableFactory.extend("--ft-ripple-color","",se.designSystemVariables.colorSecondary),cl={color:ll,backgroundColor:se.FtCssVariableFactory.extend("--ft-ripple-background-color","",ll)},pl=dl.css`
@@ -1377,7 +1377,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
1377
1377
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
1378
1378
  </span>
1379
1379
  `}update(e){var o;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(o=this.defaultMessage)!==null&&o!==void 0?o:""})}};pt.elementDefinitions={};pt.styles=vd;$o([(0,Wn.redux)()],pt.prototype,"editorMode",void 0);$o([(0,zn.property)()],pt.prototype,"context",void 0);$o([(0,zn.property)()],pt.prototype,"key",void 0);$o([(0,Wn.jsonProperty)([])],pt.prototype,"args",void 0);$o([(0,zn.property)()],pt.prototype,"defaultMessage",void 0);var rr=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Zo:Dr}constructor(e,o=!1){this.name=e,this.custom=o,this.properties=new Proxy({},{get:(n,i)=>{let a=i;return s=>({context:this.name,key:a,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...a)=>this.service.resolveMessage(this.name,i,...a)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)})}};(0,Rd.customElement)("ft-i18n")(pt);var _d=h(A());var Id=h(k()),kt=h(j()),it=h(A());var Td=h(k());var Ld=Td.css`
1380
- `;var Nd=h(A());function Bo(t){return t.filter(e=>e.key==="ft:lastEdition").filter(e=>!e.valueFilter).map(e=>e.dateFilter?e.dateFilter.type:"CUSTOM").shift()}function Fo(t){var e;return t.dateFilter?{key:t.key,type:"DATE",dateValue:t.dateFilter.type}:t.rangeFilter?{key:t.key,type:"RANGE",from:t.rangeFilter.from,to:t.rangeFilter.to}:{key:t.key,values:(e=t.valueFilter)===null||e===void 0?void 0:e.values}}var Hn=class{constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.enableAnalyticsEvents=!0,this.appName=void 0,this.appVersion=void 0,this.publication=void 0,this.sendEvent=n=>{if(!this.canSendEvent()||!n)return;let i=this.store.getState().request;this.publication==null?this.sendKhubSearchEvent(i,n):this.sendDocumentSearchEvent(i,n)},this.eventsService=o??new fn,this.resultsWatcher=(0,Nd.watch)(e,n=>n.results,this.sendEvent)}setEnableAnalyticsEvents(e){this.enableAnalyticsEvents=e}setAppName(e){this.appName=e}setAppVersion(e){this.appVersion=e}setDocumentSearch(e){this.publication=e}canSendEvent(){if(this.appName==null||this.appVersion==null)return console.debug("ft-search-context.eventManager is not initialized. No events will be sent!"),!1;let{editorMode:e}=I.getState();return this.enableAnalyticsEvents&&!e}sendKhubSearchEvent(e,o){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:pr.KHUB__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:o.length},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Bo(e.metadataFilters),facets:e.metadataFilters.map(i=>Fo(i))}};this.eventsService.sendKhubSearchEvent(n)}sendDocumentSearchEvent(e,o){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:pr.DOCUMENT__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:o.length},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Bo(e.metadataFilters),facets:e.metadataFilters.map(i=>Fo(i))},publication:this.publication};this.eventsService.sendDocumentSearchEvent(n)}sendResultClickedEvent(e,o){if(!this.canSendEvent())return;let n=this.store.getState().request,i;e.type==Ft.TOPIC&&(i={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:pr.SEARCH_PAGE__SELECT,searchQuery:{terms:n.query,searchType:n.virtualField,lastUpdate:Bo(n.metadataFilters),facets:n.metadataFilters.map(s=>Fo(s))},searchResult:{rank:o,type:e.type,document:this.convertDocument(e),topic:i},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchPageSelectEvent(a)}sendResultContextMenuOpenedEvent(e,o){if(!this.canSendEvent())return;let n=this.store.getState().request,i;e.type==Ft.TOPIC&&(i={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:pr.SEARCH_RESULT__OPEN_CONTEXT_MENU,searchQuery:{terms:n.query,searchType:n.virtualField,lastUpdate:Bo(n.metadataFilters),facets:n.metadataFilters.map(s=>Fo(s))},searchResult:{rank:o,type:e.type,document:this.convertDocument(e),topic:i},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchResultOpenContextMenuEvent(a)}convertDocument(e){switch(e.type){case Ft.MAP:return{id:e.map.mapId,title:e.map.title,type:Ir.STRUCTURED_DOCUMENT,metadata:e.map.metadata};case Ft.TOPIC:return{id:e.topic.mapId,title:e.topic.mapTitle,type:Ir.STRUCTURED_DOCUMENT,metadata:e.topic.metadata};case Ft.DOCUMENT:return{id:e.document.documentId,title:e.document.title,type:Ir.UNSTRUCTURED_DOCUMENT,metadata:e.document.metadata,mimeType:e.document.mimeType};default:throw new TypeError("Unknown type "+e.type)}}convertExternalLink(e){var o,n,i,a,s;return(a=(n=(o=e.map)===null||o===void 0?void 0:o.originUrl)!==null&&n!==void 0?n:(i=e.topic)===null||i===void 0?void 0:i.originUrl)!==null&&a!==void 0?a:(s=e.document)===null||s===void 0?void 0:s.originUrl}};var Re=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},da=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},pa=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},ua=class extends CustomEvent{constructor(e,o,n){super("ft-search-results-change",{detail:{request:e,paging:o,spellcheck:n}})}},ie=class extends it.FtLitElementRedux{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=bo.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=o=>this.handleLoadError(o),this.addStore(this.stateManager.store,"search")}return this._stateManager}get eventManager(){return this._eventManager==null&&(this._eventManager=new Hn(this.stateManager.store)),this._eventManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.otherQueryParams={},this.addStore(I)}render(){return Id.html`
1380
+ `;var Nd=h(A());function Bo(t){return t.filter(e=>e.key==="ft:lastEdition").filter(e=>!e.valueFilter).map(e=>e.dateFilter?e.dateFilter.type:"CUSTOM").shift()}function Fo(t){var e;return t.dateFilter?{key:t.key,type:"DATE",dateValue:t.dateFilter.type}:t.rangeFilter?{key:t.key,type:"RANGE",from:t.rangeFilter.from,to:t.rangeFilter.to}:{key:t.key,values:(e=t.valueFilter)===null||e===void 0?void 0:e.values}}var Hn=class{constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.enableAnalyticsEvents=!0,this.appName=void 0,this.appVersion=void 0,this.publication=void 0,this.sendEvent=n=>{if(!this.canSendEvent()||!n)return;let i=this.store.getState().request;this.publication==null?this.sendKhubSearchEvent(i,n):this.sendDocumentSearchEvent(i,n)},this.eventsService=o??new fn,this.resultsWatcher=(0,Nd.watch)(e,n=>n.results,this.sendEvent)}setEnableAnalyticsEvents(e){this.enableAnalyticsEvents=e}setAppName(e){this.appName=e}setAppVersion(e){this.appVersion=e}setDocumentSearch(e){this.publication=e}canSendEvent(){if(this.appName==null||this.appVersion==null)return console.debug("ft-search-context.eventManager is not initialized. No events will be sent!"),!1;let{editorMode:e}=I.getState();return this.enableAnalyticsEvents&&!e}sendKhubSearchEvent(e,o){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:pr.KHUB__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:o.length},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Bo(e.metadataFilters),facets:e.metadataFilters.map(i=>Fo(i))}};this.eventsService.sendKhubSearchEvent(n)}sendDocumentSearchEvent(e,o){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:pr.DOCUMENT__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:o.length},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Bo(e.metadataFilters),facets:e.metadataFilters.map(i=>Fo(i))},publication:this.publication};this.eventsService.sendDocumentSearchEvent(n)}sendResultClickedEvent(e,o){if(!this.canSendEvent())return;let n=this.store.getState().request,i;e.type==Ft.TOPIC&&(i={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:pr.SEARCH_PAGE__SELECT,searchQuery:{terms:n.query,searchType:n.virtualField,lastUpdate:Bo(n.metadataFilters),facets:n.metadataFilters.map(s=>Fo(s))},searchResult:{rank:o,type:e.type,document:this.convertDocument(e),topic:i},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchPageSelectEvent(a)}sendResultContextMenuOpenedEvent(e,o){if(!this.canSendEvent())return;let n=this.store.getState().request,i;e.type==Ft.TOPIC&&(i={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:pr.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU,searchQuery:{terms:n.query,searchType:n.virtualField,lastUpdate:Bo(n.metadataFilters),facets:n.metadataFilters.map(s=>Fo(s))},searchResult:{rank:o,type:e.type,document:this.convertDocument(e),topic:i},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchResultOpenContextMenuEvent(a)}convertDocument(e){switch(e.type){case Ft.MAP:return{id:e.map.mapId,title:e.map.title,type:Ir.STRUCTURED_DOCUMENT,metadata:e.map.metadata};case Ft.TOPIC:return{id:e.topic.mapId,title:e.topic.mapTitle,type:Ir.STRUCTURED_DOCUMENT,metadata:e.topic.metadata};case Ft.DOCUMENT:return{id:e.document.documentId,title:e.document.title,type:Ir.UNSTRUCTURED_DOCUMENT,metadata:e.document.metadata,mimeType:e.document.mimeType};default:throw new TypeError("Unknown type "+e.type)}}convertExternalLink(e){var o,n,i,a,s;return(a=(n=(o=e.map)===null||o===void 0?void 0:o.originUrl)!==null&&n!==void 0?n:(i=e.topic)===null||i===void 0?void 0:i.originUrl)!==null&&a!==void 0?a:(s=e.document)===null||s===void 0?void 0:s.originUrl}};var Re=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},da=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},pa=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},ua=class extends CustomEvent{constructor(e,o,n){super("ft-search-results-change",{detail:{request:e,paging:o,spellcheck:n}})}},ie=class extends it.FtLitElementRedux{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=bo.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=o=>this.handleLoadError(o),this.addStore(this.stateManager.store,"search")}return this._stateManager}get eventManager(){return this._eventManager==null&&(this._eventManager=new Hn(this.stateManager.store)),this._eventManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.otherQueryParams={},this.addStore(I)}render(){return Id.html`
1381
1381
  <slot @register-ft-search-component=${this.registerComponent} @ft-search-result-click="${this.onResultClicked}"
1382
1382
  @ft-search-result-open-context-menu=${this.onResultContextMenuOpened}></slot>
1383
1383
  `}update(e){super.update(e),e.has("query")&&this.query!==void 0&&this.stateManager.setQuery(this.query),e.has("contentLocale")&&this.contentLocale!==void 0&&this.stateManager.forceContentLocale(this.contentLocale),e.has("filters")&&this.filters!==void 0&&this.stateManager.setFilters(this.filters),e.has("sort")&&this.sort!==void 0&&this.stateManager.setSort(this.sort),e.has("pageSize")&&this.pageSize!==void 0&&this.stateManager.setPageSize(this.pageSize),e.has("searchInDocumentTitlesOnly")&&this.searchInDocumentTitlesOnly!==void 0&&this.stateManager.setSearchInDocumentTitlesOnly(this.searchInDocumentTitlesOnly),e.has("scope")&&this.scope!==void 0&&this.stateManager.setScope(this.scope),e.has("virtualField")&&this.virtualField!==void 0&&this.stateManager.setVirtualField(this.virtualField),e.has("ignoreEmptyQuery")&&this.ignoreEmptyQuery!==void 0&&this.stateManager.setIgnoreEmptyQuery(this.ignoreEmptyQuery),e.has("openExternalDocumentInNewTab")&&this.openExternalDocumentInNewTab!==void 0&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("otherQueryParams")&&this.otherQueryParams!==void 0&&this.stateManager.setOtherQueryParams(this.otherQueryParams),e.has("session")&&this.session!==void 0&&e.get("session")!=null&&(this.stateManager.service.clearCache(),this.stateManager.initService())}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.stateManager.clearResults(),this.stateManager.setQuery(this.query),this.stateManager.forceContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort),this.stateManager.setOtherQueryParams(this.otherQueryParams)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.clearResults()}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("request")&&this.request&&this.dispatchEvent(new pa(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new ua(this.request,this.paging,this.autocorrect))}registerComponent(e){e.stopPropagation();let o=e.composedPath()[0];this.register(o)}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new da(e))}reloadSavedSearches(){qs.clearMySearches()}clear(){this.stateManager.clear()}onResultClicked(e){this.eventManager.sendResultClickedEvent(e.detail.result,e.detail.rank)}onResultContextMenuOpened(e){this.eventManager.sendResultContextMenuOpenedEvent(e.detail.result,e.detail.rank)}};ie.elementDefinitions={};ie.styles=Ld;Re([(0,it.redux)({store:I.name})],ie.prototype,"session",void 0);Re([(0,kt.property)()],ie.prototype,"query",void 0);Re([(0,kt.property)()],ie.prototype,"contentLocale",void 0);Re([(0,kt.property)({type:Number})],ie.prototype,"pageSize",void 0);Re([(0,kt.property)({type:Boolean})],ie.prototype,"searchInDocumentTitlesOnly",void 0);Re([(0,kt.property)()],ie.prototype,"scope",void 0);Re([(0,kt.property)()],ie.prototype,"virtualField",void 0);Re([(0,kt.property)({type:Boolean})],ie.prototype,"ignoreEmptyQuery",void 0);Re([(0,it.redux)({store:I.name})],ie.prototype,"openExternalDocumentInNewTab",void 0);Re([(0,it.jsonProperty)([])],ie.prototype,"filters",void 0);Re([(0,it.jsonProperty)([])],ie.prototype,"sort",void 0);Re([(0,it.jsonProperty)({})],ie.prototype,"otherQueryParams",void 0);Re([(0,it.redux)({store:"search"})],ie.prototype,"request",void 0);Re([(0,it.redux)({store:"search"})],ie.prototype,"paging",void 0);Re([(0,it.redux)({store:"search",selector:t=>t.spellcheck})],ie.prototype,"autocorrect",void 0);Re([(0,kt.property)({attribute:!1})],ie.prototype,"searchServiceProvider",void 0);(0,_d.customElement)("ft-search-context")(ie);var pp=h(A());var lp=h(k()),cp=h(A());var Pd=h(k());var kd=Pd.css`
@@ -45,7 +45,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ft-conte
45
45
  input::-webkit-search-results-decoration {
46
46
  display: none;
47
47
  }
48
- `;var Il={};var Ra={};X(Ra,{ParametrizedLabelResolver:()=>Po});var Po=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var n,i;e=this.resolvePluralKey(e,r);let a=(i=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((n,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,r){for(let n of r)if(typeof n=="number"){let i=`${String(e)}[\\=${n}]`;if(i in this.labels||i in this.defaultLabels)return i}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let n=i=>r?.includes("date")?e.toLocaleDateString(i):r?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return n(document.documentElement.lang)}catch{return n()}}};var Qa={};X(Qa,{FtCommandQueue:()=>ko,FtLitElementRedux:()=>Ke,FtReduxStore:()=>Rt,ReduxWatcher:()=>vn,clearAllStores:()=>df,isFtReduxStore:()=>dr,redux:()=>de,reduxEventListener:()=>Au,reduxReactive:()=>wu,watch:()=>Wr});var wu=()=>(t,e)=>{var r;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(r=n.reduxReactiveProperties)===null||r===void 0||r.add(e)},de=t=>{let e=t??{};return(r,n)=>{var i;let a={hasChanged:Pt,attribute:!1,...e};g(a)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:l=>l[n],store:e.store})}},Au=t=>(e,r)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(r,t)};var ko=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function dr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Pl,kl,Dl,Do=Symbol("internalReduxEventsUnsubscribers"),$t=Symbol("internalStoresUnsubscribers"),pr=Symbol("internalStores"),Ke=class extends z{constructor(){super(...arguments),this[Pl]=new Map,this[kl]=new Map,this[Dl]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(r=>e.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[pr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[pr].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[pr].get(e)}addStore(e,r){var n;r=(n=r??(dr(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this[pr].set(r,e),this.subscribeToStore(r,e),this.updateFromStores()}removeStore(e){let r=typeof e=="string"?e:e.name;this.unsubscribeFromStore(r),this[pr].delete(r)}setupStores(){this.unsubscribeFromStores(),this[pr].forEach((e,r)=>this.subscribeToStore(r,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let i=this.getStore(e.store);i&&(e.store?this[$t].has(e.store):this[$t].size>0)&&(this[r]=e.selector(i.getState(),this))}})}subscribeToStore(e,r){var n;this[$t].set(e,r.subscribe(()=>this.updateFromStores())),this[Do].set(e,[]),dr(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||r.name===i.store)){let s=l=>this[a](l);r.addEventListener(i.eventName,s),this[Do].get(e).push(()=>r.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[$t].forEach((e,r)=>this.unsubscribeFromStore(r))}unsubscribeFromStore(e){var r;this[$t].has(e)&&this[$t].get(e)(),this[$t].delete(e),(r=this[Do].get(e))===null||r===void 0||r.forEach(n=>n()),this[Do].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Pl=$t,kl=pr,Dl=Do;Ke.reduxProperties=new Map;Ke.reduxReactiveProperties=new Set;Ke.reduxEventListeners=new Map;function Ze(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function At(t){return!!t&&!!t[ne]}function et(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ku}(t)||Array.isArray(t)||!!t[Hl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Hl])||$a(t)||Fa(t))}function ur(t,e,r){r===void 0&&(r=!1),Ur(t)===0?(r?Object.keys:Br)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Ur(t){var e=t[ne];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:$a(t)?2:Fa(t)?3:0}function Mr(t,e){return Ur(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ru(t,e){return Ur(t)===2?t.get(e):t[e]}function Wl(t,e,r){var n=Ur(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function Vl(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function $a(t){return Iu&&t instanceof Map}function Fa(t){return Pu&&t instanceof Set}function Ft(t){return t.o||t.t}function Ma(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Kl(t);delete e[ne];for(var r=Br(e),n=0;n<r.length;n++){var i=r[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Ba(t,e){return e===void 0&&(e=!1),Ua(t)||At(t)||!et(t)||(Ur(t)>1&&(t.set=t.add=t.clear=t.delete=Tu),Object.freeze(t),e&&ur(t,function(r,n){return Ba(n,!0)},!0)),t}function Tu(){Ze(2)}function Ua(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function dt(t){var e=Da[t];return e||Ze(18,t),e}function _u(t,e){Da[t]||(Da[t]=e)}function Ia(){return Fo}function Ta(t,e){e&&(dt("Patches"),t.u=[],t.s=[],t.v=e)}function mn(t){Pa(t),t.p.forEach(Lu),t.p=null}function Pa(t){t===Fo&&(Fo=t.l)}function $l(t){return Fo={p:[],l:Fo,h:t,m:!0,_:0}}function Lu(t){var e=t[ne];e.i===0||e.i===1?e.j():e.g=!0}function _a(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||dt("ES5").S(e,t,n),n?(r[ne].P&&(mn(e),Ze(4)),et(t)&&(t=yn(e,t),e.l||gn(e,t)),e.u&&dt("Patches").M(r[ne].t,t,e.u,e.s)):t=yn(e,r,[]),mn(e),e.u&&e.v(e.u,e.s),t!==Gl?t:void 0}function yn(t,e,r){if(Ua(e))return e;var n=e[ne];if(!n)return ur(e,function(l,d){return Fl(t,n,e,l,d,r)},!0),e;if(n.A!==t)return e;if(!n.P)return gn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Ma(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),ur(a,function(l,d){return Fl(t,n,i,l,d,r,s)}),gn(t,i,!1),r&&t.u&&dt("Patches").N(n,r,t.u,t.s)}return n.o}function Fl(t,e,r,n,i,a,s){if(At(i)){var l=yn(t,i,a&&e&&e.i!==3&&!Mr(e.R,n)?a.concat(n):void 0);if(Wl(r,n,l),!At(l))return;t.m=!1}else s&&r.add(i);if(et(i)&&!Ua(i)){if(!t.h.D&&t._<1)return;yn(t,i),e&&e.A.l||gn(t,i)}}function gn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Ba(e,r)}function La(t,e){var r=t[ne];return(r?Ft(r):t)[e]}function Ml(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Mt(t){t.P||(t.P=!0,t.l&&Mt(t.l))}function Na(t){t.o||(t.o=Ma(t.t))}function ka(t,e,r){var n=$a(e)?dt("MapSet").F(e,r):Fa(e)?dt("MapSet").T(e,r):t.O?function(i,a){var s=Array.isArray(i),l={i:s?1:0,A:a?a.A:Ia(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},d=l,u=Mo;s&&(d=[l],u=$o);var h=Proxy.revocable(d,u),f=h.revoke,m=h.proxy;return l.k=m,l.j=f,m}(e,r):dt("ES5").J(e,r);return(r?r.A:Ia()).p.push(n),n}function Nu(t){return At(t)||Ze(22,t),function e(r){if(!et(r))return r;var n,i=r[ne],a=Ur(r);if(i){if(!i.P&&(i.i<4||!dt("ES5").K(i)))return i.t;i.I=!0,n=Bl(r,a),i.I=!1}else n=Bl(r,a);return ur(n,function(s,l){i&&Ru(i.t,s)===l||Wl(n,s,e(l))}),a===3?new Set(n):n}(t)}function Bl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ma(t)}function jl(){function t(s,l){var d=a[s];return d?d.enumerable=l:a[s]=d={configurable:!0,enumerable:l,get:function(){var u=this[ne];return Mo.get(u,s)},set:function(u){var h=this[ne];Mo.set(h,s,u)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][ne];if(!d.P)switch(d.i){case 5:n(d)&&Mt(d);break;case 4:r(d)&&Mt(d)}}}function r(s){for(var l=s.t,d=s.k,u=Br(d),h=u.length-1;h>=0;h--){var f=u[h];if(f!==ne){var m=l[f];if(m===void 0&&!Mr(l,f))return!0;var x=d[f],v=x&&x[ne];if(v?v.t!==m:!Vl(x,m))return!0}}var E=!!l[ne];return u.length!==Br(l).length+(E?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var u=0;u<l.length;u++)if(!l.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&Ze(3,JSON.stringify(Ft(s)))}var a={};_u("ES5",{J:function(s,l){var d=Array.isArray(s),u=function(f,m){if(f){for(var x=Array(m.length),v=0;v<m.length;v++)Object.defineProperty(x,""+v,t(v,!0));return x}var E=Kl(m);delete E[ne];for(var L=Br(E),T=0;T<L.length;T++){var k=L[T];E[k]=t(k,f||!!E[k].enumerable)}return Object.create(Object.getPrototypeOf(m),E)}(d,s),h={i:d?5:4,A:l?l.A:Ia(),P:!1,I:!1,R:{},l,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ne,{value:h,writable:!0}),u},S:function(s,l,d){d?At(l)&&l[ne].A===s&&e(s.p):(s.u&&function u(h){if(h&&typeof h=="object"){var f=h[ne];if(f){var m=f.t,x=f.k,v=f.R,E=f.i;if(E===4)ur(x,function(O){O!==ne&&(m[O]!==void 0||Mr(m,O)?v[O]||u(x[O]):(v[O]=!0,Mt(f)))}),ur(m,function(O){x[O]!==void 0||Mr(x,O)||(v[O]=!1,Mt(f))});else if(E===5){if(n(f)&&(Mt(f),v.length=!0),x.length<m.length)for(var L=x.length;L<m.length;L++)v[L]=!1;else for(var T=m.length;T<x.length;T++)v[T]=!0;for(var k=Math.min(x.length,m.length),w=0;w<k;w++)x.hasOwnProperty(w)||(v[w]=!0),v[w]===void 0&&u(x[w])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var Ul,Fo,za=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Iu=typeof Map<"u",Pu=typeof Set<"u",zl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Gl=za?Symbol.for("immer-nothing"):((Ul={})["immer-nothing"]=!0,Ul),Hl=za?Symbol.for("immer-draftable"):"__$immer_draftable",ne=za?Symbol.for("immer-state"):"__$immer_state";var ku=""+Object.prototype.constructor,Br=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Kl=Object.getOwnPropertyDescriptors||function(t){var e={};return Br(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},Da={},Mo={get:function(t,e){if(e===ne)return t;var r=Ft(t);if(!Mr(r,e))return function(i,a,s){var l,d=Ml(a,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!et(n)?n:n===La(t.t,e)?(Na(t),t.o[e]=ka(t.A.h,n,t)):n},has:function(t,e){return e in Ft(t)},ownKeys:function(t){return Reflect.ownKeys(Ft(t))},set:function(t,e,r){var n=Ml(Ft(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var i=La(Ft(t),e),a=i?.[ne];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Vl(r,i)&&(r!==void 0||Mr(t.t,e)))return!0;Na(t),Mt(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return La(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Na(t),Mt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Ft(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Ze(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ze(12)}},$o={};ur(Mo,function(t,e){$o[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),$o.deleteProperty=function(t,e){return $o.set.call(this,t,e,void 0)},$o.set=function(t,e,r){return Mo.set.call(this,t[0],e,r,t[0])};var Du=function(){function t(r){var n=this;this.O=zl,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var l=a;a=i;var d=n;return function(E){var L=this;E===void 0&&(E=l);for(var T=arguments.length,k=Array(T>1?T-1:0),w=1;w<T;w++)k[w-1]=arguments[w];return d.produce(E,function(O){var A;return(A=a).call.apply(A,[L,O].concat(k))})}}var u;if(typeof a!="function"&&Ze(6),s!==void 0&&typeof s!="function"&&Ze(7),et(i)){var h=$l(n),f=ka(n,i,void 0),m=!0;try{u=a(f),m=!1}finally{m?mn(h):Pa(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(E){return Ta(h,s),_a(E,h)},function(E){throw mn(h),E}):(Ta(h,s),_a(u,h))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===Gl&&(u=void 0),n.D&&Ba(u,!0),s){var x=[],v=[];dt("Patches").M(i,u,x,v),s(x,v)}return u}Ze(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var h=arguments.length,f=Array(h>1?h-1:0),m=1;m<h;m++)f[m-1]=arguments[m];return n.produceWithPatches(u,function(x){return i.apply(void 0,[x].concat(f))})};var s,l,d=n.produce(i,a,function(u,h){s=u,l=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(u){return[u,s,l]}):[d,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){et(r)||Ze(8),At(r)&&(r=Nu(r));var n=$l(this),i=ka(this,r,void 0);return i[ne].C=!0,Pa(n),i},e.finishDraft=function(r,n){var i=r&&r[ne],a=i.A;return Ta(a,n),_a(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!zl&&Ze(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var s=dt("Patches").$;return At(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},t}(),Ve=new Du,$u=Ve.produce,ex=Ve.produceWithPatches.bind(Ve),tx=Ve.setAutoFreeze.bind(Ve),rx=Ve.setUseProxies.bind(Ve),ox=Ve.applyPatches.bind(Ve),nx=Ve.createDraft.bind(Ve),ix=Ve.finishDraft.bind(Ve),bn=$u;function fr(t){"@babel/helpers - typeof";return fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(t)}function Zl(t,e){if(fr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(fr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ql(t){var e=Zl(t,"string");return fr(e)=="symbol"?e:e+""}function Yl(t,e,r){return(e=ql(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ql(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ha(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ql(Object(r),!0).forEach(function(n){Yl(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ql(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Re(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Xl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Wa=function(){return Math.random().toString(36).substring(7).split("").join(".")},xn={INIT:"@@redux/INIT"+Wa(),REPLACE:"@@redux/REPLACE"+Wa(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Wa()}};function Fu(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Va(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Re(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Re(1));return r(Va)(t,e)}if(typeof t!="function")throw new Error(Re(2));var i=t,a=e,s=[],l=s,d=!1;function u(){l===s&&(l=s.slice())}function h(){if(d)throw new Error(Re(3));return a}function f(E){if(typeof E!="function")throw new Error(Re(4));if(d)throw new Error(Re(5));var L=!0;return u(),l.push(E),function(){if(L){if(d)throw new Error(Re(6));L=!1,u();var k=l.indexOf(E);l.splice(k,1),s=null}}}function m(E){if(!Fu(E))throw new Error(Re(7));if(typeof E.type>"u")throw new Error(Re(8));if(d)throw new Error(Re(9));try{d=!0,a=i(a,E)}finally{d=!1}for(var L=s=l,T=0;T<L.length;T++){var k=L[T];k()}return E}function x(E){if(typeof E!="function")throw new Error(Re(10));i=E,m({type:xn.REPLACE})}function v(){var E,L=f;return E={subscribe:function(k){if(typeof k!="object"||k===null)throw new Error(Re(11));function w(){k.next&&k.next(h())}w();var O=L(w);return{unsubscribe:O}}},E[Xl]=function(){return this},E}return m({type:xn.INIT}),n={dispatch:m,subscribe:f,getState:h,replaceReducer:x},n[Xl]=v,n}function Mu(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:xn.INIT});if(typeof n>"u")throw new Error(Re(12));if(typeof r(void 0,{type:xn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Re(13))})}function Jl(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var a=Object.keys(r),s,l;try{Mu(r)}catch(d){l=d}return function(u,h){if(u===void 0&&(u={}),l)throw l;if(0)var f;for(var m=!1,x={},v=0;v<a.length;v++){var E=a[v],L=r[E],T=u[E],k=L(T,h);if(typeof k>"u"){var w=h&&h.type;throw new Error(Re(14))}x[E]=k,m=m||k!==T}return m=m||a.length!==Object.keys(u).length,m?x:u}}function zr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function ec(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Re(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return a=zr.apply(void 0,l)(i.dispatch),Ha(Ha({},i),{},{dispatch:a})}}}function tc(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(l){return typeof l=="function"?l(i,a,t):s(l)}}};return e}var rc=tc();rc.withExtraArgument=tc;var ja=rc;var sc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Bu=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(h){return d([u,h])}}function d(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(h){u=[6,h],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Hr=function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},Uu=Object.defineProperty,zu=Object.defineProperties,Hu=Object.getOwnPropertyDescriptors,oc=Object.getOwnPropertySymbols,Wu=Object.prototype.hasOwnProperty,Vu=Object.prototype.propertyIsEnumerable,nc=function(t,e,r){return e in t?Uu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Bt=function(t,e){for(var r in e||(e={}))Wu.call(e,r)&&nc(t,r,e[r]);if(oc)for(var n=0,i=oc(e);n<i.length;n++){var r=i[n];Vu.call(e,r)&&nc(t,r,e[r])}return t},Ga=function(t,e){return zu(t,Hu(e))},ju=function(t,e,r){return new Promise(function(n,i){var a=function(d){try{l(r.next(d))}catch(u){i(u)}},s=function(d){try{l(r.throw(d))}catch(u){i(u)}},l=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(a,s)};l((r=r.apply(t,e)).next())})};var Gu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?zr:zr.apply(null,arguments)},Cx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Ku(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var Zu=function(t){sc(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Hr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Hr([void 0],r.concat(this))))},e}(Array),qu=function(t){sc(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Hr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Hr([void 0],r.concat(this))))},e}(Array);function qa(t){return et(t)?bn(t,function(){}):t}function Yu(t){return typeof t=="boolean"}function Qu(){return function(e){return Xu(e)}}function Xu(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,l=new Zu;if(r&&(Yu(r)?l.push(ja):l.push(ja.withExtraArgument(r.extraArgument))),0){if(i)var d;if(s)var u}return l}var Ka=!0;function lc(t){var e=Qu(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,s=a===void 0?e():a,l=r.devTools,d=l===void 0?!0:l,u=r.preloadedState,h=u===void 0?void 0:u,f=r.enhancers,m=f===void 0?void 0:f,x;if(typeof i=="function")x=i;else if(Ku(i))x=Jl(i);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 v=s;if(typeof v=="function"&&(v=v(e),!Ka&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ka&&v.some(function(O){return typeof O!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=ec.apply(void 0,v),L=zr;d&&(L=Gu(Bt({trace:!Ka},typeof d=="object"&&d)));var T=new qu(E),k=T;Array.isArray(m)?k=Hr([E],m):typeof m=="function"&&(k=m(T));var w=L.apply(void 0,k);return Va(x,h,w)}function Ut(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Bt(Bt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}function cc(t){var e={},r=[],n,i={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,r,n]}function Ju(t){return typeof t=="function"}function ef(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?cc(e):[e,r,n],a=i[0],s=i[1],l=i[2],d;if(Ju(t))d=function(){return qa(t())};else{var u=qa(t);d=function(){return u}}function h(f,m){f===void 0&&(f=d());var x=Hr([a[m.type]],s.filter(function(v){var E=v.matcher;return E(m)}).map(function(v){var E=v.reducer;return E}));return x.filter(function(v){return!!v}).length===0&&(x=[l]),x.reduce(function(v,E){if(E)if(At(v)){var L=v,T=E(L,m);return T===void 0?v:T}else{if(et(v))return bn(v,function(k){return E(k,m)});var T=E(v,m);if(T===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}return v},f)}return h.getInitialState=d,h}function tf(t,e){return t+"/"+e}function dc(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:qa(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},l={};i.forEach(function(h){var f=n[h],m=tf(e,h),x,v;"reducer"in f?(x=f.reducer,v=f.prepare):x=f,a[h]=x,s[m]=x,l[h]=v?Ut(m,v):Ut(m)});function d(){var h=typeof t.extraReducers=="function"?cc(t.extraReducers):[t.extraReducers],f=h[0],m=f===void 0?{}:f,x=h[1],v=x===void 0?[]:x,E=h[2],L=E===void 0?void 0:E,T=Bt(Bt({},m),s);return ef(r,function(k){for(var w in T)k.addCase(w,T[w]);for(var O=0,A=v;O<A.length;O++){var F=A[O];k.addMatcher(F.matcher,F.reducer)}L&&k.addDefaultCase(L)})}var u;return{name:e,reducer:function(h,f){return u||(u=d()),u(h,f)},actions:l,caseReducers:a,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var rf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",of=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=rf[Math.random()*64|0];return e},nf=["name","message","stack","code"],Za=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),ic=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),af=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=nf;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},Rx=function(){function t(e,r,n){var i=Ut(e+"/fulfilled",function(h,f,m,x){return{payload:h,meta:Ga(Bt({},x||{}),{arg:m,requestId:f,requestStatus:"fulfilled"})}}),a=Ut(e+"/pending",function(h,f,m){return{payload:void 0,meta:Ga(Bt({},m||{}),{arg:f,requestId:h,requestStatus:"pending"})}}),s=Ut(e+"/rejected",function(h,f,m,x,v){return{payload:x,error:(n&&n.serializeError||af)(h||"Rejected"),meta:Ga(Bt({},v||{}),{arg:m,requestId:f,rejectedWithValue:!!x,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function u(h){return function(f,m,x){var v=n?.idGenerator?n.idGenerator(h):of(),E=new d,L,T=!1;function k(O){L=O,E.abort()}var w=function(){return ju(this,null,function(){var O,A,F,H,q,G,M;return Bu(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),H=(O=n?.condition)==null?void 0:O.call(n,h,{getState:m,extra:x}),lf(H)?[4,H]:[3,2];case 1:H=y.sent(),y.label=2;case 2:if(H===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=!0,q=new Promise(function(C,$){return E.signal.addEventListener("abort",function(){return $({name:"AbortError",message:L||"Aborted"})})}),f(a(v,h,(A=n?.getPendingMeta)==null?void 0:A.call(n,{requestId:v,arg:h},{getState:m,extra:x}))),[4,Promise.race([q,Promise.resolve(r(h,{dispatch:f,getState:m,extra:x,requestId:v,signal:E.signal,abort:k,rejectWithValue:function(C,$){return new Za(C,$)},fulfillWithValue:function(C,$){return new ic(C,$)}})).then(function(C){if(C instanceof Za)throw C;return C instanceof ic?i(C.payload,v,h,C.meta):i(C,v,h)})])];case 3:return F=y.sent(),[3,5];case 4:return G=y.sent(),F=G instanceof Za?s(null,v,h,G.payload,G.meta):s(G,v,h),[3,5];case 5:return M=n&&!n.dispatchConditionRejection&&s.match(F)&&F.meta.condition,M||f(F),[2,F]}})})}();return Object.assign(w,{abort:k,requestId:v,arg:h,unwrap:function(){return w.then(sf)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function sf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function lf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var pc="listener",uc="completed",fc="cancelled",Tx="task-"+fc,_x="task-"+uc,Lx=pc+"-"+fc,Nx=pc+"-"+uc;var Ya="listenerMiddleware";var Ix=Ut(Ya+"/add"),Px=Ut(Ya+"/removeAll"),kx=Ut(Ya+"/remove");var ac,Dx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(ac||(ac=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},cf=function(t){return function(e){setTimeout(e,t)}},$x=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:cf(10);jl();window.ftReduxStores||(window.ftReduxStores={});var Rt=class t extends bt{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(dr(a))return a;if(i==null)return;let s=dc({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),l=lc({reducer:(d,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...d,...u.overwrites}:s.reducer(d,u)});return window.ftReduxStores[i.name]=new t(s,l,i.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ko;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,l)=>{let d=s,u=a[d];return u?(...h)=>{let f=u(...h.map(i));return this.reduxStore.dispatch(f),f}:h=>{this.setState({[d]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function df(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))dr(e)&&e.clear()}var vn=class{constructor(e,r,n){this.store=e,this.valueSelector=r,this.callback=n}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);Pt(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function Wr(t,e,r){return new vn(t,e,r).watch()}var es={};X(es,{scrollHelper:()=>pf});var Xa,Sn=new Map,Ja=class{lock(e,r){if(r){let n=Sn.get(r);if(n==null||n===e)return Sn.set(r,e),r}}release(e,r){r&&Sn.get(r)===e&&Sn.delete(r)}findFirstScrollableParent(e){var r;let n,i;for(let a of Ci(e)){let s=a,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else l&&i==null&&(i=s)}return(r=n??i)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)}catch{return!1}}getAbsoluteScrollOffset(e,r){var n,i;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(n=r.offsetTop)!==null&&n!==void 0?n:0,r=r.offsetParent;return a+((i=r?.offsetTop)!==null&&i!==void 0?i:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let i=this.getAbsoluteScrollOffset(n,e),a=i-n.clientHeight+e.clientHeight,s=i,l=ar(0,(s-n.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,l)*(a-s)+s;n.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(Xa=window.FluidTopicsScrollHelper)!==null&&Xa!==void 0?Xa:new Ja;var pf=window.FluidTopicsScrollHelper;var ts={};X(ts,{SearchPlaceConverter:()=>Kr,SearchPlaceQueryParams:()=>te,isSearchPlaceQueryParams:()=>Uc,serializeRequest:()=>mf});var ff=ep(mc(),1);var yc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(yc||(yc={}));var gc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(gc||(gc={}));var jr;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.RESOURCE="RESOURCE"})(jr||(jr={}));var bc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(bc||(bc={}));var xc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(xc||(xc={}));var hr;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",t.GEN_AI__RATE="GEN_AI__RATE",t.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",t.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_CONTEXT_MENU="SEARCH_RESULT__OPEN_CONTEXT_MENU",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(hr||(hr={}));var vc;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(vc||(vc={}));var Sc;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(Sc||(Sc={}));var Oc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Oc||(Oc={}));var Cc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Cc||(Cc={}));var Ec;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Ec||(Ec={}));var wc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(wc||(wc={}));var Ac;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Ac||(Ac={}));var Rc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Rc||(Rc={}));var Tc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Tc||(Tc={}));var mr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(mr||(mr={}));var Ic=t=>Object.keys(mr).includes(t);var _c;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(_c||(_c={}));var Lc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Lc||(Lc={}));var Nc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Nc||(Nc={}));var Ht;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ht||(Ht={}));var Pc=t=>Object.keys(Ht).includes(t);var Wt;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Wt||(Wt={}));var Gr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Gr||(Gr={}));var ye;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ye||(ye={}));var kc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(kc||(kc={}));var Dc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Dc||(Dc={}));var $c;(function(t){t.TEXT="TEXT",t.HTML="HTML"})($c||($c={}));var uf={[ye.PERSONAL_BOOK_SHARE_USER]:[ye.PERSONAL_BOOK_USER],[ye.HTML_EXPORT_USER]:[ye.PERSONAL_BOOK_USER],[ye.PDF_EXPORT_USER]:[ye.PERSONAL_BOOK_USER],[ye.KHUB_ADMIN]:[ye.CONTENT_PUBLISHER],[ye.ADMIN]:[ye.KHUB_ADMIN,ye.USERS_ADMIN,ye.PORTAL_ADMIN],[ye.GENERATIVE_AI_EXPORT_USER]:[ye.GENERATIVE_AI_USER]};function Fc(t,e){return t===e||(uf[t]??[]).some(r=>Fc(r,e))}function Mc(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>Fc(n,e))}function hf(t){return`"${t}"`}function Bc(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function mf(t,e){return new Kr(t).serialize(e)}var te;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page"})(te||(te={}));var yf=new Set(Object.values(te));function Uc(t){return yf.has(t)}var Kr=class{constructor(e,r={},n=20,i=!1,a="en-US"){this.baseUrl=e,this.predefinedSorts=r,this.defaultPerPage=n,this.allLanguagesAllowed=i,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let n=r==null||r.trim().length===0,i=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return i.search=this.toURLSearchParams(e),i.toString()}toURLSearchParams(e,r=!1){var n,i,a,s,l,d,u,h,f,m,x,v;let E=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&E.append(te.LOCALE,e.contentLocale):E.append(te.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&E.append(te.QUERY,e.query);let L=(a=(i=e.metadataFilters)===null||i===void 0?void 0:i.filter(O=>O.valueFilter))!==null&&a!==void 0?a:[];if(L.length>0){let O=L.map(A=>{var F,H;let q=((H=(F=A.valueFilter)===null||F===void 0?void 0:F.values)!==null&&H!==void 0?H:[]).map(G=>this.escapeFilters(G)).map(G=>hf(Bc(G))).join("_");return`${A.key}~${q}`}).join("*");E.append(te.VALUE_FILTERS,O)}let T=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(O=>O.dateFilter))!==null&&l!==void 0?l:[];if(T.length>0){let O=T.map(A=>{var F;return`${A.key}~${(F=A.dateFilter)===null||F===void 0?void 0:F.type.toLowerCase()}`}).join("*");E.append(te.DATE_FILTERS,O)}let k=(u=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(O=>O.rangeFilter))!==null&&u!==void 0?u:[];if(k.length>0){let O=k.map(A=>{var F,H;return`${A.key}~${(F=A.rangeFilter)===null||F===void 0?void 0:F.from}_${(H=A.rangeFilter)===null||H===void 0?void 0:H.to}`}).join("*");E.append(te.RANGE_FILTERS,O)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&E.append(te.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&E.append(te.SCOPE,e.scope.toLowerCase()),((h=e.sort)===null||h===void 0?void 0:h.length)>0&&e.sort[0].key==="ft:lastEdition"&&E.append(te.SORT,"last_update"),!((f=e.paging)===null||f===void 0)&&f.perPage&&((x=(m=e.paging)===null||m===void 0?void 0:m.perPage)!==null&&x!==void 0?x:this.defaultPerPage)!=this.defaultPerPage&&E.append(te.PER_PAGE,String(e.paging.perPage));let w=(v=e.otherQueryParams)!==null&&v!==void 0?v:{};for(let O in w)E.append(O,w[O]);return encodeURI(E.toString()).replace(/#/g,"%23")}parse(e){var r;let n=e.split("?"),i=this.fromURLSearchParams(n.slice(1).join("?")),a=n[0].split("/search/")[1];return a==null?i:{...i,scope:(r=this.scopeMapping[a])!==null&&r!==void 0?r:i.scope}}fromURLSearchParams(e){var r,n,i,a,s,l,d,u;try{e=decodeURI(e).replace(/%23/g,"#")}catch(T){console.warn("Could not decode search request query params, fallback on raw value",T)}let h=new URLSearchParams(e),f=h.get(te.LOCALE)==="all"?void 0:h.get(te.LOCALE),m=((r=h.get(te.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),x=((n=h.get(te.SORT))!==null&&n!==void 0?n:"DEFAULT").toUpperCase(),v=(i=h.get(te.SCOPE))!==null&&i!==void 0?i:"default",E=+((a=h.get(te.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),L={};for(let T of h.keys())Uc(T)||(L[T]=h.get(T));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=h.get(te.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[v])!==null&&l!==void 0?l:"DEFAULT",virtualField:Ic(m)?m:"EVERYWHERE",sort:(u=(d=this.predefinedSorts[x])!==null&&d!==void 0?d:this.predefinedSorts.DEFAULT)!==null&&u!==void 0?u:[],metadataFilters:this.parseCompatFilters(h),facets:[],paging:{page:1,perPage:ar(1,isNaN(E)?this.defaultPerPage:E,1e3)},otherQueryParams:L}}parseCompatFilters(e){var r,n,i,a,s,l;let d=[];return e.has(te.FILTERS)&&(d=this.parseValueFilters((r=e.get(te.FILTERS))!==null&&r!==void 0?r:"")),(n=e.has(te.PERIOD))!==null&&n!==void 0&&n&&(d=[...d,...this.parseLegacyPeriodFilter(((i=e.get(te.PERIOD))!==null&&i!==void 0?i:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(te.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(te.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(te.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(Bc).map(n=>this.unescapeFilterValue(n)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Ht[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(r,n);return e}superEscapeFilters(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(n,i);return e}unescapeFilterValue(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replace(i,r);return e}parseLegacyPeriodFilter(e){if(Pc(e))return[{key:"ft:lastEdition",dateFilter:{type:Ht[e]}}];if(e.startsWith("CUSTOM_")){let[r,n,i]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:i}}]}return[]}};var ns={};X(ns,{toFtFormComponent:()=>os});var rs=Symbol("elementInternals");function os(t){class e extends t{static get formAssociated(){return!0}get form(){return this[rs].form}constructor(...n){super(n),this[rs]=this.attachInternals()}setFormValue(n){this[rs].setFormValue(n)}}return e}var is={};X(is,{DateFormatter:()=>yr});var yr=class{static format(e,r,n,i){return window.moment?window.moment(e).locale(r).format(this.getDateFormat(n,i)):e}static getDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}};var ss={};X(ss,{ALL_KEYS_VALUE:()=>as,SameWindowStorageEvent:()=>Zr});var as="__all__",Zr=class extends CustomEvent{constructor(e,r,n){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==as}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Zr(r[0],n,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Zr(r[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new Zr(as))}});var ls={};X(ls,{FocusMainContentEvent:()=>Bo});var Bo=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var zc={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1};function gf(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0)}function bf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",gf);document.addEventListener("click",bf);var cs,ds,ps,us,gr=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((ps=(ds=(cs=window.safari)===null||cs===void 0?void 0:cs.pushNotification)===null||ds===void 0?void 0:ds.toString())!==null&&ps!==void 0?ps:"")==="[object SafariRemoteNotification]",xf="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(us=window.ftGlobals)!==null&&us!==void 0?us:{lit:ni,litDecorators:li,litRepeat:ci,litClassMap:di,litStyleMap:pi,litUnsafeHTML:fi,wcUtils:{...xi,...hi,...Si,...is,...Oi,...wi,...ea,...bi,...ma,...ls,...zc,...es,...Ji,...Sa,...ns,...va,...Ll,...Ei,...Ea,...Aa,...Il,...Ra,...Qa,...ss,...ya,...xa,...ts,isSafari:gr,isTouchScreen:xf,setVariable:S}};var vf={spacing:o.create("--ft-search-selected-facets-spacing","","SIZE","8px")},Hc=I`
48
+ `;var Il={};var Ra={};X(Ra,{ParametrizedLabelResolver:()=>Po});var Po=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var n,i;e=this.resolvePluralKey(e,r);let a=(i=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((n,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,r){for(let n of r)if(typeof n=="number"){let i=`${String(e)}[\\=${n}]`;if(i in this.labels||i in this.defaultLabels)return i}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let n=i=>r?.includes("date")?e.toLocaleDateString(i):r?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return n(document.documentElement.lang)}catch{return n()}}};var Qa={};X(Qa,{FtCommandQueue:()=>ko,FtLitElementRedux:()=>Ke,FtReduxStore:()=>Rt,ReduxWatcher:()=>vn,clearAllStores:()=>df,isFtReduxStore:()=>dr,redux:()=>de,reduxEventListener:()=>Au,reduxReactive:()=>wu,watch:()=>Wr});var wu=()=>(t,e)=>{var r;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(r=n.reduxReactiveProperties)===null||r===void 0||r.add(e)},de=t=>{let e=t??{};return(r,n)=>{var i;let a={hasChanged:Pt,attribute:!1,...e};g(a)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:l=>l[n],store:e.store})}},Au=t=>(e,r)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(r,t)};var ko=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function dr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Pl,kl,Dl,Do=Symbol("internalReduxEventsUnsubscribers"),$t=Symbol("internalStoresUnsubscribers"),pr=Symbol("internalStores"),Ke=class extends z{constructor(){super(...arguments),this[Pl]=new Map,this[kl]=new Map,this[Dl]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(r=>e.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[pr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[pr].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[pr].get(e)}addStore(e,r){var n;r=(n=r??(dr(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this[pr].set(r,e),this.subscribeToStore(r,e),this.updateFromStores()}removeStore(e){let r=typeof e=="string"?e:e.name;this.unsubscribeFromStore(r),this[pr].delete(r)}setupStores(){this.unsubscribeFromStores(),this[pr].forEach((e,r)=>this.subscribeToStore(r,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let i=this.getStore(e.store);i&&(e.store?this[$t].has(e.store):this[$t].size>0)&&(this[r]=e.selector(i.getState(),this))}})}subscribeToStore(e,r){var n;this[$t].set(e,r.subscribe(()=>this.updateFromStores())),this[Do].set(e,[]),dr(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||r.name===i.store)){let s=l=>this[a](l);r.addEventListener(i.eventName,s),this[Do].get(e).push(()=>r.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[$t].forEach((e,r)=>this.unsubscribeFromStore(r))}unsubscribeFromStore(e){var r;this[$t].has(e)&&this[$t].get(e)(),this[$t].delete(e),(r=this[Do].get(e))===null||r===void 0||r.forEach(n=>n()),this[Do].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Pl=$t,kl=pr,Dl=Do;Ke.reduxProperties=new Map;Ke.reduxReactiveProperties=new Set;Ke.reduxEventListeners=new Map;function Ze(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function At(t){return!!t&&!!t[ne]}function et(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ku}(t)||Array.isArray(t)||!!t[Hl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Hl])||$a(t)||Fa(t))}function ur(t,e,r){r===void 0&&(r=!1),Ur(t)===0?(r?Object.keys:Br)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Ur(t){var e=t[ne];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:$a(t)?2:Fa(t)?3:0}function Mr(t,e){return Ur(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ru(t,e){return Ur(t)===2?t.get(e):t[e]}function Wl(t,e,r){var n=Ur(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function Vl(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function $a(t){return Iu&&t instanceof Map}function Fa(t){return Pu&&t instanceof Set}function Ft(t){return t.o||t.t}function Ma(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Kl(t);delete e[ne];for(var r=Br(e),n=0;n<r.length;n++){var i=r[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Ba(t,e){return e===void 0&&(e=!1),Ua(t)||At(t)||!et(t)||(Ur(t)>1&&(t.set=t.add=t.clear=t.delete=Tu),Object.freeze(t),e&&ur(t,function(r,n){return Ba(n,!0)},!0)),t}function Tu(){Ze(2)}function Ua(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function dt(t){var e=Da[t];return e||Ze(18,t),e}function _u(t,e){Da[t]||(Da[t]=e)}function Ia(){return Fo}function Ta(t,e){e&&(dt("Patches"),t.u=[],t.s=[],t.v=e)}function mn(t){Pa(t),t.p.forEach(Lu),t.p=null}function Pa(t){t===Fo&&(Fo=t.l)}function $l(t){return Fo={p:[],l:Fo,h:t,m:!0,_:0}}function Lu(t){var e=t[ne];e.i===0||e.i===1?e.j():e.g=!0}function _a(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||dt("ES5").S(e,t,n),n?(r[ne].P&&(mn(e),Ze(4)),et(t)&&(t=yn(e,t),e.l||gn(e,t)),e.u&&dt("Patches").M(r[ne].t,t,e.u,e.s)):t=yn(e,r,[]),mn(e),e.u&&e.v(e.u,e.s),t!==Gl?t:void 0}function yn(t,e,r){if(Ua(e))return e;var n=e[ne];if(!n)return ur(e,function(l,d){return Fl(t,n,e,l,d,r)},!0),e;if(n.A!==t)return e;if(!n.P)return gn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Ma(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),ur(a,function(l,d){return Fl(t,n,i,l,d,r,s)}),gn(t,i,!1),r&&t.u&&dt("Patches").N(n,r,t.u,t.s)}return n.o}function Fl(t,e,r,n,i,a,s){if(At(i)){var l=yn(t,i,a&&e&&e.i!==3&&!Mr(e.R,n)?a.concat(n):void 0);if(Wl(r,n,l),!At(l))return;t.m=!1}else s&&r.add(i);if(et(i)&&!Ua(i)){if(!t.h.D&&t._<1)return;yn(t,i),e&&e.A.l||gn(t,i)}}function gn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Ba(e,r)}function La(t,e){var r=t[ne];return(r?Ft(r):t)[e]}function Ml(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Mt(t){t.P||(t.P=!0,t.l&&Mt(t.l))}function Na(t){t.o||(t.o=Ma(t.t))}function ka(t,e,r){var n=$a(e)?dt("MapSet").F(e,r):Fa(e)?dt("MapSet").T(e,r):t.O?function(i,a){var s=Array.isArray(i),l={i:s?1:0,A:a?a.A:Ia(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},d=l,u=Mo;s&&(d=[l],u=$o);var h=Proxy.revocable(d,u),f=h.revoke,m=h.proxy;return l.k=m,l.j=f,m}(e,r):dt("ES5").J(e,r);return(r?r.A:Ia()).p.push(n),n}function Nu(t){return At(t)||Ze(22,t),function e(r){if(!et(r))return r;var n,i=r[ne],a=Ur(r);if(i){if(!i.P&&(i.i<4||!dt("ES5").K(i)))return i.t;i.I=!0,n=Bl(r,a),i.I=!1}else n=Bl(r,a);return ur(n,function(s,l){i&&Ru(i.t,s)===l||Wl(n,s,e(l))}),a===3?new Set(n):n}(t)}function Bl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ma(t)}function jl(){function t(s,l){var d=a[s];return d?d.enumerable=l:a[s]=d={configurable:!0,enumerable:l,get:function(){var u=this[ne];return Mo.get(u,s)},set:function(u){var h=this[ne];Mo.set(h,s,u)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][ne];if(!d.P)switch(d.i){case 5:n(d)&&Mt(d);break;case 4:r(d)&&Mt(d)}}}function r(s){for(var l=s.t,d=s.k,u=Br(d),h=u.length-1;h>=0;h--){var f=u[h];if(f!==ne){var m=l[f];if(m===void 0&&!Mr(l,f))return!0;var x=d[f],v=x&&x[ne];if(v?v.t!==m:!Vl(x,m))return!0}}var E=!!l[ne];return u.length!==Br(l).length+(E?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var u=0;u<l.length;u++)if(!l.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&Ze(3,JSON.stringify(Ft(s)))}var a={};_u("ES5",{J:function(s,l){var d=Array.isArray(s),u=function(f,m){if(f){for(var x=Array(m.length),v=0;v<m.length;v++)Object.defineProperty(x,""+v,t(v,!0));return x}var E=Kl(m);delete E[ne];for(var L=Br(E),T=0;T<L.length;T++){var k=L[T];E[k]=t(k,f||!!E[k].enumerable)}return Object.create(Object.getPrototypeOf(m),E)}(d,s),h={i:d?5:4,A:l?l.A:Ia(),P:!1,I:!1,R:{},l,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ne,{value:h,writable:!0}),u},S:function(s,l,d){d?At(l)&&l[ne].A===s&&e(s.p):(s.u&&function u(h){if(h&&typeof h=="object"){var f=h[ne];if(f){var m=f.t,x=f.k,v=f.R,E=f.i;if(E===4)ur(x,function(O){O!==ne&&(m[O]!==void 0||Mr(m,O)?v[O]||u(x[O]):(v[O]=!0,Mt(f)))}),ur(m,function(O){x[O]!==void 0||Mr(x,O)||(v[O]=!1,Mt(f))});else if(E===5){if(n(f)&&(Mt(f),v.length=!0),x.length<m.length)for(var L=x.length;L<m.length;L++)v[L]=!1;else for(var T=m.length;T<x.length;T++)v[T]=!0;for(var k=Math.min(x.length,m.length),w=0;w<k;w++)x.hasOwnProperty(w)||(v[w]=!0),v[w]===void 0&&u(x[w])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var Ul,Fo,za=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Iu=typeof Map<"u",Pu=typeof Set<"u",zl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Gl=za?Symbol.for("immer-nothing"):((Ul={})["immer-nothing"]=!0,Ul),Hl=za?Symbol.for("immer-draftable"):"__$immer_draftable",ne=za?Symbol.for("immer-state"):"__$immer_state";var ku=""+Object.prototype.constructor,Br=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Kl=Object.getOwnPropertyDescriptors||function(t){var e={};return Br(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},Da={},Mo={get:function(t,e){if(e===ne)return t;var r=Ft(t);if(!Mr(r,e))return function(i,a,s){var l,d=Ml(a,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!et(n)?n:n===La(t.t,e)?(Na(t),t.o[e]=ka(t.A.h,n,t)):n},has:function(t,e){return e in Ft(t)},ownKeys:function(t){return Reflect.ownKeys(Ft(t))},set:function(t,e,r){var n=Ml(Ft(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var i=La(Ft(t),e),a=i?.[ne];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Vl(r,i)&&(r!==void 0||Mr(t.t,e)))return!0;Na(t),Mt(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return La(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Na(t),Mt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Ft(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Ze(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ze(12)}},$o={};ur(Mo,function(t,e){$o[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),$o.deleteProperty=function(t,e){return $o.set.call(this,t,e,void 0)},$o.set=function(t,e,r){return Mo.set.call(this,t[0],e,r,t[0])};var Du=function(){function t(r){var n=this;this.O=zl,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var l=a;a=i;var d=n;return function(E){var L=this;E===void 0&&(E=l);for(var T=arguments.length,k=Array(T>1?T-1:0),w=1;w<T;w++)k[w-1]=arguments[w];return d.produce(E,function(O){var A;return(A=a).call.apply(A,[L,O].concat(k))})}}var u;if(typeof a!="function"&&Ze(6),s!==void 0&&typeof s!="function"&&Ze(7),et(i)){var h=$l(n),f=ka(n,i,void 0),m=!0;try{u=a(f),m=!1}finally{m?mn(h):Pa(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(E){return Ta(h,s),_a(E,h)},function(E){throw mn(h),E}):(Ta(h,s),_a(u,h))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===Gl&&(u=void 0),n.D&&Ba(u,!0),s){var x=[],v=[];dt("Patches").M(i,u,x,v),s(x,v)}return u}Ze(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var h=arguments.length,f=Array(h>1?h-1:0),m=1;m<h;m++)f[m-1]=arguments[m];return n.produceWithPatches(u,function(x){return i.apply(void 0,[x].concat(f))})};var s,l,d=n.produce(i,a,function(u,h){s=u,l=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(u){return[u,s,l]}):[d,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){et(r)||Ze(8),At(r)&&(r=Nu(r));var n=$l(this),i=ka(this,r,void 0);return i[ne].C=!0,Pa(n),i},e.finishDraft=function(r,n){var i=r&&r[ne],a=i.A;return Ta(a,n),_a(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!zl&&Ze(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var s=dt("Patches").$;return At(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},t}(),Ve=new Du,$u=Ve.produce,ex=Ve.produceWithPatches.bind(Ve),tx=Ve.setAutoFreeze.bind(Ve),rx=Ve.setUseProxies.bind(Ve),ox=Ve.applyPatches.bind(Ve),nx=Ve.createDraft.bind(Ve),ix=Ve.finishDraft.bind(Ve),bn=$u;function fr(t){"@babel/helpers - typeof";return fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(t)}function Zl(t,e){if(fr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(fr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ql(t){var e=Zl(t,"string");return fr(e)=="symbol"?e:e+""}function Yl(t,e,r){return(e=ql(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ql(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ha(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ql(Object(r),!0).forEach(function(n){Yl(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ql(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Re(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Xl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Wa=function(){return Math.random().toString(36).substring(7).split("").join(".")},xn={INIT:"@@redux/INIT"+Wa(),REPLACE:"@@redux/REPLACE"+Wa(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Wa()}};function Fu(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Va(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Re(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Re(1));return r(Va)(t,e)}if(typeof t!="function")throw new Error(Re(2));var i=t,a=e,s=[],l=s,d=!1;function u(){l===s&&(l=s.slice())}function h(){if(d)throw new Error(Re(3));return a}function f(E){if(typeof E!="function")throw new Error(Re(4));if(d)throw new Error(Re(5));var L=!0;return u(),l.push(E),function(){if(L){if(d)throw new Error(Re(6));L=!1,u();var k=l.indexOf(E);l.splice(k,1),s=null}}}function m(E){if(!Fu(E))throw new Error(Re(7));if(typeof E.type>"u")throw new Error(Re(8));if(d)throw new Error(Re(9));try{d=!0,a=i(a,E)}finally{d=!1}for(var L=s=l,T=0;T<L.length;T++){var k=L[T];k()}return E}function x(E){if(typeof E!="function")throw new Error(Re(10));i=E,m({type:xn.REPLACE})}function v(){var E,L=f;return E={subscribe:function(k){if(typeof k!="object"||k===null)throw new Error(Re(11));function w(){k.next&&k.next(h())}w();var O=L(w);return{unsubscribe:O}}},E[Xl]=function(){return this},E}return m({type:xn.INIT}),n={dispatch:m,subscribe:f,getState:h,replaceReducer:x},n[Xl]=v,n}function Mu(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:xn.INIT});if(typeof n>"u")throw new Error(Re(12));if(typeof r(void 0,{type:xn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Re(13))})}function Jl(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var a=Object.keys(r),s,l;try{Mu(r)}catch(d){l=d}return function(u,h){if(u===void 0&&(u={}),l)throw l;if(0)var f;for(var m=!1,x={},v=0;v<a.length;v++){var E=a[v],L=r[E],T=u[E],k=L(T,h);if(typeof k>"u"){var w=h&&h.type;throw new Error(Re(14))}x[E]=k,m=m||k!==T}return m=m||a.length!==Object.keys(u).length,m?x:u}}function zr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function ec(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Re(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return a=zr.apply(void 0,l)(i.dispatch),Ha(Ha({},i),{},{dispatch:a})}}}function tc(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(l){return typeof l=="function"?l(i,a,t):s(l)}}};return e}var rc=tc();rc.withExtraArgument=tc;var ja=rc;var sc=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Bu=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(h){return d([u,h])}}function d(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(h){u=[6,h],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Hr=function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},Uu=Object.defineProperty,zu=Object.defineProperties,Hu=Object.getOwnPropertyDescriptors,oc=Object.getOwnPropertySymbols,Wu=Object.prototype.hasOwnProperty,Vu=Object.prototype.propertyIsEnumerable,nc=function(t,e,r){return e in t?Uu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Bt=function(t,e){for(var r in e||(e={}))Wu.call(e,r)&&nc(t,r,e[r]);if(oc)for(var n=0,i=oc(e);n<i.length;n++){var r=i[n];Vu.call(e,r)&&nc(t,r,e[r])}return t},Ga=function(t,e){return zu(t,Hu(e))},ju=function(t,e,r){return new Promise(function(n,i){var a=function(d){try{l(r.next(d))}catch(u){i(u)}},s=function(d){try{l(r.throw(d))}catch(u){i(u)}},l=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(a,s)};l((r=r.apply(t,e)).next())})};var Gu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?zr:zr.apply(null,arguments)},Cx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Ku(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var Zu=function(t){sc(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Hr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Hr([void 0],r.concat(this))))},e}(Array),qu=function(t){sc(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Hr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Hr([void 0],r.concat(this))))},e}(Array);function qa(t){return et(t)?bn(t,function(){}):t}function Yu(t){return typeof t=="boolean"}function Qu(){return function(e){return Xu(e)}}function Xu(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,l=new Zu;if(r&&(Yu(r)?l.push(ja):l.push(ja.withExtraArgument(r.extraArgument))),0){if(i)var d;if(s)var u}return l}var Ka=!0;function lc(t){var e=Qu(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,s=a===void 0?e():a,l=r.devTools,d=l===void 0?!0:l,u=r.preloadedState,h=u===void 0?void 0:u,f=r.enhancers,m=f===void 0?void 0:f,x;if(typeof i=="function")x=i;else if(Ku(i))x=Jl(i);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 v=s;if(typeof v=="function"&&(v=v(e),!Ka&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ka&&v.some(function(O){return typeof O!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=ec.apply(void 0,v),L=zr;d&&(L=Gu(Bt({trace:!Ka},typeof d=="object"&&d)));var T=new qu(E),k=T;Array.isArray(m)?k=Hr([E],m):typeof m=="function"&&(k=m(T));var w=L.apply(void 0,k);return Va(x,h,w)}function Ut(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Bt(Bt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}function cc(t){var e={},r=[],n,i={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,r,n]}function Ju(t){return typeof t=="function"}function ef(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?cc(e):[e,r,n],a=i[0],s=i[1],l=i[2],d;if(Ju(t))d=function(){return qa(t())};else{var u=qa(t);d=function(){return u}}function h(f,m){f===void 0&&(f=d());var x=Hr([a[m.type]],s.filter(function(v){var E=v.matcher;return E(m)}).map(function(v){var E=v.reducer;return E}));return x.filter(function(v){return!!v}).length===0&&(x=[l]),x.reduce(function(v,E){if(E)if(At(v)){var L=v,T=E(L,m);return T===void 0?v:T}else{if(et(v))return bn(v,function(k){return E(k,m)});var T=E(v,m);if(T===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}return v},f)}return h.getInitialState=d,h}function tf(t,e){return t+"/"+e}function dc(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:qa(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},l={};i.forEach(function(h){var f=n[h],m=tf(e,h),x,v;"reducer"in f?(x=f.reducer,v=f.prepare):x=f,a[h]=x,s[m]=x,l[h]=v?Ut(m,v):Ut(m)});function d(){var h=typeof t.extraReducers=="function"?cc(t.extraReducers):[t.extraReducers],f=h[0],m=f===void 0?{}:f,x=h[1],v=x===void 0?[]:x,E=h[2],L=E===void 0?void 0:E,T=Bt(Bt({},m),s);return ef(r,function(k){for(var w in T)k.addCase(w,T[w]);for(var O=0,A=v;O<A.length;O++){var F=A[O];k.addMatcher(F.matcher,F.reducer)}L&&k.addDefaultCase(L)})}var u;return{name:e,reducer:function(h,f){return u||(u=d()),u(h,f)},actions:l,caseReducers:a,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var rf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",of=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=rf[Math.random()*64|0];return e},nf=["name","message","stack","code"],Za=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),ic=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),af=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=nf;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},Rx=function(){function t(e,r,n){var i=Ut(e+"/fulfilled",function(h,f,m,x){return{payload:h,meta:Ga(Bt({},x||{}),{arg:m,requestId:f,requestStatus:"fulfilled"})}}),a=Ut(e+"/pending",function(h,f,m){return{payload:void 0,meta:Ga(Bt({},m||{}),{arg:f,requestId:h,requestStatus:"pending"})}}),s=Ut(e+"/rejected",function(h,f,m,x,v){return{payload:x,error:(n&&n.serializeError||af)(h||"Rejected"),meta:Ga(Bt({},v||{}),{arg:m,requestId:f,rejectedWithValue:!!x,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function u(h){return function(f,m,x){var v=n?.idGenerator?n.idGenerator(h):of(),E=new d,L,T=!1;function k(O){L=O,E.abort()}var w=function(){return ju(this,null,function(){var O,A,F,H,q,G,M;return Bu(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),H=(O=n?.condition)==null?void 0:O.call(n,h,{getState:m,extra:x}),lf(H)?[4,H]:[3,2];case 1:H=y.sent(),y.label=2;case 2:if(H===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=!0,q=new Promise(function(C,$){return E.signal.addEventListener("abort",function(){return $({name:"AbortError",message:L||"Aborted"})})}),f(a(v,h,(A=n?.getPendingMeta)==null?void 0:A.call(n,{requestId:v,arg:h},{getState:m,extra:x}))),[4,Promise.race([q,Promise.resolve(r(h,{dispatch:f,getState:m,extra:x,requestId:v,signal:E.signal,abort:k,rejectWithValue:function(C,$){return new Za(C,$)},fulfillWithValue:function(C,$){return new ic(C,$)}})).then(function(C){if(C instanceof Za)throw C;return C instanceof ic?i(C.payload,v,h,C.meta):i(C,v,h)})])];case 3:return F=y.sent(),[3,5];case 4:return G=y.sent(),F=G instanceof Za?s(null,v,h,G.payload,G.meta):s(G,v,h),[3,5];case 5:return M=n&&!n.dispatchConditionRejection&&s.match(F)&&F.meta.condition,M||f(F),[2,F]}})})}();return Object.assign(w,{abort:k,requestId:v,arg:h,unwrap:function(){return w.then(sf)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function sf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function lf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var pc="listener",uc="completed",fc="cancelled",Tx="task-"+fc,_x="task-"+uc,Lx=pc+"-"+fc,Nx=pc+"-"+uc;var Ya="listenerMiddleware";var Ix=Ut(Ya+"/add"),Px=Ut(Ya+"/removeAll"),kx=Ut(Ya+"/remove");var ac,Dx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(ac||(ac=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},cf=function(t){return function(e){setTimeout(e,t)}},$x=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:cf(10);jl();window.ftReduxStores||(window.ftReduxStores={});var Rt=class t extends bt{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(dr(a))return a;if(i==null)return;let s=dc({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),l=lc({reducer:(d,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...d,...u.overwrites}:s.reducer(d,u)});return window.ftReduxStores[i.name]=new t(s,l,i.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ko;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,l)=>{let d=s,u=a[d];return u?(...h)=>{let f=u(...h.map(i));return this.reduxStore.dispatch(f),f}:h=>{this.setState({[d]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function df(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))dr(e)&&e.clear()}var vn=class{constructor(e,r,n){this.store=e,this.valueSelector=r,this.callback=n}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);Pt(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function Wr(t,e,r){return new vn(t,e,r).watch()}var es={};X(es,{scrollHelper:()=>pf});var Xa,Sn=new Map,Ja=class{lock(e,r){if(r){let n=Sn.get(r);if(n==null||n===e)return Sn.set(r,e),r}}release(e,r){r&&Sn.get(r)===e&&Sn.delete(r)}findFirstScrollableParent(e){var r;let n,i;for(let a of Ci(e)){let s=a,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else l&&i==null&&(i=s)}return(r=n??i)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)}catch{return!1}}getAbsoluteScrollOffset(e,r){var n,i;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(n=r.offsetTop)!==null&&n!==void 0?n:0,r=r.offsetParent;return a+((i=r?.offsetTop)!==null&&i!==void 0?i:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let i=this.getAbsoluteScrollOffset(n,e),a=i-n.clientHeight+e.clientHeight,s=i,l=ar(0,(s-n.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,l)*(a-s)+s;n.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(Xa=window.FluidTopicsScrollHelper)!==null&&Xa!==void 0?Xa:new Ja;var pf=window.FluidTopicsScrollHelper;var ts={};X(ts,{SearchPlaceConverter:()=>Kr,SearchPlaceQueryParams:()=>te,isSearchPlaceQueryParams:()=>Uc,serializeRequest:()=>mf});var ff=ep(mc(),1);var yc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(yc||(yc={}));var gc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(gc||(gc={}));var jr;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.RESOURCE="RESOURCE"})(jr||(jr={}));var bc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(bc||(bc={}));var xc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(xc||(xc={}));var hr;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",t.GEN_AI__RATE="GEN_AI__RATE",t.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",t.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(hr||(hr={}));var vc;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(vc||(vc={}));var Sc;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(Sc||(Sc={}));var Oc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Oc||(Oc={}));var Cc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Cc||(Cc={}));var Ec;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Ec||(Ec={}));var wc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(wc||(wc={}));var Ac;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Ac||(Ac={}));var Rc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Rc||(Rc={}));var Tc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Tc||(Tc={}));var mr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(mr||(mr={}));var Ic=t=>Object.keys(mr).includes(t);var _c;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(_c||(_c={}));var Lc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Lc||(Lc={}));var Nc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Nc||(Nc={}));var Ht;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ht||(Ht={}));var Pc=t=>Object.keys(Ht).includes(t);var Wt;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Wt||(Wt={}));var Gr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Gr||(Gr={}));var ye;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ye||(ye={}));var kc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(kc||(kc={}));var Dc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Dc||(Dc={}));var $c;(function(t){t.TEXT="TEXT",t.HTML="HTML"})($c||($c={}));var uf={[ye.PERSONAL_BOOK_SHARE_USER]:[ye.PERSONAL_BOOK_USER],[ye.HTML_EXPORT_USER]:[ye.PERSONAL_BOOK_USER],[ye.PDF_EXPORT_USER]:[ye.PERSONAL_BOOK_USER],[ye.KHUB_ADMIN]:[ye.CONTENT_PUBLISHER],[ye.ADMIN]:[ye.KHUB_ADMIN,ye.USERS_ADMIN,ye.PORTAL_ADMIN],[ye.GENERATIVE_AI_EXPORT_USER]:[ye.GENERATIVE_AI_USER]};function Fc(t,e){return t===e||(uf[t]??[]).some(r=>Fc(r,e))}function Mc(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>Fc(n,e))}function hf(t){return`"${t}"`}function Bc(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function mf(t,e){return new Kr(t).serialize(e)}var te;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page"})(te||(te={}));var yf=new Set(Object.values(te));function Uc(t){return yf.has(t)}var Kr=class{constructor(e,r={},n=20,i=!1,a="en-US"){this.baseUrl=e,this.predefinedSorts=r,this.defaultPerPage=n,this.allLanguagesAllowed=i,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let n=r==null||r.trim().length===0,i=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return i.search=this.toURLSearchParams(e),i.toString()}toURLSearchParams(e,r=!1){var n,i,a,s,l,d,u,h,f,m,x,v;let E=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&E.append(te.LOCALE,e.contentLocale):E.append(te.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&E.append(te.QUERY,e.query);let L=(a=(i=e.metadataFilters)===null||i===void 0?void 0:i.filter(O=>O.valueFilter))!==null&&a!==void 0?a:[];if(L.length>0){let O=L.map(A=>{var F,H;let q=((H=(F=A.valueFilter)===null||F===void 0?void 0:F.values)!==null&&H!==void 0?H:[]).map(G=>this.escapeFilters(G)).map(G=>hf(Bc(G))).join("_");return`${A.key}~${q}`}).join("*");E.append(te.VALUE_FILTERS,O)}let T=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(O=>O.dateFilter))!==null&&l!==void 0?l:[];if(T.length>0){let O=T.map(A=>{var F;return`${A.key}~${(F=A.dateFilter)===null||F===void 0?void 0:F.type.toLowerCase()}`}).join("*");E.append(te.DATE_FILTERS,O)}let k=(u=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(O=>O.rangeFilter))!==null&&u!==void 0?u:[];if(k.length>0){let O=k.map(A=>{var F,H;return`${A.key}~${(F=A.rangeFilter)===null||F===void 0?void 0:F.from}_${(H=A.rangeFilter)===null||H===void 0?void 0:H.to}`}).join("*");E.append(te.RANGE_FILTERS,O)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&E.append(te.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&E.append(te.SCOPE,e.scope.toLowerCase()),((h=e.sort)===null||h===void 0?void 0:h.length)>0&&e.sort[0].key==="ft:lastEdition"&&E.append(te.SORT,"last_update"),!((f=e.paging)===null||f===void 0)&&f.perPage&&((x=(m=e.paging)===null||m===void 0?void 0:m.perPage)!==null&&x!==void 0?x:this.defaultPerPage)!=this.defaultPerPage&&E.append(te.PER_PAGE,String(e.paging.perPage));let w=(v=e.otherQueryParams)!==null&&v!==void 0?v:{};for(let O in w)E.append(O,w[O]);return encodeURI(E.toString()).replace(/#/g,"%23")}parse(e){var r;let n=e.split("?"),i=this.fromURLSearchParams(n.slice(1).join("?")),a=n[0].split("/search/")[1];return a==null?i:{...i,scope:(r=this.scopeMapping[a])!==null&&r!==void 0?r:i.scope}}fromURLSearchParams(e){var r,n,i,a,s,l,d,u;try{e=decodeURI(e).replace(/%23/g,"#")}catch(T){console.warn("Could not decode search request query params, fallback on raw value",T)}let h=new URLSearchParams(e),f=h.get(te.LOCALE)==="all"?void 0:h.get(te.LOCALE),m=((r=h.get(te.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),x=((n=h.get(te.SORT))!==null&&n!==void 0?n:"DEFAULT").toUpperCase(),v=(i=h.get(te.SCOPE))!==null&&i!==void 0?i:"default",E=+((a=h.get(te.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),L={};for(let T of h.keys())Uc(T)||(L[T]=h.get(T));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=h.get(te.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[v])!==null&&l!==void 0?l:"DEFAULT",virtualField:Ic(m)?m:"EVERYWHERE",sort:(u=(d=this.predefinedSorts[x])!==null&&d!==void 0?d:this.predefinedSorts.DEFAULT)!==null&&u!==void 0?u:[],metadataFilters:this.parseCompatFilters(h),facets:[],paging:{page:1,perPage:ar(1,isNaN(E)?this.defaultPerPage:E,1e3)},otherQueryParams:L}}parseCompatFilters(e){var r,n,i,a,s,l;let d=[];return e.has(te.FILTERS)&&(d=this.parseValueFilters((r=e.get(te.FILTERS))!==null&&r!==void 0?r:"")),(n=e.has(te.PERIOD))!==null&&n!==void 0&&n&&(d=[...d,...this.parseLegacyPeriodFilter(((i=e.get(te.PERIOD))!==null&&i!==void 0?i:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(te.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(te.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(te.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(Bc).map(n=>this.unescapeFilterValue(n)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Ht[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(r,n);return e}superEscapeFilters(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(n,i);return e}unescapeFilterValue(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replace(i,r);return e}parseLegacyPeriodFilter(e){if(Pc(e))return[{key:"ft:lastEdition",dateFilter:{type:Ht[e]}}];if(e.startsWith("CUSTOM_")){let[r,n,i]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:i}}]}return[]}};var ns={};X(ns,{toFtFormComponent:()=>os});var rs=Symbol("elementInternals");function os(t){class e extends t{static get formAssociated(){return!0}get form(){return this[rs].form}constructor(...n){super(n),this[rs]=this.attachInternals()}setFormValue(n){this[rs].setFormValue(n)}}return e}var is={};X(is,{DateFormatter:()=>yr});var yr=class{static format(e,r,n,i){return window.moment?window.moment(e).locale(r).format(this.getDateFormat(n,i)):e}static getDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}};var ss={};X(ss,{ALL_KEYS_VALUE:()=>as,SameWindowStorageEvent:()=>Zr});var as="__all__",Zr=class extends CustomEvent{constructor(e,r,n){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==as}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Zr(r[0],n,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Zr(r[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new Zr(as))}});var ls={};X(ls,{FocusMainContentEvent:()=>Bo});var Bo=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var zc={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1};function gf(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0)}function bf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",gf);document.addEventListener("click",bf);var cs,ds,ps,us,gr=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((ps=(ds=(cs=window.safari)===null||cs===void 0?void 0:cs.pushNotification)===null||ds===void 0?void 0:ds.toString())!==null&&ps!==void 0?ps:"")==="[object SafariRemoteNotification]",xf="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(us=window.ftGlobals)!==null&&us!==void 0?us:{lit:ni,litDecorators:li,litRepeat:ci,litClassMap:di,litStyleMap:pi,litUnsafeHTML:fi,wcUtils:{...xi,...hi,...Si,...is,...Oi,...wi,...ea,...bi,...ma,...ls,...zc,...es,...Ji,...Sa,...ns,...va,...Ll,...Ei,...Ea,...Aa,...Il,...Ra,...Qa,...ss,...ya,...xa,...ts,isSafari:gr,isTouchScreen:xf,setVariable:S}};var vf={spacing:o.create("--ft-search-selected-facets-spacing","","SIZE","8px")},Hc=I`
49
49
  .ft-search-selected-facets--container {
50
50
  display: flex;
51
51
  flex-wrap: wrap;
@@ -1420,7 +1420,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ft-conte
1420
1420
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
1421
1421
  </span>
1422
1422
  `}update(e){var r;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};rt.elementDefinitions={};rt.styles=Ld;jo([de()],rt.prototype,"editorMode",void 0);jo([g()],rt.prototype,"context",void 0);jo([g()],rt.prototype,"key",void 0);jo([ve([])],rt.prototype,"args",void 0);jo([g()],rt.prototype,"defaultMessage",void 0);var Gt=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?wn:Yr}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let a=i;return s=>({context:this.name,key:a,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...a)=>this.service.resolveMessage(this.name,i,...a)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)})}};V("ft-i18n")(rt);var $d=I`
1423
- `;function Go(t){return t.filter(e=>e.key==="ft:lastEdition").filter(e=>!e.valueFilter).map(e=>e.dateFilter?e.dateFilter.type:"CUSTOM").shift()}function Ko(t){var e;return t.dateFilter?{key:t.key,type:"DATE",dateValue:t.dateFilter.type}:t.rangeFilter?{key:t.key,type:"RANGE",from:t.rangeFilter.from,to:t.rangeFilter.to}:{key:t.key,values:(e=t.valueFilter)===null||e===void 0?void 0:e.values}}var Un=class{constructor(e,r){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.enableAnalyticsEvents=!0,this.appName=void 0,this.appVersion=void 0,this.publication=void 0,this.sendEvent=n=>{if(!this.canSendEvent()||!n)return;let i=this.store.getState().request;this.publication==null?this.sendKhubSearchEvent(i,n):this.sendDocumentSearchEvent(i,n)},this.eventsService=r??new Ln,this.resultsWatcher=Wr(e,n=>n.results,this.sendEvent)}setEnableAnalyticsEvents(e){this.enableAnalyticsEvents=e}setAppName(e){this.appName=e}setAppVersion(e){this.appVersion=e}setDocumentSearch(e){this.publication=e}canSendEvent(){if(this.appName==null||this.appVersion==null)return console.debug("ft-search-context.eventManager is not initialized. No events will be sent!"),!1;let{editorMode:e}=B.getState();return this.enableAnalyticsEvents&&!e}sendKhubSearchEvent(e,r){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:hr.KHUB__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:r.length},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Go(e.metadataFilters),facets:e.metadataFilters.map(i=>Ko(i))}};this.eventsService.sendKhubSearchEvent(n)}sendDocumentSearchEvent(e,r){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:hr.DOCUMENT__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:r.length},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Go(e.metadataFilters),facets:e.metadataFilters.map(i=>Ko(i))},publication:this.publication};this.eventsService.sendDocumentSearchEvent(n)}sendResultClickedEvent(e,r){if(!this.canSendEvent())return;let n=this.store.getState().request,i;e.type==Wt.TOPIC&&(i={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:hr.SEARCH_PAGE__SELECT,searchQuery:{terms:n.query,searchType:n.virtualField,lastUpdate:Go(n.metadataFilters),facets:n.metadataFilters.map(s=>Ko(s))},searchResult:{rank:r,type:e.type,document:this.convertDocument(e),topic:i},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchPageSelectEvent(a)}sendResultContextMenuOpenedEvent(e,r){if(!this.canSendEvent())return;let n=this.store.getState().request,i;e.type==Wt.TOPIC&&(i={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:hr.SEARCH_RESULT__OPEN_CONTEXT_MENU,searchQuery:{terms:n.query,searchType:n.virtualField,lastUpdate:Go(n.metadataFilters),facets:n.metadataFilters.map(s=>Ko(s))},searchResult:{rank:r,type:e.type,document:this.convertDocument(e),topic:i},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchResultOpenContextMenuEvent(a)}convertDocument(e){switch(e.type){case Wt.MAP:return{id:e.map.mapId,title:e.map.title,type:jr.STRUCTURED_DOCUMENT,metadata:e.map.metadata};case Wt.TOPIC:return{id:e.topic.mapId,title:e.topic.mapTitle,type:jr.STRUCTURED_DOCUMENT,metadata:e.topic.metadata};case Wt.DOCUMENT:return{id:e.document.documentId,title:e.document.title,type:jr.UNSTRUCTURED_DOCUMENT,metadata:e.document.metadata,mimeType:e.document.mimeType};default:throw new TypeError("Unknown type "+e.type)}}convertExternalLink(e){var r,n,i,a,s;return(a=(n=(r=e.map)===null||r===void 0?void 0:r.originUrl)!==null&&n!==void 0?n:(i=e.topic)===null||i===void 0?void 0:i.originUrl)!==null&&a!==void 0?a:(s=e.document)===null||s===void 0?void 0:s.originUrl}};var Le=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Ts=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},_s=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},Ls=class extends CustomEvent{constructor(e,r,n){super("ft-search-results-change",{detail:{request:e,paging:r,spellcheck:n}})}},fe=class extends Ke{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=zo.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=r=>this.handleLoadError(r),this.addStore(this.stateManager.store,"search")}return this._stateManager}get eventManager(){return this._eventManager==null&&(this._eventManager=new Un(this.stateManager.store)),this._eventManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.otherQueryParams={},this.addStore(B)}render(){return _`
1423
+ `;function Go(t){return t.filter(e=>e.key==="ft:lastEdition").filter(e=>!e.valueFilter).map(e=>e.dateFilter?e.dateFilter.type:"CUSTOM").shift()}function Ko(t){var e;return t.dateFilter?{key:t.key,type:"DATE",dateValue:t.dateFilter.type}:t.rangeFilter?{key:t.key,type:"RANGE",from:t.rangeFilter.from,to:t.rangeFilter.to}:{key:t.key,values:(e=t.valueFilter)===null||e===void 0?void 0:e.values}}var Un=class{constructor(e,r){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.enableAnalyticsEvents=!0,this.appName=void 0,this.appVersion=void 0,this.publication=void 0,this.sendEvent=n=>{if(!this.canSendEvent()||!n)return;let i=this.store.getState().request;this.publication==null?this.sendKhubSearchEvent(i,n):this.sendDocumentSearchEvent(i,n)},this.eventsService=r??new Ln,this.resultsWatcher=Wr(e,n=>n.results,this.sendEvent)}setEnableAnalyticsEvents(e){this.enableAnalyticsEvents=e}setAppName(e){this.appName=e}setAppVersion(e){this.appVersion=e}setDocumentSearch(e){this.publication=e}canSendEvent(){if(this.appName==null||this.appVersion==null)return console.debug("ft-search-context.eventManager is not initialized. No events will be sent!"),!1;let{editorMode:e}=B.getState();return this.enableAnalyticsEvents&&!e}sendKhubSearchEvent(e,r){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:hr.KHUB__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:r.length},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Go(e.metadataFilters),facets:e.metadataFilters.map(i=>Ko(i))}};this.eventsService.sendKhubSearchEvent(n)}sendDocumentSearchEvent(e,r){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:hr.DOCUMENT__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:r.length},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Go(e.metadataFilters),facets:e.metadataFilters.map(i=>Ko(i))},publication:this.publication};this.eventsService.sendDocumentSearchEvent(n)}sendResultClickedEvent(e,r){if(!this.canSendEvent())return;let n=this.store.getState().request,i;e.type==Wt.TOPIC&&(i={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:hr.SEARCH_PAGE__SELECT,searchQuery:{terms:n.query,searchType:n.virtualField,lastUpdate:Go(n.metadataFilters),facets:n.metadataFilters.map(s=>Ko(s))},searchResult:{rank:r,type:e.type,document:this.convertDocument(e),topic:i},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchPageSelectEvent(a)}sendResultContextMenuOpenedEvent(e,r){if(!this.canSendEvent())return;let n=this.store.getState().request,i;e.type==Wt.TOPIC&&(i={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:hr.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU,searchQuery:{terms:n.query,searchType:n.virtualField,lastUpdate:Go(n.metadataFilters),facets:n.metadataFilters.map(s=>Ko(s))},searchResult:{rank:r,type:e.type,document:this.convertDocument(e),topic:i},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchResultOpenContextMenuEvent(a)}convertDocument(e){switch(e.type){case Wt.MAP:return{id:e.map.mapId,title:e.map.title,type:jr.STRUCTURED_DOCUMENT,metadata:e.map.metadata};case Wt.TOPIC:return{id:e.topic.mapId,title:e.topic.mapTitle,type:jr.STRUCTURED_DOCUMENT,metadata:e.topic.metadata};case Wt.DOCUMENT:return{id:e.document.documentId,title:e.document.title,type:jr.UNSTRUCTURED_DOCUMENT,metadata:e.document.metadata,mimeType:e.document.mimeType};default:throw new TypeError("Unknown type "+e.type)}}convertExternalLink(e){var r,n,i,a,s;return(a=(n=(r=e.map)===null||r===void 0?void 0:r.originUrl)!==null&&n!==void 0?n:(i=e.topic)===null||i===void 0?void 0:i.originUrl)!==null&&a!==void 0?a:(s=e.document)===null||s===void 0?void 0:s.originUrl}};var Le=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Ts=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},_s=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},Ls=class extends CustomEvent{constructor(e,r,n){super("ft-search-results-change",{detail:{request:e,paging:r,spellcheck:n}})}},fe=class extends Ke{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=zo.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=r=>this.handleLoadError(r),this.addStore(this.stateManager.store,"search")}return this._stateManager}get eventManager(){return this._eventManager==null&&(this._eventManager=new Un(this.stateManager.store)),this._eventManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.otherQueryParams={},this.addStore(B)}render(){return _`
1424
1424
  <slot @register-ft-search-component=${this.registerComponent} @ft-search-result-click="${this.onResultClicked}"
1425
1425
  @ft-search-result-open-context-menu=${this.onResultContextMenuOpened}></slot>
1426
1426
  `}update(e){super.update(e),e.has("query")&&this.query!==void 0&&this.stateManager.setQuery(this.query),e.has("contentLocale")&&this.contentLocale!==void 0&&this.stateManager.forceContentLocale(this.contentLocale),e.has("filters")&&this.filters!==void 0&&this.stateManager.setFilters(this.filters),e.has("sort")&&this.sort!==void 0&&this.stateManager.setSort(this.sort),e.has("pageSize")&&this.pageSize!==void 0&&this.stateManager.setPageSize(this.pageSize),e.has("searchInDocumentTitlesOnly")&&this.searchInDocumentTitlesOnly!==void 0&&this.stateManager.setSearchInDocumentTitlesOnly(this.searchInDocumentTitlesOnly),e.has("scope")&&this.scope!==void 0&&this.stateManager.setScope(this.scope),e.has("virtualField")&&this.virtualField!==void 0&&this.stateManager.setVirtualField(this.virtualField),e.has("ignoreEmptyQuery")&&this.ignoreEmptyQuery!==void 0&&this.stateManager.setIgnoreEmptyQuery(this.ignoreEmptyQuery),e.has("openExternalDocumentInNewTab")&&this.openExternalDocumentInNewTab!==void 0&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("otherQueryParams")&&this.otherQueryParams!==void 0&&this.stateManager.setOtherQueryParams(this.otherQueryParams),e.has("session")&&this.session!==void 0&&e.get("session")!=null&&(this.stateManager.service.clearCache(),this.stateManager.initService())}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.stateManager.clearResults(),this.stateManager.setQuery(this.query),this.stateManager.forceContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort),this.stateManager.setOtherQueryParams(this.otherQueryParams)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.clearResults()}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("request")&&this.request&&this.dispatchEvent(new _s(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new Ls(this.request,this.paging,this.autocorrect))}registerComponent(e){e.stopPropagation();let r=e.composedPath()[0];this.register(r)}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new Ts(e))}reloadSavedSearches(){Kc.clearMySearches()}clear(){this.stateManager.clear()}onResultClicked(e){this.eventManager.sendResultClickedEvent(e.detail.result,e.detail.rank)}onResultContextMenuOpened(e){this.eventManager.sendResultContextMenuOpenedEvent(e.detail.result,e.detail.rank)}};fe.elementDefinitions={};fe.styles=$d;Le([de({store:B.name})],fe.prototype,"session",void 0);Le([g()],fe.prototype,"query",void 0);Le([g()],fe.prototype,"contentLocale",void 0);Le([g({type:Number})],fe.prototype,"pageSize",void 0);Le([g({type:Boolean})],fe.prototype,"searchInDocumentTitlesOnly",void 0);Le([g()],fe.prototype,"scope",void 0);Le([g()],fe.prototype,"virtualField",void 0);Le([g({type:Boolean})],fe.prototype,"ignoreEmptyQuery",void 0);Le([de({store:B.name})],fe.prototype,"openExternalDocumentInNewTab",void 0);Le([ve([])],fe.prototype,"filters",void 0);Le([ve([])],fe.prototype,"sort",void 0);Le([ve({})],fe.prototype,"otherQueryParams",void 0);Le([de({store:"search"})],fe.prototype,"request",void 0);Le([de({store:"search"})],fe.prototype,"paging",void 0);Le([de({store:"search",selector:t=>t.spellcheck})],fe.prototype,"autocorrect",void 0);Le([g({attribute:!1})],fe.prototype,"searchServiceProvider",void 0);V("ft-search-context")(fe);var Fd=I`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-selected-facets",
3
- "version": "1.2.60",
3
+ "version": "1.2.61",
4
4
  "description": "List of selected facets in a designed search page context",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,13 +19,13 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-chip": "1.2.60",
23
- "@fluid-topics/ft-search-context": "1.2.60",
24
- "@fluid-topics/ft-search-period-filter": "1.2.60",
25
- "@fluid-topics/ft-search-type": "1.2.60",
26
- "@fluid-topics/ft-tooltip": "1.2.60",
27
- "@fluid-topics/ft-wc-utils": "1.2.60",
22
+ "@fluid-topics/ft-chip": "1.2.61",
23
+ "@fluid-topics/ft-search-context": "1.2.61",
24
+ "@fluid-topics/ft-search-period-filter": "1.2.61",
25
+ "@fluid-topics/ft-search-type": "1.2.61",
26
+ "@fluid-topics/ft-tooltip": "1.2.61",
27
+ "@fluid-topics/ft-wc-utils": "1.2.61",
28
28
  "lit": "3.1.0"
29
29
  },
30
- "gitHead": "5acbf0235057ab34c306052ddba1e8f500f710bc"
30
+ "gitHead": "924cb24583d473e221182ffe54f8c500643227c1"
31
31
  }