@fluid-topics/ft-search-selected-facets 2.0.11 → 2.0.12
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 ko=y(w()),Rs=y(j());var fn;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(fn||(fn={}));var bn=y(w());var Sl=y(w());var ap=y(Ol(),1);var Ll;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Ll||(Ll={}));var El;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(El||(El={}));var Al;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Al||(Al={}));var Rl;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Rl||(Rl={}));var wl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(wl||(wl={}));var _l;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(_l||(_l={}));var Tl;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Tl||(Tl={}));var Nl;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Nl||(Nl={}));var kl;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(kl||(kl={}));var Ml;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ml||(Ml={}));var Pl;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Pl||(Pl={}));var zl;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(zl||(zl={}));var Il;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Il||(Il={}));var Dl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Dl||(Dl={}));var ar;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(ar||(ar={}));var $l;(function(e){e.ASC="ASC",e.DESC="DESC"})($l||($l={}));var Bl;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Bl||(Bl={}));var da;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(da||(da={}));var Ul;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ul||(Ul={}));var Fl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Fl||(Fl={}));var Hl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Hl||(Hl={}));var fa;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(fa||(fa={}));var Gl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Gl||(Gl={}));var ua;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ua||(ua={}));var Wl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Wl||(Wl={}));var xe;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(xe||(xe={}));var vt;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(vt||(vt={}));var Vl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Vl||(Vl={}));var jl;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(jl||(jl={}));var Kl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(Kl||(Kl={}));var ql;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(ql||(ql={}));var Zl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Zl||(Zl={}));var Yl;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(Yl||(Yl={}));var Xl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Xl||(Xl={}));var Ql;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Ql||(Ql={}));var Jl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Jl||(Jl={}));var np={[xe.PERSONAL_BOOK_SHARE_USER]:[xe.PERSONAL_BOOK_USER],[xe.HTML_EXPORT_USER]:[xe.PERSONAL_BOOK_USER],[xe.PDF_EXPORT_USER]:[xe.PERSONAL_BOOK_USER],[xe.KHUB_ADMIN]:[xe.CONTENT_PUBLISHER],[xe.ADMIN]:[xe.KHUB_ADMIN,xe.USERS_ADMIN,xe.PORTAL_ADMIN,xe.BEHAVIOR_DATA_USER],[xe.GENERATIVE_AI_EXPORT_USER]:[xe.GENERATIVE_AI_USER]};function e1(e,t){return e===t||(np[e]??[]).some(r=>e1(r,t))}function t1(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>e1(n,t))}var gs=y(j());function ip(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!pa(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!pa(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(c=>s[c]!=null);if(a=i(e),r=a.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let s=a[n];if(!pa(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pa(e,t){try{return ip(e,t)}catch{return!1}}function un(e,t){return!pa(e,t)}function r1(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function ha(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var o1=y(j(),1);var ji=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:un,attribute:!1,...t};(0,o1.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:c=>c[n],store:t.store})}};var ma=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Zr=y(j(),1);var n1=y(j(),1);function a1(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,n1.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:un,...t??{}})}var ga=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){a(c);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var s1=y(I(),1);var ya=globalThis,sp=ya.ShadowRoot&&(ya.ShadyCSS===void 0||ya.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i7=Symbol();var i1=(e,t)=>{if(sp)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=ya.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var ba=class extends s1.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return i1(n,t.elementStyles),n}};function c1(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Lo=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},u1,l1=Symbol("constructorPrototype"),d1=Symbol("constructorName"),p1=Symbol("exportpartsDebouncer"),f1=Symbol("dynamicDependenciesLoaded"),Oo=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Oo.eventName="exportparts-updated";var Vt=class extends ba{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[u1]=new ga(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[p1].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[d1]=this.constructor.name,this[l1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[d1]&&Object.setPrototypeOf(this,this[l1])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[f1]||(r[f1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Oo.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Oo.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Oo)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=c1(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,c;let f=b=>b!=null&&b.trim().length>0,u=t.filter(f).map(b=>b.trim());if(u.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(T=>T.split(":")[1]))!==null&&c!==void 0?c:[],E=[...S,...C].filter(f).map(T=>T.trim());for(let T of E)m.add(T)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(b=>u.map(S=>`${b}:${S}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};u1=p1;Lo([(0,Zr.property)()],Vt.prototype,"exportpartsPrefix",void 0);Lo([a1([])],Vt.prototype,"exportpartsPrefixes",void 0);Lo([(0,Zr.property)({reflect:!0})],Vt.prototype,"exportparts",void 0);Lo([(0,Zr.property)()],Vt.prototype,"customStylesheet",void 0);Lo([(0,Zr.property)()],Vt.prototype,"elementToFocus",void 0);Lo([(0,Zr.state)()],Vt.prototype,"useAdoptedStyleSheets",void 0);function va(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var pn=Symbol("internalReduxEventsUnsubscribers"),br=Symbol("internalStoresUnsubscribers"),Yr=Symbol("internalStores"),cp=ha(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Yr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Yr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Yr].get(s)}addStore(s,c){var f;c=(f=c??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(c),this[Yr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Yr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Yr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let f=this.constructor.getPropertyOptions(c);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[br].has(s.store):this[br].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var f;this[br].set(s,c.subscribe(()=>this.updateFromStores())),this[pn].set(s,[]),va(c)&&c.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||c.name===u.store)){let g=b=>this[m](b);c.addEventListener(u.eventName,g),this[pn].get(s).push(()=>c.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[br].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[br].has(s)&&this[br].get(s)(),this[br].delete(s),(c=this[pn].get(s))===null||c===void 0||c.forEach(f=>f()),this[pn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=br,r=Yr,n=pn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),h1=class extends cp(Vt){};function xt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ir(e){return!!e&&!!e[de]}function kt(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===gp}(e)||Array.isArray(e)||!!e[S1]||!!(!((t=e.constructor)===null||t===void 0)&&t[S1])||ts(e)||rs(e))}function Xr(e,t,r){r===void 0&&(r=!1),Ro(e)===0?(r?Object.keys:Ao)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function Ro(e){var t=e[de];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ts(e)?2:rs(e)?3:0}function Eo(e,t){return Ro(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lp(e,t){return Ro(e)===2?e.get(t):e[t]}function C1(e,t,r){var n=Ro(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function O1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ts(e){return hp&&e instanceof Map}function rs(e){return mp&&e instanceof Set}function vr(e){return e.o||e.t}function os(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=A1(e);delete t[de];for(var r=Ao(t),n=0;n<r.length;n++){var a=r[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function ns(e,t){return t===void 0&&(t=!1),as(e)||ir(e)||!kt(e)||(Ro(e)>1&&(e.set=e.add=e.clear=e.delete=dp),Object.freeze(e),t&&Xr(e,function(r,n){return ns(n,!0)},!0)),e}function dp(){xt(2)}function as(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function jt(e){var t=es[e];return t||xt(18,e),t}function fp(e,t){es[e]||(es[e]=t)}function Xi(){return mn}function Ki(e,t){t&&(jt("Patches"),e.u=[],e.s=[],e.v=t)}function xa(e){Qi(e),e.p.forEach(up),e.p=null}function Qi(e){e===mn&&(mn=e.l)}function m1(e){return mn={p:[],l:mn,h:e,m:!0,_:0}}function up(e){var t=e[de];t.i===0||t.i===1?t.j():t.g=!0}function qi(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||jt("ES5").S(t,e,n),n?(r[de].P&&(xa(t),xt(4)),kt(e)&&(e=Sa(t,e),t.l||Ca(t,e)),t.u&&jt("Patches").M(r[de].t,e,t.u,t.s)):e=Sa(t,r,[]),xa(t),t.u&&t.v(t.u,t.s),e!==E1?e:void 0}function Sa(e,t,r){if(as(t))return t;var n=t[de];if(!n)return Xr(t,function(c,f){return g1(e,n,t,c,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Ca(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=os(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Xr(i,function(c,f){return g1(e,n,a,c,f,r,s)}),Ca(e,a,!1),r&&e.u&&jt("Patches").N(n,r,e.u,e.s)}return n.o}function g1(e,t,r,n,a,i,s){if(ir(a)){var c=Sa(e,a,i&&t&&t.i!==3&&!Eo(t.R,n)?i.concat(n):void 0);if(C1(r,n,c),!ir(c))return;e.m=!1}else s&&r.add(a);if(kt(a)&&!as(a)){if(!e.h.D&&e._<1)return;Sa(e,a),t&&t.A.l||Ca(e,a)}}function Ca(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ns(t,r)}function Zi(e,t){var r=e[de];return(r?vr(r):e)[t]}function y1(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function xr(e){e.P||(e.P=!0,e.l&&xr(e.l))}function Yi(e){e.o||(e.o=os(e.t))}function Ji(e,t,r){var n=ts(t)?jt("MapSet").F(t,r):rs(t)?jt("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Xi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=c,u=gn;s&&(f=[c],u=hn);var m=Proxy.revocable(f,u),g=m.revoke,b=m.proxy;return c.k=b,c.j=g,b}(t,r):jt("ES5").J(t,r);return(r?r.A:Xi()).p.push(n),n}function pp(e){return ir(e)||xt(22,e),function t(r){if(!kt(r))return r;var n,a=r[de],i=Ro(r);if(a){if(!a.P&&(a.i<4||!jt("ES5").K(a)))return a.t;a.I=!0,n=b1(r,i),a.I=!1}else n=b1(r,i);return Xr(n,function(s,c){a&&lp(a.t,s)===c||C1(n,s,t(c))}),i===3?new Set(n):n}(e)}function b1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return os(e)}function L1(){function e(s,c){var f=i[s];return f?f.enumerable=c:i[s]=f={configurable:!0,enumerable:c,get:function(){var u=this[de];return gn.get(u,s)},set:function(u){var m=this[de];gn.set(m,s,u)}},f}function t(s){for(var c=s.length-1;c>=0;c--){var f=s[c][de];if(!f.P)switch(f.i){case 5:n(f)&&xr(f);break;case 4:r(f)&&xr(f)}}}function r(s){for(var c=s.t,f=s.k,u=Ao(f),m=u.length-1;m>=0;m--){var g=u[m];if(g!==de){var b=c[g];if(b===void 0&&!Eo(c,g))return!0;var S=f[g],C=S&&S[de];if(C?C.t!==b:!O1(S,b))return!0}}var E=!!c[de];return u.length!==Ao(c).length+(E?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(c,c.length-1);if(f&&!f.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&xt(3,JSON.stringify(vr(s)))}var i={};fp("ES5",{J:function(s,c){var f=Array.isArray(s),u=function(g,b){if(g){for(var S=Array(b.length),C=0;C<b.length;C++)Object.defineProperty(S,""+C,e(C,!0));return S}var E=A1(b);delete E[de];for(var T=Ao(E),M=0;M<T.length;M++){var N=T[M];E[N]=e(N,g||!!E[N].enumerable)}return Object.create(Object.getPrototypeOf(b),E)}(f,s),m={i:f?5:4,A:c?c.A:Xi(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,de,{value:m,writable:!0}),u},S:function(s,c,f){f?ir(c)&&c[de].A===s&&t(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var g=m[de];if(g){var b=g.t,S=g.k,C=g.R,E=g.i;if(E===4)Xr(S,function(U){U!==de&&(b[U]!==void 0||Eo(b,U)?C[U]||u(S[U]):(C[U]=!0,xr(g)))}),Xr(b,function(U){S[U]!==void 0||Eo(S,U)||(C[U]=!1,xr(g))});else if(E===5){if(n(g)&&(xr(g),C.length=!0),S.length<b.length)for(var T=S.length;T<b.length;T++)C[T]=!1;else for(var M=b.length;M<S.length;M++)C[M]=!0;for(var N=Math.min(S.length,b.length),$=0;$<N;$++)S.hasOwnProperty($)||(C[$]=!0),C[$]===void 0&&u(S[$])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var v1,mn,is=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",hp=typeof Map<"u",mp=typeof Set<"u",x1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",E1=is?Symbol.for("immer-nothing"):((v1={})["immer-nothing"]=!0,v1),S1=is?Symbol.for("immer-draftable"):"__$immer_draftable",de=is?Symbol.for("immer-state"):"__$immer_state";var gp=""+Object.prototype.constructor,Ao=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,A1=Object.getOwnPropertyDescriptors||function(e){var t={};return Ao(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},es={},gn={get:function(e,t){if(t===de)return e;var r=vr(e);if(!Eo(r,t))return function(a,i,s){var c,f=y1(i,s);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!kt(n)?n:n===Zi(e.t,t)?(Yi(e),e.o[t]=Ji(e.A.h,n,e)):n},has:function(e,t){return t in vr(e)},ownKeys:function(e){return Reflect.ownKeys(vr(e))},set:function(e,t,r){var n=y1(vr(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Zi(vr(e),t),i=a?.[de];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(O1(r,a)&&(r!==void 0||Eo(e.t,t)))return!0;Yi(e),xr(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Zi(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Yi(e),xr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=vr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){xt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){xt(12)}},hn={};Xr(gn,function(e,t){hn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),hn.deleteProperty=function(e,t){return hn.set.call(this,e,t,void 0)},hn.set=function(e,t,r){return gn.set.call(this,e[0],t,r,e[0])};var yp=function(){function e(r){var n=this;this.O=x1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var f=n;return function(E){var T=this;E===void 0&&(E=c);for(var M=arguments.length,N=Array(M>1?M-1:0),$=1;$<M;$++)N[$-1]=arguments[$];return f.produce(E,function(U){var K;return(K=i).call.apply(K,[T,U].concat(N))})}}var u;if(typeof i!="function"&&xt(6),s!==void 0&&typeof s!="function"&&xt(7),kt(a)){var m=m1(n),g=Ji(n,a,void 0),b=!0;try{u=i(g),b=!1}finally{b?xa(m):Qi(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(E){return Ki(m,s),qi(E,m)},function(E){throw xa(m),E}):(Ki(m,s),qi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===E1&&(u=void 0),n.D&&ns(u,!0),s){var S=[],C=[];jt("Patches").M(a,u,S,C),s(S,C)}return u}xt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(g))})};var s,c,f=n.produce(a,i,function(u,m){s=u,c=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,s,c]}):[f,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){kt(r)||xt(8),ir(r)&&(r=pp(r));var n=m1(this),a=Ji(this,r,void 0);return a[de].C=!0,Qi(n),a},t.finishDraft=function(r,n){var a=r&&r[de],i=a.A;return Ki(i,n),qi(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!x1&&xt(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=jt("Patches").$;return ir(r)?s(r,n):this.produce(r,function(c){return s(c,n)})},e}(),ft=new yp,bp=ft.produce,S7=ft.produceWithPatches.bind(ft),C7=ft.setAutoFreeze.bind(ft),O7=ft.setUseProxies.bind(ft),L7=ft.applyPatches.bind(ft),E7=ft.createDraft.bind(ft),A7=ft.finishDraft.bind(ft),Oa=bp;function Qr(e){"@babel/helpers - typeof";return Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(e)}function R1(e,t){if(Qr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function w1(e){var t=R1(e,"string");return Qr(t)=="symbol"?t:t+""}function _1(e,t,r){return(t=w1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ss(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T1(Object(r),!0).forEach(function(n){_1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ve(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var N1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),cs=function(){return Math.random().toString(36).substring(7).split("").join(".")},La={INIT:"@@redux/INIT"+cs(),REPLACE:"@@redux/REPLACE"+cs(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+cs()}};function vp(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ls(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ve(1));return r(ls)(e,t)}if(typeof e!="function")throw new Error(Ve(2));var a=e,i=t,s=[],c=s,f=!1;function u(){c===s&&(c=s.slice())}function m(){if(f)throw new Error(Ve(3));return i}function g(E){if(typeof E!="function")throw new Error(Ve(4));if(f)throw new Error(Ve(5));var T=!0;return u(),c.push(E),function(){if(T){if(f)throw new Error(Ve(6));T=!1,u();var N=c.indexOf(E);c.splice(N,1),s=null}}}function b(E){if(!vp(E))throw new Error(Ve(7));if(typeof E.type>"u")throw new Error(Ve(8));if(f)throw new Error(Ve(9));try{f=!0,i=a(i,E)}finally{f=!1}for(var T=s=c,M=0;M<T.length;M++){var N=T[M];N()}return E}function S(E){if(typeof E!="function")throw new Error(Ve(10));a=E,b({type:La.REPLACE})}function C(){var E,T=g;return E={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Ve(11));function $(){N.next&&N.next(m())}$();var U=T($);return{unsubscribe:U}}},E[N1]=function(){return this},E}return b({type:La.INIT}),n={dispatch:b,subscribe:g,getState:m,replaceReducer:S},n[N1]=C,n}function xp(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:La.INIT});if(typeof n>"u")throw new Error(Ve(12));if(typeof r(void 0,{type:La.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ve(13))})}function k1(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),s,c;try{xp(r)}catch(f){c=f}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var g;for(var b=!1,S={},C=0;C<i.length;C++){var E=i[C],T=r[E],M=u[E],N=T(M,m);if(typeof N>"u"){var $=m&&m.type;throw new Error(Ve(14))}S[E]=N,b=b||N!==M}return b=b||i.length!==Object.keys(u).length,b?S:u}}function wo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function M1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Ve(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=t.map(function(f){return f(s)});return i=wo.apply(void 0,c)(a.dispatch),ss(ss({},a),{},{dispatch:i})}}}function P1(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,e):s(c)}}};return t}var z1=P1();z1.withExtraArgument=P1;var ds=z1;var U1=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sp=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,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(m){return f([u,m])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},_o=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},Cp=Object.defineProperty,Op=Object.defineProperties,Lp=Object.getOwnPropertyDescriptors,I1=Object.getOwnPropertySymbols,Ep=Object.prototype.hasOwnProperty,Ap=Object.prototype.propertyIsEnumerable,D1=function(e,t,r){return t in e?Cp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Sr=function(e,t){for(var r in t||(t={}))Ep.call(t,r)&&D1(e,r,t[r]);if(I1)for(var n=0,a=I1(t);n<a.length;n++){var r=a[n];Ap.call(t,r)&&D1(e,r,t[r])}return e},fs=function(e,t){return Op(e,Lp(t))},Rp=function(e,t,r){return new Promise(function(n,a){var i=function(f){try{c(r.next(f))}catch(u){a(u)}},s=function(f){try{c(r.throw(f))}catch(u){a(u)}},c=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,s)};c((r=r.apply(e,t)).next())})};var wp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?wo:wo.apply(null,arguments)},W7=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function _p(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var Tp=function(e){U1(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.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(t.bind.apply(t,_o([void 0],r[0].concat(this)))):new(t.bind.apply(t,_o([void 0],r.concat(this))))},t}(Array),Np=function(e){U1(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.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(t.bind.apply(t,_o([void 0],r[0].concat(this)))):new(t.bind.apply(t,_o([void 0],r.concat(this))))},t}(Array);function hs(e){return kt(e)?Oa(e,function(){}):e}function kp(e){return typeof e=="boolean"}function Mp(){return function(t){return Pp(t)}}function Pp(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,c=new Tp;if(r&&(kp(r)?c.push(ds):c.push(ds.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return c}var us=!0;function F1(e){var t=Mp(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?t():i,c=r.devTools,f=c===void 0?!0:c,u=r.preloadedState,m=u===void 0?void 0:u,g=r.enhancers,b=g===void 0?void 0:g,S;if(typeof a=="function")S=a;else if(_p(a))S=k1(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(t),!us&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!us&&C.some(function(U){return typeof U!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=M1.apply(void 0,C),T=wo;f&&(T=wp(Sr({trace:!us},typeof f=="object"&&f)));var M=new Np(E),N=M;Array.isArray(b)?N=_o([E],b):typeof b=="function"&&(N=b(M));var $=T.apply(void 0,N);return ls(S,m,$)}function Cr(e,t){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return Sr(Sr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function H1(e){var t={},r=[],n,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,r,n]}function zp(e){return typeof e=="function"}function Ip(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?H1(t):[t,r,n],i=a[0],s=a[1],c=a[2],f;if(zp(e))f=function(){return hs(e())};else{var u=hs(e);f=function(){return u}}function m(g,b){g===void 0&&(g=f());var S=_o([i[b.type]],s.filter(function(C){var E=C.matcher;return E(b)}).map(function(C){var E=C.reducer;return E}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,E){if(E)if(ir(C)){var T=C,M=E(T,b);return M===void 0?C:M}else{if(kt(C))return Oa(C,function(N){return E(N,b)});var M=E(C,b);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},g)}return m.getInitialState=f,m}function Dp(e,t){return e+"/"+t}function G1(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:hs(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},c={};a.forEach(function(m){var g=n[m],b=Dp(t,m),S,C;"reducer"in g?(S=g.reducer,C=g.prepare):S=g,i[m]=S,s[b]=S,c[m]=C?Cr(b,C):Cr(b)});function f(){var m=typeof e.extraReducers=="function"?H1(e.extraReducers):[e.extraReducers],g=m[0],b=g===void 0?{}:g,S=m[1],C=S===void 0?[]:S,E=m[2],T=E===void 0?void 0:E,M=Sr(Sr({},b),s);return Ip(r,function(N){for(var $ in M)N.addCase($,M[$]);for(var U=0,K=C;U<K.length;U++){var le=K[U];N.addMatcher(le.matcher,le.reducer)}T&&N.addDefaultCase(T)})}var u;return{name:t,reducer:function(m,g){return u||(u=f()),u(m,g)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var $p="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Bp=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=$p[Math.random()*64|0];return t},Up=["name","message","stack","code"],ps=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),$1=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Fp=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Up;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},q7=function(){function e(t,r,n){var a=Cr(t+"/fulfilled",function(m,g,b,S){return{payload:m,meta:fs(Sr({},S||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),i=Cr(t+"/pending",function(m,g,b){return{payload:void 0,meta:fs(Sr({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=Cr(t+"/rejected",function(m,g,b,S,C){return{payload:S,error:(n&&n.serializeError||Fp)(m||"Rejected"),meta:fs(Sr({},C||{}),{arg:b,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,f=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(g,b,S){var C=n?.idGenerator?n.idGenerator(m):Bp(),E=new f,T,M=!1;function N(U){T=U,E.abort()}var $=function(){return Rp(this,null,function(){var U,K,le,et,ze,Wt,Ie;return Sp(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),et=(U=n?.condition)==null?void 0:U.call(n,m,{getState:b,extra:S}),Gp(et)?[4,et]:[3,2];case 1:et=x.sent(),x.label=2;case 2:if(et===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,ze=new Promise(function(L,F){return E.signal.addEventListener("abort",function(){return F({name:"AbortError",message:T||"Aborted"})})}),g(i(C,m,(K=n?.getPendingMeta)==null?void 0:K.call(n,{requestId:C,arg:m},{getState:b,extra:S}))),[4,Promise.race([ze,Promise.resolve(r(m,{dispatch:g,getState:b,extra:S,requestId:C,signal:E.signal,abort:N,rejectWithValue:function(L,F){return new ps(L,F)},fulfillWithValue:function(L,F){return new $1(L,F)}})).then(function(L){if(L instanceof ps)throw L;return L instanceof $1?a(L.payload,C,m,L.meta):a(L,C,m)})])];case 3:return le=x.sent(),[3,5];case 4:return Wt=x.sent(),le=Wt instanceof ps?s(null,C,m,Wt.payload,Wt.meta):s(Wt,C,m),[3,5];case 5:return Ie=n&&!n.dispatchConditionRejection&&s.match(le)&&le.meta.condition,Ie||g(le),[2,le]}})})}();return Object.assign($,{abort:N,requestId:C,arg:m,unwrap:function(){return $.then(Hp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Hp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Gp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var W1="listener",V1="completed",j1="cancelled",Z7="task-"+j1,Y7="task-"+V1,X7=W1+"-"+j1,Q7=W1+"-"+V1;var ms="listenerMiddleware";var J7=Cr(ms+"/add"),eb=Cr(ms+"/removeAll"),tb=Cr(ms+"/remove");var B1,rb=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(B1||(B1=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Wp=function(e){return function(t){setTimeout(t,e)}},ob=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Wp(10);L1();var Vp=ha(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),Ea=class extends Vp(Object){};window.ftReduxStores||(window.ftReduxStores={});var K1=class e extends Ea{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(va(i))return i;if(a==null)return;let s=G1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=F1({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=r1(s.getInitialState());for(let g of u.keeping)m[g]=(f??m)[g];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...u.overwrites};return s.reducer(f,u)}});return window.ftReduxStores[a.name]=new e(s,c,a.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ma;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let f=s,u=i[f];return u?(...m)=>{let g=u(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Aa=class{static format(t,r,n,a){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(t,r,n,a)}static getMomentDateFormat(t,r){return t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(i);if(!a)return s;let c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${c}`}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Ra=y(w()),jp="ft-app-info",Jr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Jr.eventName="authentication-change";var Kp={session:(e,t)=>{(0,Ra.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>z.dispatchEvent(new Jr(t.payload)),0))}},z=Ra.FtReduxStore.get({name:jp,reducers:Kp,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var q1=y(w()),wa=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},Z1=(0,q1.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(z)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>Aa.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return wa([(0,gs.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),wa([(0,gs.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),wa([ji({store:z.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),wa([ji({store:z.name})],t.prototype,"uiLocale",void 0),t});var Pa=y(w());var ys=y(w());var eo=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=z.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=z.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var _a=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:eo.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):eo.await()}};var tt=class extends _a{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[f])=>c.localeCompare(f)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new ys.CacheRegistry,this.cache=t?a.commonCache:new ys.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Ta=class extends tt{async listMySearches(){let{session:t}=z.getState();return t1(t,xe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Na=class extends tt{async listMyBookmarks(){let t=z.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ka=class extends tt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=z.getState().session;return!!t?.sessionAuthenticated}};var Ma=class extends tt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=z.getState().session;return!!t?.sessionAuthenticated}};var qp="ft-user-assets",Zp={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(vt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:a}=t.payload;vs(e,r,[...bs(e,r),a]),Y1(e,r,1,n),X1(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;vs(e,r,bs(e,r).map(a=>a.id===n.id?n:a)),X1(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;vs(e,r,bs(e,r).filter(i=>i.id!==a)),Y1(e,r,-1,n)}},Q1={[vt.SEARCHES]:"savedSearches",[vt.BOOKMARKS]:"bookmarks",[vt.BOOKS]:void 0,[vt.COLLECTIONS]:void 0},bs=(e,t)=>{var r;let n=Q1[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},vs=(e,t,r)=>{let n=Q1[t];n&&(e[n]=r)},Y1=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===vt.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},X1=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},ut=Pa.FtReduxStore.get({name:qp,reducers:Zp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(vt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),xs=class{constructor(t=new ka,r=new Ma){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Na,this.savedSearchesService=new Ta,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=z.getState();(0,Pa.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ut.actions.clearAssetCount(),ut.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ut.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ut.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ut.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ut.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&ut.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&ut.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(ut.getState().assetCounts.bookmarkByMap).length!==0;t===vt.BOOKMARKS&&r&&ut.actions.clearBookmarkCountByMap(),ut.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ut.actions.bookmarks(r)}}},Yp=new xs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Yp);var Ss=class{addCommand(t,r=!1){z.commands.add(t,r)}consumeCommand(t){return z.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Ss;var St=y(w());var J1,To=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Xp=Symbol("clearAfterUnitTest"),za=class extends(0,St.withEventBus)(tt){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[J1]=()=>{this.defaultMessages={},this.cache=new St.CacheRegistry,this.listeners={}},this.currentUiLocale=z.getState().uiLocale,z.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=z.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,St.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new St.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof St.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new To({loadedContexts:t})),this.dispatchEvent(new To({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new To({loadedContexts:[t]})),this.dispatchEvent(new To({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,St.delay)(0).then(()=>n()).catch(()=>null)))}};J1=Xp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends za{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends za{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var No=window.FluidTopicsI18nService,Ia=window.FluidTopicsCustomI18nService;var ed=y(w()),Cs=class{highlightHtml(t,r,n){(0,ed.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Cs;var td=y(w());var Os=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=z.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i;if(t==null)return"";try{return td.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:z.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}catch(s){throw console.error(`Date ${JSON.stringify(t)} is not valid`,s),s}}};window.FluidTopicsDateService=new Os;var rd=y(w());var yn=class{static get(t,r){var n,a;let i=z.getState(),{lang:s,region:c}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new rd.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Ls=class{urlToSearchRequest(t){return yn.get().parse(t)}searchRequestToUrl(t){return yn.get().serialize(t)}};window.FluidTopicsUrlService=new Ls;var Or=y(w());var to=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};to.eventName="change";var Es=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},od=new Es;var Da=class e extends Or.WithEventBus{static build(){return new e(window.history,od,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Or.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new to(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,c])=>{let f=r(),u={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(a,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(to.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(to.eventName,t)}currentItem(){return(0,Or.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Or.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Or.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Da.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var nd=y(I());var ad=nd.css`
|
|
12
|
+
`;var ko=y(w()),Rs=y(j());var fn;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(fn||(fn={}));var bn=y(w());var Sl=y(w());var ap=y(Ol(),1);var Ll;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Ll||(Ll={}));var El;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(El||(El={}));var Al;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Al||(Al={}));var Rl;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Rl||(Rl={}));var wl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(wl||(wl={}));var _l;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(_l||(_l={}));var Tl;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Tl||(Tl={}));var Nl;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Nl||(Nl={}));var kl;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(kl||(kl={}));var Ml;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ml||(Ml={}));var Pl;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Pl||(Pl={}));var zl;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(zl||(zl={}));var Il;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Il||(Il={}));var Dl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Dl||(Dl={}));var ar;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(ar||(ar={}));var $l;(function(e){e.ASC="ASC",e.DESC="DESC"})($l||($l={}));var Bl;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Bl||(Bl={}));var da;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(da||(da={}));var Ul;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ul||(Ul={}));var Fl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Fl||(Fl={}));var Hl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Hl||(Hl={}));var fa;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(fa||(fa={}));var Gl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Gl||(Gl={}));var ua;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ua||(ua={}));var Wl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Wl||(Wl={}));var xe;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(xe||(xe={}));var vt;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(vt||(vt={}));var Vl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Vl||(Vl={}));var jl;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(jl||(jl={}));var Kl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(Kl||(Kl={}));var ql;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(ql||(ql={}));var Zl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Zl||(Zl={}));var Yl;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(Yl||(Yl={}));var Xl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Xl||(Xl={}));var Ql;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Ql||(Ql={}));var Jl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Jl||(Jl={}));var np={[xe.PERSONAL_BOOK_SHARE_USER]:[xe.PERSONAL_BOOK_USER],[xe.HTML_EXPORT_USER]:[xe.PERSONAL_BOOK_USER],[xe.PDF_EXPORT_USER]:[xe.PERSONAL_BOOK_USER],[xe.KHUB_ADMIN]:[xe.CONTENT_PUBLISHER],[xe.ADMIN]:[xe.KHUB_ADMIN,xe.USERS_ADMIN,xe.PORTAL_ADMIN,xe.BEHAVIOR_DATA_USER],[xe.GENERATIVE_AI_EXPORT_USER]:[xe.GENERATIVE_AI_USER]};function e1(e,t){return e===t||(np[e]??[]).some(r=>e1(r,t))}function t1(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>e1(n,t))}var gs=y(j());function ip(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!pa(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!pa(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(c=>s[c]!=null);if(a=i(e),r=a.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let s=a[n];if(!pa(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pa(e,t){try{return ip(e,t)}catch{return!1}}function un(e,t){return!pa(e,t)}function r1(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function ha(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var o1=y(j(),1);var ji=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:un,attribute:!1,...t};(0,o1.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:c=>c[n],store:t.store})}};var ma=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Zr=y(j(),1);var n1=y(j(),1);function a1(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,n1.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:un,...t??{}})}var ga=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){a(c);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var s1=y(I(),1);var ya=globalThis,sp=ya.ShadowRoot&&(ya.ShadyCSS===void 0||ya.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i7=Symbol();var i1=(e,t)=>{if(sp)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=ya.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var ba=class extends s1.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return i1(n,t.elementStyles),n}};function c1(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Lo=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},u1,l1=Symbol("constructorPrototype"),d1=Symbol("constructorName"),p1=Symbol("exportpartsDebouncer"),f1=Symbol("dynamicDependenciesLoaded"),Oo=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Oo.eventName="exportparts-updated";var Vt=class extends ba{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[u1]=new ga(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[p1].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[d1]=this.constructor.name,this[l1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[d1]&&Object.setPrototypeOf(this,this[l1])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[f1]||(r[f1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Oo.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Oo.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Oo)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=c1(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,c;let f=b=>b!=null&&b.trim().length>0,u=t.filter(f).map(b=>b.trim());if(u.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(T=>T.split(":")[1]))!==null&&c!==void 0?c:[],E=[...S,...C].filter(f).map(T=>T.trim());for(let T of E)m.add(T)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(b=>u.map(S=>`${b}:${S}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};u1=p1;Lo([(0,Zr.property)()],Vt.prototype,"exportpartsPrefix",void 0);Lo([a1([])],Vt.prototype,"exportpartsPrefixes",void 0);Lo([(0,Zr.property)({reflect:!0})],Vt.prototype,"exportparts",void 0);Lo([(0,Zr.property)()],Vt.prototype,"customStylesheet",void 0);Lo([(0,Zr.property)()],Vt.prototype,"elementToFocus",void 0);Lo([(0,Zr.state)()],Vt.prototype,"useAdoptedStyleSheets",void 0);function va(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var pn=Symbol("internalReduxEventsUnsubscribers"),br=Symbol("internalStoresUnsubscribers"),Yr=Symbol("internalStores"),cp=ha(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Yr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Yr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Yr].get(s)}addStore(s,c){var f;c=(f=c??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(c),this[Yr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Yr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Yr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let f=this.constructor.getPropertyOptions(c);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[br].has(s.store):this[br].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var f;this[br].set(s,c.subscribe(()=>this.updateFromStores())),this[pn].set(s,[]),va(c)&&c.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||c.name===u.store)){let g=b=>this[m](b);c.addEventListener(u.eventName,g),this[pn].get(s).push(()=>c.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[br].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[br].has(s)&&this[br].get(s)(),this[br].delete(s),(c=this[pn].get(s))===null||c===void 0||c.forEach(f=>f()),this[pn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=br,r=Yr,n=pn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),h1=class extends cp(Vt){};function xt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ir(e){return!!e&&!!e[de]}function kt(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===gp}(e)||Array.isArray(e)||!!e[S1]||!!(!((t=e.constructor)===null||t===void 0)&&t[S1])||ts(e)||rs(e))}function Xr(e,t,r){r===void 0&&(r=!1),Ro(e)===0?(r?Object.keys:Ao)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function Ro(e){var t=e[de];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ts(e)?2:rs(e)?3:0}function Eo(e,t){return Ro(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lp(e,t){return Ro(e)===2?e.get(t):e[t]}function C1(e,t,r){var n=Ro(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function O1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ts(e){return hp&&e instanceof Map}function rs(e){return mp&&e instanceof Set}function vr(e){return e.o||e.t}function os(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=A1(e);delete t[de];for(var r=Ao(t),n=0;n<r.length;n++){var a=r[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function ns(e,t){return t===void 0&&(t=!1),as(e)||ir(e)||!kt(e)||(Ro(e)>1&&(e.set=e.add=e.clear=e.delete=dp),Object.freeze(e),t&&Xr(e,function(r,n){return ns(n,!0)},!0)),e}function dp(){xt(2)}function as(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function jt(e){var t=es[e];return t||xt(18,e),t}function fp(e,t){es[e]||(es[e]=t)}function Xi(){return mn}function Ki(e,t){t&&(jt("Patches"),e.u=[],e.s=[],e.v=t)}function xa(e){Qi(e),e.p.forEach(up),e.p=null}function Qi(e){e===mn&&(mn=e.l)}function m1(e){return mn={p:[],l:mn,h:e,m:!0,_:0}}function up(e){var t=e[de];t.i===0||t.i===1?t.j():t.g=!0}function qi(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||jt("ES5").S(t,e,n),n?(r[de].P&&(xa(t),xt(4)),kt(e)&&(e=Sa(t,e),t.l||Ca(t,e)),t.u&&jt("Patches").M(r[de].t,e,t.u,t.s)):e=Sa(t,r,[]),xa(t),t.u&&t.v(t.u,t.s),e!==E1?e:void 0}function Sa(e,t,r){if(as(t))return t;var n=t[de];if(!n)return Xr(t,function(c,f){return g1(e,n,t,c,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Ca(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=os(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Xr(i,function(c,f){return g1(e,n,a,c,f,r,s)}),Ca(e,a,!1),r&&e.u&&jt("Patches").N(n,r,e.u,e.s)}return n.o}function g1(e,t,r,n,a,i,s){if(ir(a)){var c=Sa(e,a,i&&t&&t.i!==3&&!Eo(t.R,n)?i.concat(n):void 0);if(C1(r,n,c),!ir(c))return;e.m=!1}else s&&r.add(a);if(kt(a)&&!as(a)){if(!e.h.D&&e._<1)return;Sa(e,a),t&&t.A.l||Ca(e,a)}}function Ca(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ns(t,r)}function Zi(e,t){var r=e[de];return(r?vr(r):e)[t]}function y1(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function xr(e){e.P||(e.P=!0,e.l&&xr(e.l))}function Yi(e){e.o||(e.o=os(e.t))}function Ji(e,t,r){var n=ts(t)?jt("MapSet").F(t,r):rs(t)?jt("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Xi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=c,u=gn;s&&(f=[c],u=hn);var m=Proxy.revocable(f,u),g=m.revoke,b=m.proxy;return c.k=b,c.j=g,b}(t,r):jt("ES5").J(t,r);return(r?r.A:Xi()).p.push(n),n}function pp(e){return ir(e)||xt(22,e),function t(r){if(!kt(r))return r;var n,a=r[de],i=Ro(r);if(a){if(!a.P&&(a.i<4||!jt("ES5").K(a)))return a.t;a.I=!0,n=b1(r,i),a.I=!1}else n=b1(r,i);return Xr(n,function(s,c){a&&lp(a.t,s)===c||C1(n,s,t(c))}),i===3?new Set(n):n}(e)}function b1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return os(e)}function L1(){function e(s,c){var f=i[s];return f?f.enumerable=c:i[s]=f={configurable:!0,enumerable:c,get:function(){var u=this[de];return gn.get(u,s)},set:function(u){var m=this[de];gn.set(m,s,u)}},f}function t(s){for(var c=s.length-1;c>=0;c--){var f=s[c][de];if(!f.P)switch(f.i){case 5:n(f)&&xr(f);break;case 4:r(f)&&xr(f)}}}function r(s){for(var c=s.t,f=s.k,u=Ao(f),m=u.length-1;m>=0;m--){var g=u[m];if(g!==de){var b=c[g];if(b===void 0&&!Eo(c,g))return!0;var S=f[g],C=S&&S[de];if(C?C.t!==b:!O1(S,b))return!0}}var E=!!c[de];return u.length!==Ao(c).length+(E?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(c,c.length-1);if(f&&!f.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&xt(3,JSON.stringify(vr(s)))}var i={};fp("ES5",{J:function(s,c){var f=Array.isArray(s),u=function(g,b){if(g){for(var S=Array(b.length),C=0;C<b.length;C++)Object.defineProperty(S,""+C,e(C,!0));return S}var E=A1(b);delete E[de];for(var T=Ao(E),M=0;M<T.length;M++){var N=T[M];E[N]=e(N,g||!!E[N].enumerable)}return Object.create(Object.getPrototypeOf(b),E)}(f,s),m={i:f?5:4,A:c?c.A:Xi(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,de,{value:m,writable:!0}),u},S:function(s,c,f){f?ir(c)&&c[de].A===s&&t(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var g=m[de];if(g){var b=g.t,S=g.k,C=g.R,E=g.i;if(E===4)Xr(S,function(U){U!==de&&(b[U]!==void 0||Eo(b,U)?C[U]||u(S[U]):(C[U]=!0,xr(g)))}),Xr(b,function(U){S[U]!==void 0||Eo(S,U)||(C[U]=!1,xr(g))});else if(E===5){if(n(g)&&(xr(g),C.length=!0),S.length<b.length)for(var T=S.length;T<b.length;T++)C[T]=!1;else for(var M=b.length;M<S.length;M++)C[M]=!0;for(var N=Math.min(S.length,b.length),$=0;$<N;$++)S.hasOwnProperty($)||(C[$]=!0),C[$]===void 0&&u(S[$])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var v1,mn,is=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",hp=typeof Map<"u",mp=typeof Set<"u",x1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",E1=is?Symbol.for("immer-nothing"):((v1={})["immer-nothing"]=!0,v1),S1=is?Symbol.for("immer-draftable"):"__$immer_draftable",de=is?Symbol.for("immer-state"):"__$immer_state";var gp=""+Object.prototype.constructor,Ao=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,A1=Object.getOwnPropertyDescriptors||function(e){var t={};return Ao(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},es={},gn={get:function(e,t){if(t===de)return e;var r=vr(e);if(!Eo(r,t))return function(a,i,s){var c,f=y1(i,s);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!kt(n)?n:n===Zi(e.t,t)?(Yi(e),e.o[t]=Ji(e.A.h,n,e)):n},has:function(e,t){return t in vr(e)},ownKeys:function(e){return Reflect.ownKeys(vr(e))},set:function(e,t,r){var n=y1(vr(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Zi(vr(e),t),i=a?.[de];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(O1(r,a)&&(r!==void 0||Eo(e.t,t)))return!0;Yi(e),xr(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Zi(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Yi(e),xr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=vr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){xt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){xt(12)}},hn={};Xr(gn,function(e,t){hn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),hn.deleteProperty=function(e,t){return hn.set.call(this,e,t,void 0)},hn.set=function(e,t,r){return gn.set.call(this,e[0],t,r,e[0])};var yp=function(){function e(r){var n=this;this.O=x1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var f=n;return function(E){var T=this;E===void 0&&(E=c);for(var M=arguments.length,N=Array(M>1?M-1:0),$=1;$<M;$++)N[$-1]=arguments[$];return f.produce(E,function(U){var K;return(K=i).call.apply(K,[T,U].concat(N))})}}var u;if(typeof i!="function"&&xt(6),s!==void 0&&typeof s!="function"&&xt(7),kt(a)){var m=m1(n),g=Ji(n,a,void 0),b=!0;try{u=i(g),b=!1}finally{b?xa(m):Qi(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(E){return Ki(m,s),qi(E,m)},function(E){throw xa(m),E}):(Ki(m,s),qi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===E1&&(u=void 0),n.D&&ns(u,!0),s){var S=[],C=[];jt("Patches").M(a,u,S,C),s(S,C)}return u}xt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(g))})};var s,c,f=n.produce(a,i,function(u,m){s=u,c=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,s,c]}):[f,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){kt(r)||xt(8),ir(r)&&(r=pp(r));var n=m1(this),a=Ji(this,r,void 0);return a[de].C=!0,Qi(n),a},t.finishDraft=function(r,n){var a=r&&r[de],i=a.A;return Ki(i,n),qi(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!x1&&xt(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=jt("Patches").$;return ir(r)?s(r,n):this.produce(r,function(c){return s(c,n)})},e}(),ft=new yp,bp=ft.produce,S7=ft.produceWithPatches.bind(ft),C7=ft.setAutoFreeze.bind(ft),O7=ft.setUseProxies.bind(ft),L7=ft.applyPatches.bind(ft),E7=ft.createDraft.bind(ft),A7=ft.finishDraft.bind(ft),Oa=bp;function Qr(e){"@babel/helpers - typeof";return Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(e)}function R1(e,t){if(Qr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function w1(e){var t=R1(e,"string");return Qr(t)=="symbol"?t:t+""}function _1(e,t,r){return(t=w1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ss(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T1(Object(r),!0).forEach(function(n){_1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ve(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var N1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),cs=function(){return Math.random().toString(36).substring(7).split("").join(".")},La={INIT:"@@redux/INIT"+cs(),REPLACE:"@@redux/REPLACE"+cs(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+cs()}};function vp(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ls(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ve(1));return r(ls)(e,t)}if(typeof e!="function")throw new Error(Ve(2));var a=e,i=t,s=[],c=s,f=!1;function u(){c===s&&(c=s.slice())}function m(){if(f)throw new Error(Ve(3));return i}function g(E){if(typeof E!="function")throw new Error(Ve(4));if(f)throw new Error(Ve(5));var T=!0;return u(),c.push(E),function(){if(T){if(f)throw new Error(Ve(6));T=!1,u();var N=c.indexOf(E);c.splice(N,1),s=null}}}function b(E){if(!vp(E))throw new Error(Ve(7));if(typeof E.type>"u")throw new Error(Ve(8));if(f)throw new Error(Ve(9));try{f=!0,i=a(i,E)}finally{f=!1}for(var T=s=c,M=0;M<T.length;M++){var N=T[M];N()}return E}function S(E){if(typeof E!="function")throw new Error(Ve(10));a=E,b({type:La.REPLACE})}function C(){var E,T=g;return E={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Ve(11));function $(){N.next&&N.next(m())}$();var U=T($);return{unsubscribe:U}}},E[N1]=function(){return this},E}return b({type:La.INIT}),n={dispatch:b,subscribe:g,getState:m,replaceReducer:S},n[N1]=C,n}function xp(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:La.INIT});if(typeof n>"u")throw new Error(Ve(12));if(typeof r(void 0,{type:La.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ve(13))})}function k1(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),s,c;try{xp(r)}catch(f){c=f}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var g;for(var b=!1,S={},C=0;C<i.length;C++){var E=i[C],T=r[E],M=u[E],N=T(M,m);if(typeof N>"u"){var $=m&&m.type;throw new Error(Ve(14))}S[E]=N,b=b||N!==M}return b=b||i.length!==Object.keys(u).length,b?S:u}}function wo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function M1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Ve(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=t.map(function(f){return f(s)});return i=wo.apply(void 0,c)(a.dispatch),ss(ss({},a),{},{dispatch:i})}}}function P1(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,e):s(c)}}};return t}var z1=P1();z1.withExtraArgument=P1;var ds=z1;var U1=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sp=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,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(m){return f([u,m])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},_o=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},Cp=Object.defineProperty,Op=Object.defineProperties,Lp=Object.getOwnPropertyDescriptors,I1=Object.getOwnPropertySymbols,Ep=Object.prototype.hasOwnProperty,Ap=Object.prototype.propertyIsEnumerable,D1=function(e,t,r){return t in e?Cp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Sr=function(e,t){for(var r in t||(t={}))Ep.call(t,r)&&D1(e,r,t[r]);if(I1)for(var n=0,a=I1(t);n<a.length;n++){var r=a[n];Ap.call(t,r)&&D1(e,r,t[r])}return e},fs=function(e,t){return Op(e,Lp(t))},Rp=function(e,t,r){return new Promise(function(n,a){var i=function(f){try{c(r.next(f))}catch(u){a(u)}},s=function(f){try{c(r.throw(f))}catch(u){a(u)}},c=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,s)};c((r=r.apply(e,t)).next())})};var wp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?wo:wo.apply(null,arguments)},W7=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function _p(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var Tp=function(e){U1(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.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(t.bind.apply(t,_o([void 0],r[0].concat(this)))):new(t.bind.apply(t,_o([void 0],r.concat(this))))},t}(Array),Np=function(e){U1(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.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(t.bind.apply(t,_o([void 0],r[0].concat(this)))):new(t.bind.apply(t,_o([void 0],r.concat(this))))},t}(Array);function hs(e){return kt(e)?Oa(e,function(){}):e}function kp(e){return typeof e=="boolean"}function Mp(){return function(t){return Pp(t)}}function Pp(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,c=new Tp;if(r&&(kp(r)?c.push(ds):c.push(ds.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return c}var us=!0;function F1(e){var t=Mp(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?t():i,c=r.devTools,f=c===void 0?!0:c,u=r.preloadedState,m=u===void 0?void 0:u,g=r.enhancers,b=g===void 0?void 0:g,S;if(typeof a=="function")S=a;else if(_p(a))S=k1(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(t),!us&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!us&&C.some(function(U){return typeof U!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=M1.apply(void 0,C),T=wo;f&&(T=wp(Sr({trace:!us},typeof f=="object"&&f)));var M=new Np(E),N=M;Array.isArray(b)?N=_o([E],b):typeof b=="function"&&(N=b(M));var $=T.apply(void 0,N);return ls(S,m,$)}function Cr(e,t){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return Sr(Sr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function H1(e){var t={},r=[],n,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,r,n]}function zp(e){return typeof e=="function"}function Ip(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?H1(t):[t,r,n],i=a[0],s=a[1],c=a[2],f;if(zp(e))f=function(){return hs(e())};else{var u=hs(e);f=function(){return u}}function m(g,b){g===void 0&&(g=f());var S=_o([i[b.type]],s.filter(function(C){var E=C.matcher;return E(b)}).map(function(C){var E=C.reducer;return E}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,E){if(E)if(ir(C)){var T=C,M=E(T,b);return M===void 0?C:M}else{if(kt(C))return Oa(C,function(N){return E(N,b)});var M=E(C,b);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},g)}return m.getInitialState=f,m}function Dp(e,t){return e+"/"+t}function G1(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:hs(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},c={};a.forEach(function(m){var g=n[m],b=Dp(t,m),S,C;"reducer"in g?(S=g.reducer,C=g.prepare):S=g,i[m]=S,s[b]=S,c[m]=C?Cr(b,C):Cr(b)});function f(){var m=typeof e.extraReducers=="function"?H1(e.extraReducers):[e.extraReducers],g=m[0],b=g===void 0?{}:g,S=m[1],C=S===void 0?[]:S,E=m[2],T=E===void 0?void 0:E,M=Sr(Sr({},b),s);return Ip(r,function(N){for(var $ in M)N.addCase($,M[$]);for(var U=0,K=C;U<K.length;U++){var le=K[U];N.addMatcher(le.matcher,le.reducer)}T&&N.addDefaultCase(T)})}var u;return{name:t,reducer:function(m,g){return u||(u=f()),u(m,g)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var $p="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Bp=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=$p[Math.random()*64|0];return t},Up=["name","message","stack","code"],ps=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),$1=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Fp=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Up;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},q7=function(){function e(t,r,n){var a=Cr(t+"/fulfilled",function(m,g,b,S){return{payload:m,meta:fs(Sr({},S||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),i=Cr(t+"/pending",function(m,g,b){return{payload:void 0,meta:fs(Sr({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=Cr(t+"/rejected",function(m,g,b,S,C){return{payload:S,error:(n&&n.serializeError||Fp)(m||"Rejected"),meta:fs(Sr({},C||{}),{arg:b,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,f=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(g,b,S){var C=n?.idGenerator?n.idGenerator(m):Bp(),E=new f,T,M=!1;function N(U){T=U,E.abort()}var $=function(){return Rp(this,null,function(){var U,K,le,et,ze,Wt,Ie;return Sp(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),et=(U=n?.condition)==null?void 0:U.call(n,m,{getState:b,extra:S}),Gp(et)?[4,et]:[3,2];case 1:et=x.sent(),x.label=2;case 2:if(et===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,ze=new Promise(function(L,F){return E.signal.addEventListener("abort",function(){return F({name:"AbortError",message:T||"Aborted"})})}),g(i(C,m,(K=n?.getPendingMeta)==null?void 0:K.call(n,{requestId:C,arg:m},{getState:b,extra:S}))),[4,Promise.race([ze,Promise.resolve(r(m,{dispatch:g,getState:b,extra:S,requestId:C,signal:E.signal,abort:N,rejectWithValue:function(L,F){return new ps(L,F)},fulfillWithValue:function(L,F){return new $1(L,F)}})).then(function(L){if(L instanceof ps)throw L;return L instanceof $1?a(L.payload,C,m,L.meta):a(L,C,m)})])];case 3:return le=x.sent(),[3,5];case 4:return Wt=x.sent(),le=Wt instanceof ps?s(null,C,m,Wt.payload,Wt.meta):s(Wt,C,m),[3,5];case 5:return Ie=n&&!n.dispatchConditionRejection&&s.match(le)&&le.meta.condition,Ie||g(le),[2,le]}})})}();return Object.assign($,{abort:N,requestId:C,arg:m,unwrap:function(){return $.then(Hp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Hp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Gp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var W1="listener",V1="completed",j1="cancelled",Z7="task-"+j1,Y7="task-"+V1,X7=W1+"-"+j1,Q7=W1+"-"+V1;var ms="listenerMiddleware";var J7=Cr(ms+"/add"),eb=Cr(ms+"/removeAll"),tb=Cr(ms+"/remove");var B1,rb=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(B1||(B1=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Wp=function(e){return function(t){setTimeout(t,e)}},ob=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Wp(10);L1();var Vp=ha(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),Ea=class extends Vp(Object){};window.ftReduxStores||(window.ftReduxStores={});var K1=class e extends Ea{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(va(i))return i;if(a==null)return;let s=G1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=F1({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=r1(s.getInitialState());for(let g of u.keeping)m[g]=(f??m)[g];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...u.overwrites};return s.reducer(f,u)}});return window.ftReduxStores[a.name]=new e(s,c,a.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ma;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let f=s,u=i[f];return u?(...m)=>{let g=u(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Aa=class{static format(t,r,n,a,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,r,n,a,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a,i){let s=typeof t=="string"?new Date(t):t,c=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),f=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?f:a?`${c} ${f}`:c}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Ra=y(w()),jp="ft-app-info",Jr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Jr.eventName="authentication-change";var Kp={session:(e,t)=>{(0,Ra.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>z.dispatchEvent(new Jr(t.payload)),0))}},z=Ra.FtReduxStore.get({name:jp,reducers:Kp,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var q1=y(w()),wa=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},Z1=(0,q1.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(z)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>Aa.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return wa([(0,gs.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),wa([(0,gs.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),wa([ji({store:z.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),wa([ji({store:z.name})],t.prototype,"uiLocale",void 0),t});var Pa=y(w());var ys=y(w());var eo=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=z.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=z.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var _a=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:eo.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):eo.await()}};var tt=class extends _a{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[f])=>c.localeCompare(f)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new ys.CacheRegistry,this.cache=t?a.commonCache:new ys.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Ta=class extends tt{async listMySearches(){let{session:t}=z.getState();return t1(t,xe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Na=class extends tt{async listMyBookmarks(){let t=z.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ka=class extends tt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=z.getState().session;return!!t?.sessionAuthenticated}};var Ma=class extends tt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=z.getState().session;return!!t?.sessionAuthenticated}};var qp="ft-user-assets",Zp={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(vt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:a}=t.payload;vs(e,r,[...bs(e,r),a]),Y1(e,r,1,n),X1(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;vs(e,r,bs(e,r).map(a=>a.id===n.id?n:a)),X1(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;vs(e,r,bs(e,r).filter(i=>i.id!==a)),Y1(e,r,-1,n)}},Q1={[vt.SEARCHES]:"savedSearches",[vt.BOOKMARKS]:"bookmarks",[vt.BOOKS]:void 0,[vt.COLLECTIONS]:void 0},bs=(e,t)=>{var r;let n=Q1[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},vs=(e,t,r)=>{let n=Q1[t];n&&(e[n]=r)},Y1=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===vt.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},X1=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},ut=Pa.FtReduxStore.get({name:qp,reducers:Zp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(vt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),xs=class{constructor(t=new ka,r=new Ma){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Na,this.savedSearchesService=new Ta,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=z.getState();(0,Pa.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ut.actions.clearAssetCount(),ut.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ut.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ut.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ut.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ut.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&ut.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&ut.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(ut.getState().assetCounts.bookmarkByMap).length!==0;t===vt.BOOKMARKS&&r&&ut.actions.clearBookmarkCountByMap(),ut.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ut.actions.bookmarks(r)}}},Yp=new xs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Yp);var Ss=class{addCommand(t,r=!1){z.commands.add(t,r)}consumeCommand(t){return z.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Ss;var St=y(w());var J1,To=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Xp=Symbol("clearAfterUnitTest"),za=class extends(0,St.withEventBus)(tt){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[J1]=()=>{this.defaultMessages={},this.cache=new St.CacheRegistry,this.listeners={}},this.currentUiLocale=z.getState().uiLocale,z.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=z.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,St.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new St.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof St.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new To({loadedContexts:t})),this.dispatchEvent(new To({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new To({loadedContexts:[t]})),this.dispatchEvent(new To({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,St.delay)(0).then(()=>n()).catch(()=>null)))}};J1=Xp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends za{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends za{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var No=window.FluidTopicsI18nService,Ia=window.FluidTopicsCustomI18nService;var ed=y(w()),Cs=class{highlightHtml(t,r,n){(0,ed.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Cs;var td=y(w());var Os=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=z.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i,s;if(t==null)return"";try{return td.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:z.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(c){throw console.error(`Date ${JSON.stringify(t)} is not valid`,c),c}}};window.FluidTopicsDateService=new Os;var rd=y(w());var yn=class{static get(t,r){var n,a;let i=z.getState(),{lang:s,region:c}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new rd.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Ls=class{urlToSearchRequest(t){return yn.get().parse(t)}searchRequestToUrl(t){return yn.get().serialize(t)}};window.FluidTopicsUrlService=new Ls;var Or=y(w());var to=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};to.eventName="change";var Es=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},od=new Es;var Da=class e extends Or.WithEventBus{static build(){return new e(window.history,od,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Or.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new to(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,c])=>{let f=r(),u={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(a,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(to.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(to.eventName,t)}currentItem(){return(0,Or.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Or.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Or.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Da.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var nd=y(I());var ad=nd.css`
|
|
13
13
|
`;var sd=y(I()),$e=y(j()),Mt=y(w());function id(e,t){let{authenticationRequired:r,session:n}=z.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Ee=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},ae=class extends Mt.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>eo.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Mt.CacheRegistry,this.cleanSessionDebouncer=new Mt.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return sd.html`
|
|
14
14
|
<slot></slot>
|
|
15
15
|
`}connectedCallback(){super.connectedCallback(),z.addEventListener(Jr.eventName,this.reloadConfiguration)}disconnectedCallback(){z.addEventListener(Jr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,n,a,i,s,c,f;super.update(t),t.has("baseUrl")&&(z.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&z.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&z.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&z.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&z.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&z.actions.noCustom(this.noCustom),t.has("editorMode")&&z.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&z.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&z.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>No.addContext(u)),t.has("openExternalDocumentInNewTab")&&z.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&z.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&z.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(z.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),z.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),z.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&z.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&z.actions.availableContentLocales((f=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&f!==void 0?f:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>id(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};ae.elementDefinitions={};ae.styles=ad;Ee([(0,$e.property)()],ae.prototype,"baseUrl",void 0);Ee([(0,$e.property)()],ae.prototype,"apiIntegrationIdentifier",void 0);Ee([(0,$e.property)()],ae.prototype,"apiIntegrationAppVersion",void 0);Ee([(0,$e.property)()],ae.prototype,"uiLocale",void 0);Ee([(0,Mt.jsonProperty)(null)],ae.prototype,"availableUiLocales",void 0);Ee([(0,Mt.jsonProperty)(null)],ae.prototype,"metadataConfiguration",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"editorMode",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"noCustom",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"openExternalDocumentInNewTab",void 0);Ee([(0,$e.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],ae.prototype,"noCustomComponent",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"withManualResources",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"navigatorOnline",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"forcedOffline",void 0);Ee([(0,$e.property)({type:Object})],ae.prototype,"apiProvider",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"authenticationRequired",void 0);Ee([(0,Mt.jsonProperty)([])],ae.prototype,"messageContexts",void 0);Ee([(0,Mt.jsonProperty)(void 0)],ae.prototype,"session",void 0);Ee([(0,$e.state)()],ae.prototype,"localesConfiguration",void 0);Ee([(0,$e.state)()],ae.prototype,"availableContentLocales",void 0);var cd=y(w());(0,cd.customElement)("ft-app-context")(ae);var $a=class e extends Event{constructor(){super(e.eventName)}};$a.eventName="search-context-clear-all-filters";var Ba=e=>e.request.virtualField===da.TITLE_ONLY&&e.request.scope===ua.DOCUMENTS,Ua=e=>e.request.keywordMatch==ar.MANDATORY;var ld=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},ws=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},dd=Symbol("registerInterval"),As=Symbol("registerAttempts"),Qp=40,Jp=(0,ko.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var a,i,s;super.willUpdate(n),n.has("neededSearchRequests")&&((a=this.stateManager)===null||a===void 0||a.unregisterComponent(this,(i=n.get("neededSearchRequests"))!==null&&i!==void 0?i:[]),(s=this.stateManager)===null||s===void 0||s.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[As]=0,this.tryToRegisterToContext(),this[dd]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[As]>Qp?window.clearInterval(this[dd]):(this[As]++,this.dispatchEvent(new ws))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return ld([(0,Rs.state)()],t.prototype,"stateManager",void 0),ld([(0,Rs.state)({hasChanged:ko.hasChanged})],t.prototype,"neededSearchRequests",void 0),t}),Lr=class extends Jp(ko.FtLitElementRedux){};var Oi=y(I()),Ue=y(j()),Ku=y(Ct()),tn=y(w());var vd=y(I()),Be=y(j()),xd=y(Ct()),vn=y(w());var yd=y(I()),Se=y(w()),ud=Se.FtCssVariableFactory.extend("--ft-ripple-color","",Se.designSystemVariables.colorContent),O={color:ud,backgroundColor:Se.FtCssVariableFactory.extend("--ft-ripple-background-color","",ud),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")},pd=Se.FtCssVariableFactory.extend("--ft-ripple-color","",Se.designSystemVariables.colorPrimary),hd={color:pd,backgroundColor:Se.FtCssVariableFactory.extend("--ft-ripple-background-color","",pd)},md=Se.FtCssVariableFactory.extend("--ft-ripple-color","",Se.designSystemVariables.colorSecondary),gd={color:md,backgroundColor:Se.FtCssVariableFactory.extend("--ft-ripple-background-color","",md)},bd=yd.css`
|
|
@@ -45,7 +45,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
45
45
|
input::-webkit-search-results-decoration {
|
|
46
46
|
display: none;
|
|
47
47
|
}
|
|
48
|
-
`;var p1={};var Js={};Q(Js,{ParametrizedLabelResolver:()=>An});var An=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,i;e=this.resolvePluralKey(e,r);let a=(i=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((o,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let i=`${String(e)}[\\=${o}]`;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 o=i=>r?.includes("date")?e.toLocaleDateString(i):r?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return o(document.documentElement.lang)}catch{return o()}}};var Ec={};Q(Ec,{FtCommandQueue:()=>Rn,FtLitElementRedux:()=>oo,FtReduxStore:()=>Ar,FtStateManager:()=>Ii,ReduxWatcher:()=>Pi,clearAllStores:()=>$h,isFtReduxStore:()=>To,redux:()=>$e,reduxEventListener:()=>th,reduxReactive:()=>eh,watch:()=>K1,withRedux:()=>h1});var eh=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},$e=t=>{let e=t??{};return(r,o)=>{var i;let a={hasChanged:lt,attribute:!1,...e};b(a)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(i=e.selector)!==null&&i!==void 0?i:c=>c[o],store:e.store})}},th=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var Rn=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==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 To(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var wn=Symbol("internalReduxEventsUnsubscribers"),Sr=Symbol("internalStoresUnsubscribers"),ro=Symbol("internalStores"),h1=ke(Symbol("withRedux"),function(t){var e,r,o;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[ro].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ro].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ro].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[ro].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[ro].delete(c)}setupStores(){this.unsubscribeFromStores(),this[ro].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let f=this.getStore(s.store);f&&(s.store?this[Sr].has(s.store):this[Sr].size>0)&&(this[c]=s.selector(f.getState(),this))}})}subscribeToStore(s,c){var d;this[Sr].set(s,c.subscribe(()=>this.updateFromStores())),this[wn].set(s,[]),To(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||c.name===f.store)){let p=g=>this[h](g);c.addEventListener(f.eventName,p),this[wn].get(s).push(()=>c.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Sr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Sr].has(s)&&this[Sr].get(s)(),this[Sr].delete(s),(c=this[wn].get(s))===null||c===void 0||c.forEach(d=>d()),this[wn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Sr,r=ro,o=wn,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),oo=class extends h1(K){};function xt(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];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 sr(t){return!!t&&!!t[be]}function _t(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var i=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===lh}(t)||Array.isArray(t)||!!t[S1]||!!(!((e=t.constructor)===null||e===void 0)&&e[S1])||cc(t)||lc(t))}function no(t,e,r){r===void 0&&(r=!1),Mo(t)===0?(r?Object.keys:No)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,i){return e(i,o,t)})}function Mo(t){var e=t[be];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:cc(t)?2:lc(t)?3:0}function ko(t,e){return Mo(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function rh(t,e){return Mo(t)===2?t.get(e):t[e]}function C1(t,e,r){var o=Mo(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function E1(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function cc(t){return sh&&t instanceof Map}function lc(t){return ch&&t instanceof Set}function Cr(t){return t.o||t.t}function dc(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=A1(t);delete e[be];for(var r=No(e),o=0;o<r.length;o++){var i=r[o],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 fc(t,e){return e===void 0&&(e=!1),uc(t)||sr(t)||!_t(t)||(Mo(t)>1&&(t.set=t.add=t.clear=t.delete=oh),Object.freeze(t),e&&no(t,function(r,o){return fc(o,!0)},!0)),t}function oh(){xt(2)}function uc(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function jt(t){var e=sc[t];return e||xt(18,t),e}function nh(t,e){sc[t]||(sc[t]=e)}function nc(){return Tn}function ec(t,e){e&&(jt("Patches"),t.u=[],t.s=[],t.v=e)}function _i(t){ic(t),t.p.forEach(ih),t.p=null}function ic(t){t===Tn&&(Tn=t.l)}function m1(t){return Tn={p:[],l:Tn,h:t,m:!0,_:0}}function ih(t){var e=t[be];e.i===0||e.i===1?e.j():e.g=!0}function tc(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||jt("ES5").S(e,t,o),o?(r[be].P&&(_i(e),xt(4)),_t(t)&&(t=Ti(e,t),e.l||ki(e,t)),e.u&&jt("Patches").M(r[be].t,t,e.u,e.s)):t=Ti(e,r,[]),_i(e),e.u&&e.v(e.u,e.s),t!==L1?t:void 0}function Ti(t,e,r){if(uc(e))return e;var o=e[be];if(!o)return no(e,function(c,d){return g1(t,o,e,c,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return ki(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var i=o.i===4||o.i===5?o.o=dc(o.k):o.o,a=i,s=!1;o.i===3&&(a=new Set(i),i.clear(),s=!0),no(a,function(c,d){return g1(t,o,i,c,d,r,s)}),ki(t,i,!1),r&&t.u&&jt("Patches").N(o,r,t.u,t.s)}return o.o}function g1(t,e,r,o,i,a,s){if(sr(i)){var c=Ti(t,i,a&&e&&e.i!==3&&!ko(e.R,o)?a.concat(o):void 0);if(C1(r,o,c),!sr(c))return;t.m=!1}else s&&r.add(i);if(_t(i)&&!uc(i)){if(!t.h.D&&t._<1)return;Ti(t,i),e&&e.A.l||ki(t,i)}}function ki(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&fc(e,r)}function rc(t,e){var r=t[be];return(r?Cr(r):t)[e]}function y1(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function Er(t){t.P||(t.P=!0,t.l&&Er(t.l))}function oc(t){t.o||(t.o=dc(t.t))}function ac(t,e,r){var o=cc(e)?jt("MapSet").F(e,r):lc(e)?jt("MapSet").T(e,r):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:nc(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},d=c,f=kn;s&&(d=[c],f=_n);var h=Proxy.revocable(d,f),p=h.revoke,g=h.proxy;return c.k=g,c.j=p,g}(e,r):jt("ES5").J(e,r);return(r?r.A:nc()).p.push(o),o}function ah(t){return sr(t)||xt(22,t),function e(r){if(!_t(r))return r;var o,i=r[be],a=Mo(r);if(i){if(!i.P&&(i.i<4||!jt("ES5").K(i)))return i.t;i.I=!0,o=b1(r,a),i.I=!1}else o=b1(r,a);return no(o,function(s,c){i&&rh(i.t,s)===c||C1(o,s,e(c))}),a===3?new Set(o):o}(t)}function b1(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return dc(t)}function O1(){function t(s,c){var d=a[s];return d?d.enumerable=c:a[s]=d={configurable:!0,enumerable:c,get:function(){var f=this[be];return kn.get(f,s)},set:function(f){var h=this[be];kn.set(h,s,f)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][be];if(!d.P)switch(d.i){case 5:o(d)&&Er(d);break;case 4:r(d)&&Er(d)}}}function r(s){for(var c=s.t,d=s.k,f=No(d),h=f.length-1;h>=0;h--){var p=f[h];if(p!==be){var g=c[p];if(g===void 0&&!ko(c,p))return!0;var S=d[p],C=S&&S[be];if(C?C.t!==g:!E1(S,g))return!0}}var R=!!c[be];return f.length!==No(c).length+(R?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function i(s){s.g&&xt(3,JSON.stringify(Cr(s)))}var a={};nh("ES5",{J:function(s,c){var d=Array.isArray(s),f=function(p,g){if(p){for(var S=Array(g.length),C=0;C<g.length;C++)Object.defineProperty(S,""+C,t(C,!0));return S}var R=A1(g);delete R[be];for(var k=No(R),M=0;M<k.length;M++){var I=k[M];R[I]=t(I,p||!!R[I].enumerable)}return Object.create(Object.getPrototypeOf(g),R)}(d,s),h={i:d?5:4,A:c?c.A:nc(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,be,{value:h,writable:!0}),f},S:function(s,c,d){d?sr(c)&&c[be].A===s&&e(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var p=h[be];if(p){var g=p.t,S=p.k,C=p.R,R=p.i;if(R===4)no(S,function(O){O!==be&&(g[O]!==void 0||ko(g,O)?C[O]||f(S[O]):(C[O]=!0,Er(p)))}),no(g,function(O){S[O]!==void 0||ko(S,O)||(C[O]=!1,Er(p))});else if(R===5){if(o(p)&&(Er(p),C.length=!0),S.length<g.length)for(var k=S.length;k<g.length;k++)C[k]=!1;else for(var M=g.length;M<S.length;M++)C[M]=!0;for(var I=Math.min(S.length,g.length),L=0;L<I;L++)S.hasOwnProperty(L)||(C[L]=!0),C[L]===void 0&&f(S[L])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var v1,Tn,pc=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",sh=typeof Map<"u",ch=typeof Set<"u",x1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",L1=pc?Symbol.for("immer-nothing"):((v1={})["immer-nothing"]=!0,v1),S1=pc?Symbol.for("immer-draftable"):"__$immer_draftable",be=pc?Symbol.for("immer-state"):"__$immer_state";var lh=""+Object.prototype.constructor,No=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,A1=Object.getOwnPropertyDescriptors||function(t){var e={};return No(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},sc={},kn={get:function(t,e){if(e===be)return t;var r=Cr(t);if(!ko(r,e))return function(i,a,s){var c,d=y1(a,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,r,e);var o=r[e];return t.I||!_t(o)?o:o===rc(t.t,e)?(oc(t),t.o[e]=ac(t.A.h,o,t)):o},has:function(t,e){return e in Cr(t)},ownKeys:function(t){return Reflect.ownKeys(Cr(t))},set:function(t,e,r){var o=y1(Cr(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var i=rc(Cr(t),e),a=i?.[be];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(E1(r,i)&&(r!==void 0||ko(t.t,e)))return!0;oc(t),Er(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 rc(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,oc(t),Er(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Cr(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){xt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){xt(12)}},_n={};no(kn,function(t,e){_n[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),_n.deleteProperty=function(t,e){return _n.set.call(this,t,e,void 0)},_n.set=function(t,e,r){return kn.set.call(this,t[0],e,r,t[0])};var dh=function(){function t(r){var o=this;this.O=x1,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var d=o;return function(R){var k=this;R===void 0&&(R=c);for(var M=arguments.length,I=Array(M>1?M-1:0),L=1;L<M;L++)I[L-1]=arguments[L];return d.produce(R,function(O){var _;return(_=a).call.apply(_,[k,O].concat(I))})}}var f;if(typeof a!="function"&&xt(6),s!==void 0&&typeof s!="function"&&xt(7),_t(i)){var h=m1(o),p=ac(o,i,void 0),g=!0;try{f=a(p),g=!1}finally{g?_i(h):ic(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(R){return ec(h,s),tc(R,h)},function(R){throw _i(h),R}):(ec(h,s),tc(f,h))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===L1&&(f=void 0),o.D&&fc(f,!0),s){var S=[],C=[];jt("Patches").M(i,f,S,C),s(S,C)}return f}xt(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var h=arguments.length,p=Array(h>1?h-1:0),g=1;g<h;g++)p[g-1]=arguments[g];return o.produceWithPatches(f,function(S){return i.apply(void 0,[S].concat(p))})};var s,c,d=o.produce(i,a,function(f,h){s=f,c=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(f){return[f,s,c]}):[d,s,c]},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){_t(r)||xt(8),sr(r)&&(r=ah(r));var o=m1(this),i=ac(this,r,void 0);return i[be].C=!0,ic(o),i},e.finishDraft=function(r,o){var i=r&&r[be],a=i.A;return ec(a,o),tc(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!x1&&xt(20),this.O=r},e.applyPatches=function(r,o){var i;for(i=o.length-1;i>=0;i--){var a=o[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(o=o.slice(i+1));var s=jt("Patches").$;return sr(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},t}(),ft=new dh,fh=ft.produce,WS=ft.produceWithPatches.bind(ft),VS=ft.setAutoFreeze.bind(ft),jS=ft.setUseProxies.bind(ft),KS=ft.applyPatches.bind(ft),qS=ft.createDraft.bind(ft),ZS=ft.finishDraft.bind(ft),Ni=fh;function io(t){"@babel/helpers - typeof";return io=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},io(t)}function R1(t,e){if(io(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(io(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function w1(t){var e=R1(t,"string");return io(e)=="symbol"?e:e+""}function _1(t,e,r){return(e=w1(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function T1(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,o)}return r}function hc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?T1(Object(r),!0).forEach(function(o){_1(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):T1(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function je(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 k1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),mc=function(){return Math.random().toString(36).substring(7).split("").join(".")},Mi={INIT:"@@redux/INIT"+mc(),REPLACE:"@@redux/REPLACE"+mc(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+mc()}};function uh(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 gc(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(je(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(je(1));return r(gc)(t,e)}if(typeof t!="function")throw new Error(je(2));var i=t,a=e,s=[],c=s,d=!1;function f(){c===s&&(c=s.slice())}function h(){if(d)throw new Error(je(3));return a}function p(R){if(typeof R!="function")throw new Error(je(4));if(d)throw new Error(je(5));var k=!0;return f(),c.push(R),function(){if(k){if(d)throw new Error(je(6));k=!1,f();var I=c.indexOf(R);c.splice(I,1),s=null}}}function g(R){if(!uh(R))throw new Error(je(7));if(typeof R.type>"u")throw new Error(je(8));if(d)throw new Error(je(9));try{d=!0,a=i(a,R)}finally{d=!1}for(var k=s=c,M=0;M<k.length;M++){var I=k[M];I()}return R}function S(R){if(typeof R!="function")throw new Error(je(10));i=R,g({type:Mi.REPLACE})}function C(){var R,k=p;return R={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(je(11));function L(){I.next&&I.next(h())}L();var O=k(L);return{unsubscribe:O}}},R[k1]=function(){return this},R}return g({type:Mi.INIT}),o={dispatch:g,subscribe:p,getState:h,replaceReducer:S},o[k1]=C,o}function ph(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:Mi.INIT});if(typeof o>"u")throw new Error(je(12));if(typeof r(void 0,{type:Mi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(je(13))})}function N1(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var i=e[o];typeof t[i]=="function"&&(r[i]=t[i])}var a=Object.keys(r),s,c;try{ph(r)}catch(d){c=d}return function(f,h){if(f===void 0&&(f={}),c)throw c;if(0)var p;for(var g=!1,S={},C=0;C<a.length;C++){var R=a[C],k=r[R],M=f[R],I=k(M,h);if(typeof I>"u"){var L=h&&h.type;throw new Error(je(14))}S[R]=I,g=g||I!==M}return g=g||a.length!==Object.keys(f).length,g?S:f}}function Po(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,i){return function(){return o(i.apply(void 0,arguments))}})}function M1(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var i=o.apply(void 0,arguments),a=function(){throw new Error(je(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return a=Po.apply(void 0,c)(i.dispatch),hc(hc({},i),{},{dispatch:a})}}}function P1(t){var e=function(o){var i=o.dispatch,a=o.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var I1=P1();I1.withExtraArgument=P1;var yc=I1;var F1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,i){o.__proto__=i}||function(o,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(o[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 o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),hh=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,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(f){return function(h){return d([f,h])}}function d(f){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,i=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){r.label=f[1];break}if(f[0]===6&&r.label<a[1]){r.label=a[1],a=f;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(f);break}a[2]&&r.ops.pop(),r.trys.pop();continue}f=e.call(t,r)}catch(h){f=[6,h],i=0}finally{o=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Io=function(t,e){for(var r=0,o=e.length,i=t.length;r<o;r++,i++)t[i]=e[r];return t},mh=Object.defineProperty,gh=Object.defineProperties,yh=Object.getOwnPropertyDescriptors,z1=Object.getOwnPropertySymbols,bh=Object.prototype.hasOwnProperty,vh=Object.prototype.propertyIsEnumerable,D1=function(t,e,r){return e in t?mh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Or=function(t,e){for(var r in e||(e={}))bh.call(e,r)&&D1(t,r,e[r]);if(z1)for(var o=0,i=z1(e);o<i.length;o++){var r=i[o];vh.call(e,r)&&D1(t,r,e[r])}return t},bc=function(t,e){return gh(t,yh(e))},xh=function(t,e,r){return new Promise(function(o,i){var a=function(d){try{c(r.next(d))}catch(f){i(f)}},s=function(d){try{c(r.throw(d))}catch(f){i(f)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(a,s)};c((r=r.apply(t,e)).next())})};var Sh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Po:Po.apply(null,arguments)},pC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Ch(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 Eh=function(t){F1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];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=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Io([void 0],r[0].concat(this)))):new(e.bind.apply(e,Io([void 0],r.concat(this))))},e}(Array),Oh=function(t){F1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];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=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Io([void 0],r[0].concat(this)))):new(e.bind.apply(e,Io([void 0],r.concat(this))))},e}(Array);function Sc(t){return _t(t)?Ni(t,function(){}):t}function Lh(t){return typeof t=="boolean"}function Ah(){return function(e){return Rh(e)}}function Rh(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,i=o===void 0?!0:o,a=t.serializableCheck,s=a===void 0?!0:a,c=new Eh;if(r&&(Lh(r)?c.push(yc):c.push(yc.withExtraArgument(r.extraArgument))),0){if(i)var d;if(s)var f}return c}var vc=!0;function U1(t){var e=Ah(),r=t||{},o=r.reducer,i=o===void 0?void 0:o,a=r.middleware,s=a===void 0?e():a,c=r.devTools,d=c===void 0?!0:c,f=r.preloadedState,h=f===void 0?void 0:f,p=r.enhancers,g=p===void 0?void 0:p,S;if(typeof i=="function")S=i;else if(Ch(i))S=N1(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 C=s;if(typeof C=="function"&&(C=C(e),!vc&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!vc&&C.some(function(O){return typeof O!="function"}))throw new Error("each middleware provided to configureStore must be a function");var R=M1.apply(void 0,C),k=Po;d&&(k=Sh(Or({trace:!vc},typeof d=="object"&&d)));var M=new Oh(R),I=M;Array.isArray(g)?I=Io([R],g):typeof g=="function"&&(I=g(M));var L=k.apply(void 0,I);return gc(S,h,L)}function Lr(t,e){function r(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(e){var a=e.apply(void 0,o);if(!a)throw new Error("prepareAction did not return an object");return Or(Or({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function H1(t){var e={},r=[],o,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 r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return o=a,i}};return t(i),[e,r,o]}function wh(t){return typeof t=="function"}function _h(t,e,r,o){r===void 0&&(r=[]);var i=typeof e=="function"?H1(e):[e,r,o],a=i[0],s=i[1],c=i[2],d;if(wh(t))d=function(){return Sc(t())};else{var f=Sc(t);d=function(){return f}}function h(p,g){p===void 0&&(p=d());var S=Io([a[g.type]],s.filter(function(C){var R=C.matcher;return R(g)}).map(function(C){var R=C.reducer;return R}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,R){if(R)if(sr(C)){var k=C,M=R(k,g);return M===void 0?C:M}else{if(_t(C))return Ni(C,function(I){return R(I,g)});var M=R(C,g);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},p)}return h.getInitialState=d,h}function Th(t,e){return t+"/"+e}function G1(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:Sc(t.initialState),o=t.reducers||{},i=Object.keys(o),a={},s={},c={};i.forEach(function(h){var p=o[h],g=Th(e,h),S,C;"reducer"in p?(S=p.reducer,C=p.prepare):S=p,a[h]=S,s[g]=S,c[h]=C?Lr(g,C):Lr(g)});function d(){var h=typeof t.extraReducers=="function"?H1(t.extraReducers):[t.extraReducers],p=h[0],g=p===void 0?{}:p,S=h[1],C=S===void 0?[]:S,R=h[2],k=R===void 0?void 0:R,M=Or(Or({},g),s);return _h(r,function(I){for(var L in M)I.addCase(L,M[L]);for(var O=0,_=C;O<_.length;O++){var $=_[O];I.addMatcher($.matcher,$.reducer)}k&&I.addDefaultCase(k)})}var f;return{name:e,reducer:function(h,p){return f||(f=d()),f(h,p)},actions:c,caseReducers:a,getInitialState:function(){return f||(f=d()),f.getInitialState()}}}var kh="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Nh=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=kh[Math.random()*64|0];return e},Mh=["name","message","stack","code"],xc=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),$1=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),Ph=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Mh;r<o.length;r++){var i=o[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},yC=function(){function t(e,r,o){var i=Lr(e+"/fulfilled",function(h,p,g,S){return{payload:h,meta:bc(Or({},S||{}),{arg:g,requestId:p,requestStatus:"fulfilled"})}}),a=Lr(e+"/pending",function(h,p,g){return{payload:void 0,meta:bc(Or({},g||{}),{arg:p,requestId:h,requestStatus:"pending"})}}),s=Lr(e+"/rejected",function(h,p,g,S,C){return{payload:S,error:(o&&o.serializeError||Ph)(h||"Rejected"),meta:bc(Or({},C||{}),{arg:g,requestId:p,rejectedWithValue:!!S,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!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 f(h){return function(p,g,S){var C=o?.idGenerator?o.idGenerator(h):Nh(),R=new d,k,M=!1;function I(O){k=O,R.abort()}var L=function(){return xh(this,null,function(){var O,_,$,Z,ee,J,V;return hh(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),Z=(O=o?.condition)==null?void 0:O.call(o,h,{getState:g,extra:S}),zh(Z)?[4,Z]:[3,2];case 1:Z=v.sent(),v.label=2;case 2:if(Z===!1||R.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,ee=new Promise(function(A,H){return R.signal.addEventListener("abort",function(){return H({name:"AbortError",message:k||"Aborted"})})}),p(a(C,h,(_=o?.getPendingMeta)==null?void 0:_.call(o,{requestId:C,arg:h},{getState:g,extra:S}))),[4,Promise.race([ee,Promise.resolve(r(h,{dispatch:p,getState:g,extra:S,requestId:C,signal:R.signal,abort:I,rejectWithValue:function(A,H){return new xc(A,H)},fulfillWithValue:function(A,H){return new $1(A,H)}})).then(function(A){if(A instanceof xc)throw A;return A instanceof $1?i(A.payload,C,h,A.meta):i(A,C,h)})])];case 3:return $=v.sent(),[3,5];case 4:return J=v.sent(),$=J instanceof xc?s(null,C,h,J.payload,J.meta):s(J,C,h),[3,5];case 5:return V=o&&!o.dispatchConditionRejection&&s.match($)&&$.meta.condition,V||p($),[2,$]}})})}();return Object.assign(L,{abort:I,requestId:C,arg:h,unwrap:function(){return L.then(Ih)}})}}return Object.assign(f,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function Ih(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function zh(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var W1="listener",V1="completed",j1="cancelled",bC="task-"+j1,vC="task-"+V1,xC=W1+"-"+j1,SC=W1+"-"+V1;var Cc="listenerMiddleware";var CC=Lr(Cc+"/add"),EC=Lr(Cc+"/removeAll"),OC=Lr(Cc+"/remove");var B1,LC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(B1||(B1=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Dh=function(t){return function(e){setTimeout(e,t)}},AC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Dh(10);O1();window.ftReduxStores||(window.ftReduxStores={});var Ar=class t extends ir{static get(e){var r;let o=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[o];if(To(a))return a;if(i==null)return;let s=G1({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),c=U1({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=Kr(s.getInitialState());for(let p of f.keeping)h[p]=(d??h)[p];return h}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...f.overwrites};return s.reducer(d,f)}});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Rn;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let d=s,f=a[d];return f?(...h)=>{let p=f(...h.map(i));return this.reduxStore.dispatch(p),p}:h=>{this.setState({[d]:i(h)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}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 $h(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))To(e)&&e.clear()}var Pi=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}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);lt(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 K1(t,e,r){return new Pi(t,e,r).watch()}var Ii=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Ac={};Q(Ac,{scrollHelper:()=>Bh});var Oc,zi=new Map,Lc=class{lock(e,r){if(r){let o=zi.get(r);if(o==null||o===e)return zi.set(r,e),r}}release(e,r){r&&zi.get(r)===e&&zi.delete(r)}findFirstScrollableParent(e){var r;let o,i;for(let a of Za(e)){let s=a,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&i==null&&(i=s)}return(r=o??i)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,i;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(o=r.offsetTop)!==null&&o!==void 0?o: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 o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let i=this.getAbsoluteScrollOffset(o,e),a=i-o.clientHeight+e.clientHeight,s=i,c=br(0,(s-o.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,c)*(a-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(Oc=window.FluidTopicsScrollHelper)!==null&&Oc!==void 0?Oc:new Lc;var Bh=window.FluidTopicsScrollHelper;var Rc={};Q(Rc,{SearchPlaceConverter:()=>Do,SearchPlaceQueryParams:()=>ie,isSearchPlaceQueryParams:()=>k2,serializeRequest:()=>Gh});var Uh=Sp(Z1(),1);var Y1;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Y1||(Y1={}));var X1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(X1||(X1={}));var Q1;(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.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Q1||(Q1={}));var J1;(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.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(J1||(J1={}));var e2;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(e2||(e2={}));var t2;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(t2||(t2={}));var r2;(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.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",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.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_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__AI_TRANSLATE="TOPIC__AI_TRANSLATE",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"})(r2||(r2={}));var o2;(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"})(o2||(o2={}));var n2;(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",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(n2||(n2={}));var i2;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(i2||(i2={}));var a2;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(a2||(a2={}));var s2;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(s2||(s2={}));var c2;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(c2||(c2={}));var l2;(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"})(l2||(l2={}));var ut;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(ut||(ut={}));var d2;(function(t){t.ASC="ASC",t.DESC="DESC"})(d2||(d2={}));var f2;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(f2||(f2={}));var Nn;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Nn||(Nn={}));var b2=t=>Object.keys(Nn).includes(t);var u2;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(u2||(u2={}));var p2;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(p2||(p2={}));var h2;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(h2||(h2={}));var wr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(wr||(wr={}));var v2=t=>Object.keys(wr).includes(t);var m2;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(m2||(m2={}));var Bi;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Bi||(Bi={}));var g2;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(g2||(g2={}));var we;(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.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.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(we||(we={}));var St;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(St||(St={}));var y2;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(y2||(y2={}));var x2;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(x2||(x2={}));var S2;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(S2||(S2={}));var C2;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(C2||(C2={}));var E2;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(E2||(E2={}));var O2;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(O2||(O2={}));var L2;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(L2||(L2={}));var A2;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(A2||(A2={}));var R2;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(R2||(R2={}));var Fh={[we.PERSONAL_BOOK_SHARE_USER]:[we.PERSONAL_BOOK_USER],[we.HTML_EXPORT_USER]:[we.PERSONAL_BOOK_USER],[we.PDF_EXPORT_USER]:[we.PERSONAL_BOOK_USER],[we.KHUB_ADMIN]:[we.CONTENT_PUBLISHER],[we.ADMIN]:[we.KHUB_ADMIN,we.USERS_ADMIN,we.PORTAL_ADMIN,we.BEHAVIOR_DATA_USER],[we.GENERATIVE_AI_EXPORT_USER]:[we.GENERATIVE_AI_USER]};function w2(t,e){return t===e||(Fh[t]??[]).some(r=>w2(r,e))}function _2(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(o=>w2(o,e))}function Hh(t){return`"${t}"`}function T2(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Gh(t,e){return new Do(t).serialize(e)}var ie;(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",t.KEYWORD_MATCH="keyword-match"})(ie||(ie={}));var Wh=new Set(Object.values(ie));function k2(t){return Wh.has(t)}var Do=class{constructor(e,r=20,o=!1,i="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=i,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 o=r==null||r.trim().length===0,i=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return i.search=this.toURLSearchParams(e),i.toString()}toURLSearchParams(e,r=!1){var o,i,a,s,c,d,f,h,p,g,S;let C=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&C.append(ie.LOCALE,e.contentLocale):C.append(ie.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&C.append(ie.QUERY,e.query);let R=(a=(i=e.metadataFilters)===null||i===void 0?void 0:i.filter(O=>O.valueFilter&&!O.valueFilter.negative))!==null&&a!==void 0?a:[];if(R.length>0){let O=R.map(_=>{var $,Z;let ee=((Z=($=_.valueFilter)===null||$===void 0?void 0:$.values)!==null&&Z!==void 0?Z:[]).map(J=>this.escapeFilters(J)).map(J=>Hh(T2(J))).join("_");return`${_.key}~${ee}`}).join("*");C.append(ie.VALUE_FILTERS,O)}let k=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(O=>O.dateFilter))!==null&&c!==void 0?c:[];if(k.length>0){let O=k.map(_=>{var $;return`${_.key}~${($=_.dateFilter)===null||$===void 0?void 0:$.type.toLowerCase()}`}).join("*");C.append(ie.DATE_FILTERS,O)}let M=(f=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(O=>O.rangeFilter))!==null&&f!==void 0?f:[];if(M.length>0){let O=M.map(_=>{var $,Z;return`${_.key}~${($=_.rangeFilter)===null||$===void 0?void 0:$.from}_${(Z=_.rangeFilter)===null||Z===void 0?void 0:Z.to}`}).join("*");C.append(ie.RANGE_FILTERS,O)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&C.append(ie.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&C.append(ie.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&C.append(ie.SORT,e.sortId),!((h=e.paging)===null||h===void 0)&&h.perPage&&((g=(p=e.paging)===null||p===void 0?void 0:p.perPage)!==null&&g!==void 0?g:this.defaultPerPage)!=this.defaultPerPage&&C.append(ie.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&C.append(ie.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let I=(S=e.otherQueryParams)!==null&&S!==void 0?S:{};for(let O in I)C.append(O,I[O]);let L=new Array;return C.forEach((O,_)=>{L.push(this.encodeQueryString(_)+"="+this.encodeQueryString(O))}),encodeURI(L.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),i=this.fromURLSearchParams(o.slice(1).join("?")),a=o[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,o,i,a,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(M){console.warn("Could not decode search request query params, fallback on raw value",M)}let d=new URLSearchParams(e),f=d.get(ie.LOCALE)==="all"?void 0:d.get(ie.LOCALE),h=((r=d.get(ie.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),p=(o=d.get(ie.SORT))===null||o===void 0?void 0:o.toLowerCase(),g=(i=d.get(ie.SCOPE))!==null&&i!==void 0?i:"default",S=+((a=d.get(ie.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),C=d.get(ie.KEYWORD_MATCH),R=C?C.toUpperCase()===ut.MANDATORY?ut.MANDATORY:ut.OPTIONAL:void 0,k={};for(let M of d.keys())k2(M)||(k[M]=d.get(M));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(ie.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[g])!==null&&c!==void 0?c:"DEFAULT",virtualField:b2(h)?h:"EVERYWHERE",sortId:p,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:br(1,isNaN(S)?this.defaultPerPage:S,1e3)},keywordMatch:R,otherQueryParams:k}}parseCompatFilters(e){var r,o,i,a,s,c;let d=[];return e.has(ie.FILTERS)&&(d=this.parseValueFilters((r=e.get(ie.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(ie.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((i=e.get(ie.PERIOD))!==null&&i!==void 0?i:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(ie.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(ie.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(ie.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}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(T2).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:wr[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,o,i]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,i]of this.filtersEscapeMapping)e=e.replaceAll(o,i);return e}unescapeFilterValue(e){for(let[r,o,i]of this.filtersEscapeMapping)e=e.replace(i,r);return e}parseLegacyPeriodFilter(e){if(v2(e))return[{key:"ft:lastEdition",dateFilter:{type:wr[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,i]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:i}}]}return[]}};var Tc={};Q(Tc,{toFtFormComponent:()=>_c});var wc=Symbol("elementInternals"),_c=ke(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[wc].form}constructor(...o){super(o),this[wc]=this.attachInternals()}setFormValue(o){this[wc].setFormValue(o)}}return e});var kc={};Q(kc,{DateFormatter:()=>ao});var ao=class{static format(e,r,o,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,i)):this.getIntlDateTime(e,r,o,i)}static getMomentDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,i){let a=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(a);if(!i)return s;let c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return`${s} ${c}`}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Mc={};Q(Mc,{ALL_KEYS_VALUE:()=>Nc,SameWindowStorageEvent:()=>$o});var Nc="__all__",$o=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Nc}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new $o(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new $o(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new $o(Nc))}});var Pc={};Q(Pc,{FocusMainContentEvent:()=>Mn});var Mn=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var N2={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function Vh(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function jh(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",Vh);document.addEventListener("click",jh);var M2=P`
|
|
48
|
+
`;var p1={};var Js={};Q(Js,{ParametrizedLabelResolver:()=>An});var An=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,i;e=this.resolvePluralKey(e,r);let a=(i=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((o,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let i=`${String(e)}[\\=${o}]`;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 o=i=>r?.includes("date")?e.toLocaleDateString(i):r?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return o(document.documentElement.lang)}catch{return o()}}};var Ec={};Q(Ec,{FtCommandQueue:()=>Rn,FtLitElementRedux:()=>oo,FtReduxStore:()=>Ar,FtStateManager:()=>Ii,ReduxWatcher:()=>Pi,clearAllStores:()=>$h,isFtReduxStore:()=>To,redux:()=>$e,reduxEventListener:()=>th,reduxReactive:()=>eh,watch:()=>K1,withRedux:()=>h1});var eh=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},$e=t=>{let e=t??{};return(r,o)=>{var i;let a={hasChanged:lt,attribute:!1,...e};b(a)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(i=e.selector)!==null&&i!==void 0?i:c=>c[o],store:e.store})}},th=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var Rn=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==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 To(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var wn=Symbol("internalReduxEventsUnsubscribers"),Sr=Symbol("internalStoresUnsubscribers"),ro=Symbol("internalStores"),h1=ke(Symbol("withRedux"),function(t){var e,r,o;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[ro].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ro].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ro].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[ro].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[ro].delete(c)}setupStores(){this.unsubscribeFromStores(),this[ro].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let f=this.getStore(s.store);f&&(s.store?this[Sr].has(s.store):this[Sr].size>0)&&(this[c]=s.selector(f.getState(),this))}})}subscribeToStore(s,c){var d;this[Sr].set(s,c.subscribe(()=>this.updateFromStores())),this[wn].set(s,[]),To(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||c.name===f.store)){let p=g=>this[h](g);c.addEventListener(f.eventName,p),this[wn].get(s).push(()=>c.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Sr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Sr].has(s)&&this[Sr].get(s)(),this[Sr].delete(s),(c=this[wn].get(s))===null||c===void 0||c.forEach(d=>d()),this[wn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Sr,r=ro,o=wn,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),oo=class extends h1(K){};function xt(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];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 sr(t){return!!t&&!!t[be]}function _t(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var i=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===lh}(t)||Array.isArray(t)||!!t[S1]||!!(!((e=t.constructor)===null||e===void 0)&&e[S1])||cc(t)||lc(t))}function no(t,e,r){r===void 0&&(r=!1),Mo(t)===0?(r?Object.keys:No)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,i){return e(i,o,t)})}function Mo(t){var e=t[be];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:cc(t)?2:lc(t)?3:0}function ko(t,e){return Mo(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function rh(t,e){return Mo(t)===2?t.get(e):t[e]}function C1(t,e,r){var o=Mo(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function E1(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function cc(t){return sh&&t instanceof Map}function lc(t){return ch&&t instanceof Set}function Cr(t){return t.o||t.t}function dc(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=A1(t);delete e[be];for(var r=No(e),o=0;o<r.length;o++){var i=r[o],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 fc(t,e){return e===void 0&&(e=!1),uc(t)||sr(t)||!_t(t)||(Mo(t)>1&&(t.set=t.add=t.clear=t.delete=oh),Object.freeze(t),e&&no(t,function(r,o){return fc(o,!0)},!0)),t}function oh(){xt(2)}function uc(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function jt(t){var e=sc[t];return e||xt(18,t),e}function nh(t,e){sc[t]||(sc[t]=e)}function nc(){return Tn}function ec(t,e){e&&(jt("Patches"),t.u=[],t.s=[],t.v=e)}function _i(t){ic(t),t.p.forEach(ih),t.p=null}function ic(t){t===Tn&&(Tn=t.l)}function m1(t){return Tn={p:[],l:Tn,h:t,m:!0,_:0}}function ih(t){var e=t[be];e.i===0||e.i===1?e.j():e.g=!0}function tc(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||jt("ES5").S(e,t,o),o?(r[be].P&&(_i(e),xt(4)),_t(t)&&(t=Ti(e,t),e.l||ki(e,t)),e.u&&jt("Patches").M(r[be].t,t,e.u,e.s)):t=Ti(e,r,[]),_i(e),e.u&&e.v(e.u,e.s),t!==L1?t:void 0}function Ti(t,e,r){if(uc(e))return e;var o=e[be];if(!o)return no(e,function(c,d){return g1(t,o,e,c,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return ki(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var i=o.i===4||o.i===5?o.o=dc(o.k):o.o,a=i,s=!1;o.i===3&&(a=new Set(i),i.clear(),s=!0),no(a,function(c,d){return g1(t,o,i,c,d,r,s)}),ki(t,i,!1),r&&t.u&&jt("Patches").N(o,r,t.u,t.s)}return o.o}function g1(t,e,r,o,i,a,s){if(sr(i)){var c=Ti(t,i,a&&e&&e.i!==3&&!ko(e.R,o)?a.concat(o):void 0);if(C1(r,o,c),!sr(c))return;t.m=!1}else s&&r.add(i);if(_t(i)&&!uc(i)){if(!t.h.D&&t._<1)return;Ti(t,i),e&&e.A.l||ki(t,i)}}function ki(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&fc(e,r)}function rc(t,e){var r=t[be];return(r?Cr(r):t)[e]}function y1(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function Er(t){t.P||(t.P=!0,t.l&&Er(t.l))}function oc(t){t.o||(t.o=dc(t.t))}function ac(t,e,r){var o=cc(e)?jt("MapSet").F(e,r):lc(e)?jt("MapSet").T(e,r):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:nc(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},d=c,f=kn;s&&(d=[c],f=_n);var h=Proxy.revocable(d,f),p=h.revoke,g=h.proxy;return c.k=g,c.j=p,g}(e,r):jt("ES5").J(e,r);return(r?r.A:nc()).p.push(o),o}function ah(t){return sr(t)||xt(22,t),function e(r){if(!_t(r))return r;var o,i=r[be],a=Mo(r);if(i){if(!i.P&&(i.i<4||!jt("ES5").K(i)))return i.t;i.I=!0,o=b1(r,a),i.I=!1}else o=b1(r,a);return no(o,function(s,c){i&&rh(i.t,s)===c||C1(o,s,e(c))}),a===3?new Set(o):o}(t)}function b1(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return dc(t)}function O1(){function t(s,c){var d=a[s];return d?d.enumerable=c:a[s]=d={configurable:!0,enumerable:c,get:function(){var f=this[be];return kn.get(f,s)},set:function(f){var h=this[be];kn.set(h,s,f)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][be];if(!d.P)switch(d.i){case 5:o(d)&&Er(d);break;case 4:r(d)&&Er(d)}}}function r(s){for(var c=s.t,d=s.k,f=No(d),h=f.length-1;h>=0;h--){var p=f[h];if(p!==be){var g=c[p];if(g===void 0&&!ko(c,p))return!0;var S=d[p],C=S&&S[be];if(C?C.t!==g:!E1(S,g))return!0}}var R=!!c[be];return f.length!==No(c).length+(R?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function i(s){s.g&&xt(3,JSON.stringify(Cr(s)))}var a={};nh("ES5",{J:function(s,c){var d=Array.isArray(s),f=function(p,g){if(p){for(var S=Array(g.length),C=0;C<g.length;C++)Object.defineProperty(S,""+C,t(C,!0));return S}var R=A1(g);delete R[be];for(var k=No(R),M=0;M<k.length;M++){var I=k[M];R[I]=t(I,p||!!R[I].enumerable)}return Object.create(Object.getPrototypeOf(g),R)}(d,s),h={i:d?5:4,A:c?c.A:nc(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,be,{value:h,writable:!0}),f},S:function(s,c,d){d?sr(c)&&c[be].A===s&&e(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var p=h[be];if(p){var g=p.t,S=p.k,C=p.R,R=p.i;if(R===4)no(S,function(O){O!==be&&(g[O]!==void 0||ko(g,O)?C[O]||f(S[O]):(C[O]=!0,Er(p)))}),no(g,function(O){S[O]!==void 0||ko(S,O)||(C[O]=!1,Er(p))});else if(R===5){if(o(p)&&(Er(p),C.length=!0),S.length<g.length)for(var k=S.length;k<g.length;k++)C[k]=!1;else for(var M=g.length;M<S.length;M++)C[M]=!0;for(var I=Math.min(S.length,g.length),L=0;L<I;L++)S.hasOwnProperty(L)||(C[L]=!0),C[L]===void 0&&f(S[L])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var v1,Tn,pc=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",sh=typeof Map<"u",ch=typeof Set<"u",x1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",L1=pc?Symbol.for("immer-nothing"):((v1={})["immer-nothing"]=!0,v1),S1=pc?Symbol.for("immer-draftable"):"__$immer_draftable",be=pc?Symbol.for("immer-state"):"__$immer_state";var lh=""+Object.prototype.constructor,No=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,A1=Object.getOwnPropertyDescriptors||function(t){var e={};return No(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},sc={},kn={get:function(t,e){if(e===be)return t;var r=Cr(t);if(!ko(r,e))return function(i,a,s){var c,d=y1(a,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,r,e);var o=r[e];return t.I||!_t(o)?o:o===rc(t.t,e)?(oc(t),t.o[e]=ac(t.A.h,o,t)):o},has:function(t,e){return e in Cr(t)},ownKeys:function(t){return Reflect.ownKeys(Cr(t))},set:function(t,e,r){var o=y1(Cr(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var i=rc(Cr(t),e),a=i?.[be];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(E1(r,i)&&(r!==void 0||ko(t.t,e)))return!0;oc(t),Er(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 rc(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,oc(t),Er(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Cr(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){xt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){xt(12)}},_n={};no(kn,function(t,e){_n[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),_n.deleteProperty=function(t,e){return _n.set.call(this,t,e,void 0)},_n.set=function(t,e,r){return kn.set.call(this,t[0],e,r,t[0])};var dh=function(){function t(r){var o=this;this.O=x1,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var d=o;return function(R){var k=this;R===void 0&&(R=c);for(var M=arguments.length,I=Array(M>1?M-1:0),L=1;L<M;L++)I[L-1]=arguments[L];return d.produce(R,function(O){var _;return(_=a).call.apply(_,[k,O].concat(I))})}}var f;if(typeof a!="function"&&xt(6),s!==void 0&&typeof s!="function"&&xt(7),_t(i)){var h=m1(o),p=ac(o,i,void 0),g=!0;try{f=a(p),g=!1}finally{g?_i(h):ic(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(R){return ec(h,s),tc(R,h)},function(R){throw _i(h),R}):(ec(h,s),tc(f,h))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===L1&&(f=void 0),o.D&&fc(f,!0),s){var S=[],C=[];jt("Patches").M(i,f,S,C),s(S,C)}return f}xt(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var h=arguments.length,p=Array(h>1?h-1:0),g=1;g<h;g++)p[g-1]=arguments[g];return o.produceWithPatches(f,function(S){return i.apply(void 0,[S].concat(p))})};var s,c,d=o.produce(i,a,function(f,h){s=f,c=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(f){return[f,s,c]}):[d,s,c]},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){_t(r)||xt(8),sr(r)&&(r=ah(r));var o=m1(this),i=ac(this,r,void 0);return i[be].C=!0,ic(o),i},e.finishDraft=function(r,o){var i=r&&r[be],a=i.A;return ec(a,o),tc(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!x1&&xt(20),this.O=r},e.applyPatches=function(r,o){var i;for(i=o.length-1;i>=0;i--){var a=o[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(o=o.slice(i+1));var s=jt("Patches").$;return sr(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},t}(),ft=new dh,fh=ft.produce,WS=ft.produceWithPatches.bind(ft),VS=ft.setAutoFreeze.bind(ft),jS=ft.setUseProxies.bind(ft),KS=ft.applyPatches.bind(ft),qS=ft.createDraft.bind(ft),ZS=ft.finishDraft.bind(ft),Ni=fh;function io(t){"@babel/helpers - typeof";return io=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},io(t)}function R1(t,e){if(io(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(io(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function w1(t){var e=R1(t,"string");return io(e)=="symbol"?e:e+""}function _1(t,e,r){return(e=w1(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function T1(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,o)}return r}function hc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?T1(Object(r),!0).forEach(function(o){_1(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):T1(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function je(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 k1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),mc=function(){return Math.random().toString(36).substring(7).split("").join(".")},Mi={INIT:"@@redux/INIT"+mc(),REPLACE:"@@redux/REPLACE"+mc(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+mc()}};function uh(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 gc(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(je(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(je(1));return r(gc)(t,e)}if(typeof t!="function")throw new Error(je(2));var i=t,a=e,s=[],c=s,d=!1;function f(){c===s&&(c=s.slice())}function h(){if(d)throw new Error(je(3));return a}function p(R){if(typeof R!="function")throw new Error(je(4));if(d)throw new Error(je(5));var k=!0;return f(),c.push(R),function(){if(k){if(d)throw new Error(je(6));k=!1,f();var I=c.indexOf(R);c.splice(I,1),s=null}}}function g(R){if(!uh(R))throw new Error(je(7));if(typeof R.type>"u")throw new Error(je(8));if(d)throw new Error(je(9));try{d=!0,a=i(a,R)}finally{d=!1}for(var k=s=c,M=0;M<k.length;M++){var I=k[M];I()}return R}function S(R){if(typeof R!="function")throw new Error(je(10));i=R,g({type:Mi.REPLACE})}function C(){var R,k=p;return R={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(je(11));function L(){I.next&&I.next(h())}L();var O=k(L);return{unsubscribe:O}}},R[k1]=function(){return this},R}return g({type:Mi.INIT}),o={dispatch:g,subscribe:p,getState:h,replaceReducer:S},o[k1]=C,o}function ph(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:Mi.INIT});if(typeof o>"u")throw new Error(je(12));if(typeof r(void 0,{type:Mi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(je(13))})}function N1(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var i=e[o];typeof t[i]=="function"&&(r[i]=t[i])}var a=Object.keys(r),s,c;try{ph(r)}catch(d){c=d}return function(f,h){if(f===void 0&&(f={}),c)throw c;if(0)var p;for(var g=!1,S={},C=0;C<a.length;C++){var R=a[C],k=r[R],M=f[R],I=k(M,h);if(typeof I>"u"){var L=h&&h.type;throw new Error(je(14))}S[R]=I,g=g||I!==M}return g=g||a.length!==Object.keys(f).length,g?S:f}}function Po(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,i){return function(){return o(i.apply(void 0,arguments))}})}function M1(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var i=o.apply(void 0,arguments),a=function(){throw new Error(je(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return a=Po.apply(void 0,c)(i.dispatch),hc(hc({},i),{},{dispatch:a})}}}function P1(t){var e=function(o){var i=o.dispatch,a=o.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var I1=P1();I1.withExtraArgument=P1;var yc=I1;var F1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,i){o.__proto__=i}||function(o,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(o[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 o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),hh=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,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(f){return function(h){return d([f,h])}}function d(f){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,i=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){r.label=f[1];break}if(f[0]===6&&r.label<a[1]){r.label=a[1],a=f;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(f);break}a[2]&&r.ops.pop(),r.trys.pop();continue}f=e.call(t,r)}catch(h){f=[6,h],i=0}finally{o=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Io=function(t,e){for(var r=0,o=e.length,i=t.length;r<o;r++,i++)t[i]=e[r];return t},mh=Object.defineProperty,gh=Object.defineProperties,yh=Object.getOwnPropertyDescriptors,z1=Object.getOwnPropertySymbols,bh=Object.prototype.hasOwnProperty,vh=Object.prototype.propertyIsEnumerable,D1=function(t,e,r){return e in t?mh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Or=function(t,e){for(var r in e||(e={}))bh.call(e,r)&&D1(t,r,e[r]);if(z1)for(var o=0,i=z1(e);o<i.length;o++){var r=i[o];vh.call(e,r)&&D1(t,r,e[r])}return t},bc=function(t,e){return gh(t,yh(e))},xh=function(t,e,r){return new Promise(function(o,i){var a=function(d){try{c(r.next(d))}catch(f){i(f)}},s=function(d){try{c(r.throw(d))}catch(f){i(f)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(a,s)};c((r=r.apply(t,e)).next())})};var Sh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Po:Po.apply(null,arguments)},pC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Ch(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 Eh=function(t){F1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];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=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Io([void 0],r[0].concat(this)))):new(e.bind.apply(e,Io([void 0],r.concat(this))))},e}(Array),Oh=function(t){F1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];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=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Io([void 0],r[0].concat(this)))):new(e.bind.apply(e,Io([void 0],r.concat(this))))},e}(Array);function Sc(t){return _t(t)?Ni(t,function(){}):t}function Lh(t){return typeof t=="boolean"}function Ah(){return function(e){return Rh(e)}}function Rh(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,i=o===void 0?!0:o,a=t.serializableCheck,s=a===void 0?!0:a,c=new Eh;if(r&&(Lh(r)?c.push(yc):c.push(yc.withExtraArgument(r.extraArgument))),0){if(i)var d;if(s)var f}return c}var vc=!0;function U1(t){var e=Ah(),r=t||{},o=r.reducer,i=o===void 0?void 0:o,a=r.middleware,s=a===void 0?e():a,c=r.devTools,d=c===void 0?!0:c,f=r.preloadedState,h=f===void 0?void 0:f,p=r.enhancers,g=p===void 0?void 0:p,S;if(typeof i=="function")S=i;else if(Ch(i))S=N1(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 C=s;if(typeof C=="function"&&(C=C(e),!vc&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!vc&&C.some(function(O){return typeof O!="function"}))throw new Error("each middleware provided to configureStore must be a function");var R=M1.apply(void 0,C),k=Po;d&&(k=Sh(Or({trace:!vc},typeof d=="object"&&d)));var M=new Oh(R),I=M;Array.isArray(g)?I=Io([R],g):typeof g=="function"&&(I=g(M));var L=k.apply(void 0,I);return gc(S,h,L)}function Lr(t,e){function r(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(e){var a=e.apply(void 0,o);if(!a)throw new Error("prepareAction did not return an object");return Or(Or({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function H1(t){var e={},r=[],o,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 r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return o=a,i}};return t(i),[e,r,o]}function wh(t){return typeof t=="function"}function _h(t,e,r,o){r===void 0&&(r=[]);var i=typeof e=="function"?H1(e):[e,r,o],a=i[0],s=i[1],c=i[2],d;if(wh(t))d=function(){return Sc(t())};else{var f=Sc(t);d=function(){return f}}function h(p,g){p===void 0&&(p=d());var S=Io([a[g.type]],s.filter(function(C){var R=C.matcher;return R(g)}).map(function(C){var R=C.reducer;return R}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,R){if(R)if(sr(C)){var k=C,M=R(k,g);return M===void 0?C:M}else{if(_t(C))return Ni(C,function(I){return R(I,g)});var M=R(C,g);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},p)}return h.getInitialState=d,h}function Th(t,e){return t+"/"+e}function G1(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:Sc(t.initialState),o=t.reducers||{},i=Object.keys(o),a={},s={},c={};i.forEach(function(h){var p=o[h],g=Th(e,h),S,C;"reducer"in p?(S=p.reducer,C=p.prepare):S=p,a[h]=S,s[g]=S,c[h]=C?Lr(g,C):Lr(g)});function d(){var h=typeof t.extraReducers=="function"?H1(t.extraReducers):[t.extraReducers],p=h[0],g=p===void 0?{}:p,S=h[1],C=S===void 0?[]:S,R=h[2],k=R===void 0?void 0:R,M=Or(Or({},g),s);return _h(r,function(I){for(var L in M)I.addCase(L,M[L]);for(var O=0,_=C;O<_.length;O++){var $=_[O];I.addMatcher($.matcher,$.reducer)}k&&I.addDefaultCase(k)})}var f;return{name:e,reducer:function(h,p){return f||(f=d()),f(h,p)},actions:c,caseReducers:a,getInitialState:function(){return f||(f=d()),f.getInitialState()}}}var kh="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Nh=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=kh[Math.random()*64|0];return e},Mh=["name","message","stack","code"],xc=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),$1=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),Ph=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Mh;r<o.length;r++){var i=o[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},yC=function(){function t(e,r,o){var i=Lr(e+"/fulfilled",function(h,p,g,S){return{payload:h,meta:bc(Or({},S||{}),{arg:g,requestId:p,requestStatus:"fulfilled"})}}),a=Lr(e+"/pending",function(h,p,g){return{payload:void 0,meta:bc(Or({},g||{}),{arg:p,requestId:h,requestStatus:"pending"})}}),s=Lr(e+"/rejected",function(h,p,g,S,C){return{payload:S,error:(o&&o.serializeError||Ph)(h||"Rejected"),meta:bc(Or({},C||{}),{arg:g,requestId:p,rejectedWithValue:!!S,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!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 f(h){return function(p,g,S){var C=o?.idGenerator?o.idGenerator(h):Nh(),R=new d,k,M=!1;function I(O){k=O,R.abort()}var L=function(){return xh(this,null,function(){var O,_,$,Z,ee,J,V;return hh(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),Z=(O=o?.condition)==null?void 0:O.call(o,h,{getState:g,extra:S}),zh(Z)?[4,Z]:[3,2];case 1:Z=v.sent(),v.label=2;case 2:if(Z===!1||R.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,ee=new Promise(function(A,H){return R.signal.addEventListener("abort",function(){return H({name:"AbortError",message:k||"Aborted"})})}),p(a(C,h,(_=o?.getPendingMeta)==null?void 0:_.call(o,{requestId:C,arg:h},{getState:g,extra:S}))),[4,Promise.race([ee,Promise.resolve(r(h,{dispatch:p,getState:g,extra:S,requestId:C,signal:R.signal,abort:I,rejectWithValue:function(A,H){return new xc(A,H)},fulfillWithValue:function(A,H){return new $1(A,H)}})).then(function(A){if(A instanceof xc)throw A;return A instanceof $1?i(A.payload,C,h,A.meta):i(A,C,h)})])];case 3:return $=v.sent(),[3,5];case 4:return J=v.sent(),$=J instanceof xc?s(null,C,h,J.payload,J.meta):s(J,C,h),[3,5];case 5:return V=o&&!o.dispatchConditionRejection&&s.match($)&&$.meta.condition,V||p($),[2,$]}})})}();return Object.assign(L,{abort:I,requestId:C,arg:h,unwrap:function(){return L.then(Ih)}})}}return Object.assign(f,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function Ih(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function zh(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var W1="listener",V1="completed",j1="cancelled",bC="task-"+j1,vC="task-"+V1,xC=W1+"-"+j1,SC=W1+"-"+V1;var Cc="listenerMiddleware";var CC=Lr(Cc+"/add"),EC=Lr(Cc+"/removeAll"),OC=Lr(Cc+"/remove");var B1,LC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(B1||(B1=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Dh=function(t){return function(e){setTimeout(e,t)}},AC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Dh(10);O1();window.ftReduxStores||(window.ftReduxStores={});var Ar=class t extends ir{static get(e){var r;let o=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[o];if(To(a))return a;if(i==null)return;let s=G1({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),c=U1({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=Kr(s.getInitialState());for(let p of f.keeping)h[p]=(d??h)[p];return h}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...f.overwrites};return s.reducer(d,f)}});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Rn;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let d=s,f=a[d];return f?(...h)=>{let p=f(...h.map(i));return this.reduxStore.dispatch(p),p}:h=>{this.setState({[d]:i(h)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}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 $h(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))To(e)&&e.clear()}var Pi=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}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);lt(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 K1(t,e,r){return new Pi(t,e,r).watch()}var Ii=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Ac={};Q(Ac,{scrollHelper:()=>Bh});var Oc,zi=new Map,Lc=class{lock(e,r){if(r){let o=zi.get(r);if(o==null||o===e)return zi.set(r,e),r}}release(e,r){r&&zi.get(r)===e&&zi.delete(r)}findFirstScrollableParent(e){var r;let o,i;for(let a of Za(e)){let s=a,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&i==null&&(i=s)}return(r=o??i)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,i;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(o=r.offsetTop)!==null&&o!==void 0?o: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 o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let i=this.getAbsoluteScrollOffset(o,e),a=i-o.clientHeight+e.clientHeight,s=i,c=br(0,(s-o.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,c)*(a-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(Oc=window.FluidTopicsScrollHelper)!==null&&Oc!==void 0?Oc:new Lc;var Bh=window.FluidTopicsScrollHelper;var Rc={};Q(Rc,{SearchPlaceConverter:()=>Do,SearchPlaceQueryParams:()=>ie,isSearchPlaceQueryParams:()=>k2,serializeRequest:()=>Gh});var Uh=Sp(Z1(),1);var Y1;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Y1||(Y1={}));var X1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(X1||(X1={}));var Q1;(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.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Q1||(Q1={}));var J1;(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.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(J1||(J1={}));var e2;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(e2||(e2={}));var t2;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(t2||(t2={}));var r2;(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.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",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.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_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__AI_TRANSLATE="TOPIC__AI_TRANSLATE",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"})(r2||(r2={}));var o2;(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"})(o2||(o2={}));var n2;(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",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(n2||(n2={}));var i2;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(i2||(i2={}));var a2;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(a2||(a2={}));var s2;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(s2||(s2={}));var c2;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(c2||(c2={}));var l2;(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"})(l2||(l2={}));var ut;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(ut||(ut={}));var d2;(function(t){t.ASC="ASC",t.DESC="DESC"})(d2||(d2={}));var f2;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(f2||(f2={}));var Nn;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Nn||(Nn={}));var b2=t=>Object.keys(Nn).includes(t);var u2;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(u2||(u2={}));var p2;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(p2||(p2={}));var h2;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(h2||(h2={}));var wr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(wr||(wr={}));var v2=t=>Object.keys(wr).includes(t);var m2;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(m2||(m2={}));var Bi;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Bi||(Bi={}));var g2;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(g2||(g2={}));var we;(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.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.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(we||(we={}));var St;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(St||(St={}));var y2;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(y2||(y2={}));var x2;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(x2||(x2={}));var S2;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(S2||(S2={}));var C2;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(C2||(C2={}));var E2;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(E2||(E2={}));var O2;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(O2||(O2={}));var L2;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(L2||(L2={}));var A2;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(A2||(A2={}));var R2;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(R2||(R2={}));var Fh={[we.PERSONAL_BOOK_SHARE_USER]:[we.PERSONAL_BOOK_USER],[we.HTML_EXPORT_USER]:[we.PERSONAL_BOOK_USER],[we.PDF_EXPORT_USER]:[we.PERSONAL_BOOK_USER],[we.KHUB_ADMIN]:[we.CONTENT_PUBLISHER],[we.ADMIN]:[we.KHUB_ADMIN,we.USERS_ADMIN,we.PORTAL_ADMIN,we.BEHAVIOR_DATA_USER],[we.GENERATIVE_AI_EXPORT_USER]:[we.GENERATIVE_AI_USER]};function w2(t,e){return t===e||(Fh[t]??[]).some(r=>w2(r,e))}function _2(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(o=>w2(o,e))}function Hh(t){return`"${t}"`}function T2(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Gh(t,e){return new Do(t).serialize(e)}var ie;(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",t.KEYWORD_MATCH="keyword-match"})(ie||(ie={}));var Wh=new Set(Object.values(ie));function k2(t){return Wh.has(t)}var Do=class{constructor(e,r=20,o=!1,i="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=i,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 o=r==null||r.trim().length===0,i=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return i.search=this.toURLSearchParams(e),i.toString()}toURLSearchParams(e,r=!1){var o,i,a,s,c,d,f,h,p,g,S;let C=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&C.append(ie.LOCALE,e.contentLocale):C.append(ie.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&C.append(ie.QUERY,e.query);let R=(a=(i=e.metadataFilters)===null||i===void 0?void 0:i.filter(O=>O.valueFilter&&!O.valueFilter.negative))!==null&&a!==void 0?a:[];if(R.length>0){let O=R.map(_=>{var $,Z;let ee=((Z=($=_.valueFilter)===null||$===void 0?void 0:$.values)!==null&&Z!==void 0?Z:[]).map(J=>this.escapeFilters(J)).map(J=>Hh(T2(J))).join("_");return`${_.key}~${ee}`}).join("*");C.append(ie.VALUE_FILTERS,O)}let k=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(O=>O.dateFilter))!==null&&c!==void 0?c:[];if(k.length>0){let O=k.map(_=>{var $;return`${_.key}~${($=_.dateFilter)===null||$===void 0?void 0:$.type.toLowerCase()}`}).join("*");C.append(ie.DATE_FILTERS,O)}let M=(f=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(O=>O.rangeFilter))!==null&&f!==void 0?f:[];if(M.length>0){let O=M.map(_=>{var $,Z;return`${_.key}~${($=_.rangeFilter)===null||$===void 0?void 0:$.from}_${(Z=_.rangeFilter)===null||Z===void 0?void 0:Z.to}`}).join("*");C.append(ie.RANGE_FILTERS,O)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&C.append(ie.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&C.append(ie.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&C.append(ie.SORT,e.sortId),!((h=e.paging)===null||h===void 0)&&h.perPage&&((g=(p=e.paging)===null||p===void 0?void 0:p.perPage)!==null&&g!==void 0?g:this.defaultPerPage)!=this.defaultPerPage&&C.append(ie.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&C.append(ie.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let I=(S=e.otherQueryParams)!==null&&S!==void 0?S:{};for(let O in I)C.append(O,I[O]);let L=new Array;return C.forEach((O,_)=>{L.push(this.encodeQueryString(_)+"="+this.encodeQueryString(O))}),encodeURI(L.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),i=this.fromURLSearchParams(o.slice(1).join("?")),a=o[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,o,i,a,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(M){console.warn("Could not decode search request query params, fallback on raw value",M)}let d=new URLSearchParams(e),f=d.get(ie.LOCALE)==="all"?void 0:d.get(ie.LOCALE),h=((r=d.get(ie.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),p=(o=d.get(ie.SORT))===null||o===void 0?void 0:o.toLowerCase(),g=(i=d.get(ie.SCOPE))!==null&&i!==void 0?i:"default",S=+((a=d.get(ie.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),C=d.get(ie.KEYWORD_MATCH),R=C?C.toUpperCase()===ut.MANDATORY?ut.MANDATORY:ut.OPTIONAL:void 0,k={};for(let M of d.keys())k2(M)||(k[M]=d.get(M));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(ie.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[g])!==null&&c!==void 0?c:"DEFAULT",virtualField:b2(h)?h:"EVERYWHERE",sortId:p,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:br(1,isNaN(S)?this.defaultPerPage:S,1e3)},keywordMatch:R,otherQueryParams:k}}parseCompatFilters(e){var r,o,i,a,s,c;let d=[];return e.has(ie.FILTERS)&&(d=this.parseValueFilters((r=e.get(ie.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(ie.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((i=e.get(ie.PERIOD))!==null&&i!==void 0?i:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(ie.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(ie.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(ie.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}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(T2).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:wr[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,o,i]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,i]of this.filtersEscapeMapping)e=e.replaceAll(o,i);return e}unescapeFilterValue(e){for(let[r,o,i]of this.filtersEscapeMapping)e=e.replace(i,r);return e}parseLegacyPeriodFilter(e){if(v2(e))return[{key:"ft:lastEdition",dateFilter:{type:wr[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,i]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:i}}]}return[]}};var Tc={};Q(Tc,{toFtFormComponent:()=>_c});var wc=Symbol("elementInternals"),_c=ke(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[wc].form}constructor(...o){super(o),this[wc]=this.attachInternals()}setFormValue(o){this[wc].setFormValue(o)}}return e});var kc={};Q(kc,{DateFormatter:()=>ao});var ao=class{static format(e,r,o,i,a){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,i,!!a)):this.getIntlDateTime(e,r,o,i,!!a)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,i,a){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return a?d:i?`${c} ${d}`:c}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Mc={};Q(Mc,{ALL_KEYS_VALUE:()=>Nc,SameWindowStorageEvent:()=>$o});var Nc="__all__",$o=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Nc}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new $o(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new $o(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new $o(Nc))}});var Pc={};Q(Pc,{FocusMainContentEvent:()=>Mn});var Mn=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var N2={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function Vh(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function jh(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",Vh);document.addEventListener("click",jh);var M2=P`
|
|
49
49
|
.sr-only {
|
|
50
50
|
position:absolute;
|
|
51
51
|
left:-10000px;
|
|
@@ -92,7 +92,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
92
92
|
.ft-search-selected-facets--container > * {
|
|
93
93
|
min-width: 0;
|
|
94
94
|
}
|
|
95
|
-
`;var zn;(function(t){t.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(zn||(zn={}));var e3="ft-app-info",lo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};lo.eventName="authentication-change";var t3={session:(t,e)=>{Ye(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>U.dispatchEvent(new lo(e.payload)),0))}},U=Ar.get({name:e3,reducers:t3,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Hi=function(t,e,r,o){var i=arguments.length,a=i<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(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},$2=ke(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(U)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===o))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?c=>ao.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Hi([b({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Hi([b({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Hi([$e({store:U.name,selector:r=>{var o,i;return(i=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),Hi([$e({store:U.name})],e.prototype,"uiLocale",void 0),e});var fo=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=U.getState(),i=e??o;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let i=U.subscribe(()=>{o=t.get(e),o&&(i(),r(o))})}})}};var Gi=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:fo.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):fo.await()}};var rt=class extends Gi{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let i=this.constructor;i.commonCache=(o=i.commonCache)!==null&&o!==void 0?o:new Ft,this.cache=e?i.commonCache:new Ft}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var Wi=class extends rt{async listMySearches(){let{session:e}=U.getState();return _2(e,we.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Vi=class extends rt{async listMyBookmarks(){let e=U.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var ji=class extends rt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=U.getState().session;return!!e?.sessionAuthenticated}};var Ki=class extends rt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=U.getState().session;return!!e?.sessionAuthenticated}};var r3="ft-user-assets",o3={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(St).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:i}=e.payload;Gc(t,r,[...Hc(t,r),i]),B2(t,r,1,o),F2(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;Gc(t,r,Hc(t,r).map(i=>i.id===o.id?o:i)),F2(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:i}=e.payload;Gc(t,r,Hc(t,r).filter(a=>a.id!==i)),B2(t,r,-1,o)}},U2={[St.SEARCHES]:"savedSearches",[St.BOOKMARKS]:"bookmarks",[St.BOOKS]:void 0,[St.COLLECTIONS]:void 0},Hc=(t,e)=>{var r;let o=U2[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},Gc=(t,e,r)=>{let o=U2[e];o&&(t[o]=r)},B2=(t,e,r,o)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===St.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},F2=(t,e)=>{let r=t.assetLabels.map(i=>i.title),o=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...o)},pt=Ar.get({name:r3,reducers:o3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(St).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Wc=class{constructor(e=new ji,r=new Ki){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Vi,this.savedSearchesService=new Wi,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=U.getState();Ye((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),pt.actions.clearAssetCount(),pt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),pt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),pt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();pt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();pt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&pt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&pt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(pt.getState().assetCounts.bookmarkByMap).length!==0;e===St.BOOKMARKS&&r&&pt.actions.clearBookmarkCountByMap(),pt.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;pt.actions.bookmarks(r)}}},n3=new Wc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=n3);var Vc=class{addCommand(e,r=!1){U.commands.add(e,r)}consumeCommand(e){return U.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Vc;var H2,Bo=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},i3=Symbol("clearAfterUnitTest"),qi=class extends vi(rt){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[H2]=()=>{this.defaultMessages={},this.cache=new Ft,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=U.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let i={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};Ye(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new An((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(i){!(i instanceof yr)&&r&&console.error(i)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Bo({loadedContexts:e})),this.dispatchEvent(new Bo({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Bo({loadedContexts:[e]})),this.dispatchEvent(new Bo({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>bi(0).then(()=>o()).catch(()=>null)))}};H2=i3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends qi{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends qi{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Fo=window.FluidTopicsI18nService,Zi=window.FluidTopicsCustomI18nService;var jc=class{highlightHtml(e,r,o){Zs(e,r,o)}};window.FluidTopicsHighlightHtmlService=new jc;var Kc=class{isDate(e){var r,o,i,a;return(a=(i=((o=(r=U.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var o,i,a;if(e==null)return"";try{return ao.format(e,(o=r?.locale)!==null&&o!==void 0?o:U.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}catch(s){throw console.error(`Date ${JSON.stringify(e)} is not valid`,s),s}}};window.FluidTopicsDateService=new Kc;var Dn=class{static get(e,r){var o,i;let a=U.getState(),{lang:s,region:c}=(i=(o=a.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Do(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var qc=class{urlToSearchRequest(e){return Dn.get().parse(e)}searchRequestToUrl(e){return Dn.get().serialize(e)}};window.FluidTopicsUrlService=new qc;var uo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};uo.eventName="change";var Zc=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},G2=new Zc;var Yi=class t extends ir{static build(){return new t(window.history,G2,()=>window.location,!1)}constructor(e,r,o,i){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,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,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Ye(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new uo(this.currentItem())),0)}installProxies(){let e=r=>(o,i,[a,s,c])=>{let d=r(),f={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(i,[f,s,c]),this.setCurrentState(f,!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 r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(uo.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(uo.eventName,e)}currentItem(){return Kr(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return Kr(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return Kr(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let i=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Yi.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)});var W2=P`
|
|
95
|
+
`;var zn;(function(t){t.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(zn||(zn={}));var e3="ft-app-info",lo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};lo.eventName="authentication-change";var t3={session:(t,e)=>{Ye(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>U.dispatchEvent(new lo(e.payload)),0))}},U=Ar.get({name:e3,reducers:t3,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Hi=function(t,e,r,o){var i=arguments.length,a=i<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(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},$2=ke(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(U)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===o))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?c=>ao.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Hi([b({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Hi([b({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Hi([$e({store:U.name,selector:r=>{var o,i;return(i=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),Hi([$e({store:U.name})],e.prototype,"uiLocale",void 0),e});var fo=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=U.getState(),i=e??o;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let i=U.subscribe(()=>{o=t.get(e),o&&(i(),r(o))})}})}};var Gi=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:fo.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):fo.await()}};var rt=class extends Gi{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let i=this.constructor;i.commonCache=(o=i.commonCache)!==null&&o!==void 0?o:new Ft,this.cache=e?i.commonCache:new Ft}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var Wi=class extends rt{async listMySearches(){let{session:e}=U.getState();return _2(e,we.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Vi=class extends rt{async listMyBookmarks(){let e=U.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var ji=class extends rt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=U.getState().session;return!!e?.sessionAuthenticated}};var Ki=class extends rt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=U.getState().session;return!!e?.sessionAuthenticated}};var r3="ft-user-assets",o3={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(St).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:i}=e.payload;Gc(t,r,[...Hc(t,r),i]),B2(t,r,1,o),F2(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;Gc(t,r,Hc(t,r).map(i=>i.id===o.id?o:i)),F2(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:i}=e.payload;Gc(t,r,Hc(t,r).filter(a=>a.id!==i)),B2(t,r,-1,o)}},U2={[St.SEARCHES]:"savedSearches",[St.BOOKMARKS]:"bookmarks",[St.BOOKS]:void 0,[St.COLLECTIONS]:void 0},Hc=(t,e)=>{var r;let o=U2[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},Gc=(t,e,r)=>{let o=U2[e];o&&(t[o]=r)},B2=(t,e,r,o)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===St.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},F2=(t,e)=>{let r=t.assetLabels.map(i=>i.title),o=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...o)},pt=Ar.get({name:r3,reducers:o3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(St).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Wc=class{constructor(e=new ji,r=new Ki){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Vi,this.savedSearchesService=new Wi,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=U.getState();Ye((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),pt.actions.clearAssetCount(),pt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),pt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),pt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();pt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();pt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&pt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&pt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(pt.getState().assetCounts.bookmarkByMap).length!==0;e===St.BOOKMARKS&&r&&pt.actions.clearBookmarkCountByMap(),pt.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;pt.actions.bookmarks(r)}}},n3=new Wc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=n3);var Vc=class{addCommand(e,r=!1){U.commands.add(e,r)}consumeCommand(e){return U.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Vc;var H2,Bo=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},i3=Symbol("clearAfterUnitTest"),qi=class extends vi(rt){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[H2]=()=>{this.defaultMessages={},this.cache=new Ft,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=U.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let i={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};Ye(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new An((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(i){!(i instanceof yr)&&r&&console.error(i)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Bo({loadedContexts:e})),this.dispatchEvent(new Bo({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Bo({loadedContexts:[e]})),this.dispatchEvent(new Bo({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>bi(0).then(()=>o()).catch(()=>null)))}};H2=i3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends qi{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends qi{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Fo=window.FluidTopicsI18nService,Zi=window.FluidTopicsCustomI18nService;var jc=class{highlightHtml(e,r,o){Zs(e,r,o)}};window.FluidTopicsHighlightHtmlService=new jc;var Kc=class{isDate(e){var r,o,i,a;return(a=(i=((o=(r=U.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var o,i,a,s;if(e==null)return"";try{return ao.format(e,(o=r?.locale)!==null&&o!==void 0?o:U.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(c){throw console.error(`Date ${JSON.stringify(e)} is not valid`,c),c}}};window.FluidTopicsDateService=new Kc;var Dn=class{static get(e,r){var o,i;let a=U.getState(),{lang:s,region:c}=(i=(o=a.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Do(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var qc=class{urlToSearchRequest(e){return Dn.get().parse(e)}searchRequestToUrl(e){return Dn.get().serialize(e)}};window.FluidTopicsUrlService=new qc;var uo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};uo.eventName="change";var Zc=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},G2=new Zc;var Yi=class t extends ir{static build(){return new t(window.history,G2,()=>window.location,!1)}constructor(e,r,o,i){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,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,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Ye(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new uo(this.currentItem())),0)}installProxies(){let e=r=>(o,i,[a,s,c])=>{let d=r(),f={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(i,[f,s,c]),this.setCurrentState(f,!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 r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(uo.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(uo.eventName,e)}currentItem(){return Kr(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return Kr(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return Kr(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let i=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Yi.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)});var W2=P`
|
|
96
96
|
`;function V2(t,e){let{authenticationRequired:r,session:o}=U.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var Pe=function(t,e,r,o){var i=arguments.length,a=i<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(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},he=class extends K{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>fo.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Ft,this.cleanSessionDebouncer=new ye,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return w`
|
|
97
97
|
<slot></slot>
|
|
98
98
|
`}connectedCallback(){super.connectedCallback(),U.addEventListener(lo.eventName,this.reloadConfiguration)}disconnectedCallback(){U.addEventListener(lo.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,o,i,a,s,c,d;super.update(e),e.has("baseUrl")&&(U.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&U.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&U.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&U.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&U.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&U.actions.noCustom(this.noCustom),e.has("editorMode")&&U.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&U.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&U.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(f=>Fo.addContext(f)),e.has("openExternalDocumentInNewTab")&&U.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&U.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&U.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(U.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),U.actions.availableUiLocales((i=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&i!==void 0?i:[]),U.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&U.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&U.actions.availableContentLocales((d=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&d!==void 0?d:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let 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())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>V2(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};he.elementDefinitions={};he.styles=W2;Pe([b()],he.prototype,"baseUrl",void 0);Pe([b()],he.prototype,"apiIntegrationIdentifier",void 0);Pe([b()],he.prototype,"apiIntegrationAppVersion",void 0);Pe([b()],he.prototype,"uiLocale",void 0);Pe([Ne(null)],he.prototype,"availableUiLocales",void 0);Pe([Ne(null)],he.prototype,"metadataConfiguration",void 0);Pe([b({type:Boolean})],he.prototype,"editorMode",void 0);Pe([b({type:Boolean})],he.prototype,"noCustom",void 0);Pe([b({type:Boolean})],he.prototype,"openExternalDocumentInNewTab",void 0);Pe([b({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],he.prototype,"noCustomComponent",void 0);Pe([b({type:Boolean})],he.prototype,"withManualResources",void 0);Pe([b({type:Boolean})],he.prototype,"navigatorOnline",void 0);Pe([b({type:Boolean})],he.prototype,"forcedOffline",void 0);Pe([b({type:Object})],he.prototype,"apiProvider",void 0);Pe([b({type:Boolean})],he.prototype,"authenticationRequired",void 0);Pe([Ne([])],he.prototype,"messageContexts",void 0);Pe([Ne(void 0)],he.prototype,"session",void 0);Pe([Y()],he.prototype,"localesConfiguration",void 0);Pe([Y()],he.prototype,"availableContentLocales",void 0);q("ft-app-context")(he);var Xi=class t extends Event{constructor(){super(t.eventName)}};Xi.eventName="search-context-clear-all-filters";var Qi=t=>t.request.virtualField===Nn.TITLE_ONLY&&t.request.scope===Bi.DOCUMENTS,Ji=t=>t.request.keywordMatch==ut.MANDATORY;var j2=function(t,e,r,o){var i=arguments.length,a=i<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(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},Xc=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},K2=Symbol("registerInterval"),Yc=Symbol("registerAttempts"),a3=40,s3=ke(Symbol("toFtSearchComponent"),function(t){class e extends t{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(o){var i,a,s;super.willUpdate(o),o.has("neededSearchRequests")&&((i=this.stateManager)===null||i===void 0||i.unregisterComponent(this,(a=o.get("neededSearchRequests"))!==null&&a!==void 0?a:[]),(s=this.stateManager)===null||s===void 0||s.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(o){this.clearStateManager(),this.stateManager=o,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(o.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Yc]=0,this.tryToRegisterToContext(),this[K2]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Yc]>a3?window.clearInterval(this[K2]):(this[Yc]++,this.dispatchEvent(new Xc))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return j2([Y()],e.prototype,"stateManager",void 0),j2([Y({hasChanged:lt})],e.prototype,"neededSearchRequests",void 0),e}),_r=class extends s3(oo){};var q2=n.extend("--ft-ripple-color","",z.colorContent),T={color:q2,backgroundColor:n.extend("--ft-ripple-background-color","",q2),opacityContentOnSurfacePressed:n.external(z.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:n.external(z.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:n.external(z.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:n.external(z.opacityContentOnSurfaceSelected,"Design system"),borderRadius:n.create("--ft-ripple-border-radius","","SIZE","0px")},Z2=n.extend("--ft-ripple-color","",z.colorPrimary),Y2={color:Z2,backgroundColor:n.extend("--ft-ripple-background-color","",Z2)},X2=n.extend("--ft-ripple-color","",z.colorSecondary),Q2={color:X2,backgroundColor:n.extend("--ft-ripple-background-color","",X2)},J2=P`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-selected-facets",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
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": "2.0.
|
|
23
|
-
"@fluid-topics/ft-search-context": "2.0.
|
|
24
|
-
"@fluid-topics/ft-search-period-filter": "2.0.
|
|
25
|
-
"@fluid-topics/ft-search-type": "2.0.
|
|
26
|
-
"@fluid-topics/ft-tooltip": "2.0.
|
|
27
|
-
"@fluid-topics/ft-wc-utils": "2.0.
|
|
22
|
+
"@fluid-topics/ft-chip": "2.0.12",
|
|
23
|
+
"@fluid-topics/ft-search-context": "2.0.12",
|
|
24
|
+
"@fluid-topics/ft-search-period-filter": "2.0.12",
|
|
25
|
+
"@fluid-topics/ft-search-type": "2.0.12",
|
|
26
|
+
"@fluid-topics/ft-tooltip": "2.0.12",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "2.0.12",
|
|
28
28
|
"lit": "3.1.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "4811b3ed72672d41022c271d4a0d1db15b458aca"
|
|
31
31
|
}
|