@fluid-topics/ft-search-language-filter 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.
@@ -1317,7 +1317,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
1317
1317
  label="${t.label}"
1318
1318
  .value=${t.value}
1319
1319
  ></ft-select-option>
1320
- `}willUpdate(t){super.willUpdate(t),t.has("options")&&(this.selectedOption=this.options.filter(o=>o.selected)[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1)}contentAvailableCallback(t){var o,a;if(super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&((a=(o=this.selectedOptionElement)!==null&&o!==void 0?o:this.firstOption)===null||a===void 0||a.focus(),this.focusOptions=!1),t.has("optionsDisplayed")&&this.hasOptionsMenuOpen){this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px";let n=["bottom","top"];(0,Ee.computeOffsetAutoPosition)(this.mainPanel,this.optionsMenu,"bottom",n,"fixed",U.optionsHeight,0).then(({x:i,y:s})=>{this.optionsMenu.style.left=`${i}px`,this.optionsMenu.style.top=`${s}px`})}}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var o;t.stopPropagation(),this.isSlotEmpty=(0,Ee.isSlotEmptyOrWithoutContent)(this.optionsSlot);let a=(o=this.optionsSlot)===null||o===void 0?void 0:o.assignedElements().map(n=>n);a&&a.length>0&&(this.options=a)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0;break}}onOptionsKeyDown(t){var o,a;let n,i=this.focusedOption?this.optionsList.indexOf(this.focusedOption):0;switch(t.key){case" ":case"Enter":t.preventDefault(),t.stopPropagation(),this.onSelectOption(t),this.optionsDisplayed=!1,(o=this.mainPanel)===null||o===void 0||o.focus();break;case"Escape":this.optionsDisplayed=!1,(a=this.mainPanel)===null||a===void 0||a.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=this.optionsList[(i-1+this.optionsList.length)%this.optionsList.length];break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=this.optionsList[(i+1)%this.optionsList.length];break;default:if(t.key.length!=1)break;this.isKeyAlphanumeric(t.key)&&(n=this.handleAlphanumericPress(t.key));break}n?.focus()}isKeyAlphanumeric(t){let o=t.charCodeAt(0);return o>47&&o<58||o>64&&o<91||o>96&&o<123}handleAlphanumericPress(t){let o=new Date;o.getTime()-this.lastSearchInputDate.getTime()>e.searchTimeoutMilliseconds&&(this.currentSearch=""),this.currentSearch+=t.toLowerCase();let a=this.options.find(n=>{var i;return((i=n.label)===null||i===void 0?void 0:i.toLowerCase().substring(0,this.currentSearch.length))===this.currentSearch});return this.lastSearchInputDate=o,a&&this.optionsList.find(n=>n.value===a.value)}getOptionId(t){if(!t)return;let o=this.options.findIndex(a=>(0,Ee.deepEqual)(a.value,t.value));if(o!==-1)return`option-${o}`}onSelectOption(t){t.stopPropagation(),this.setValue(t.target.value)}setValue(t,o=!0){let a=this.options.find(n=>(0,Ee.deepEqual)(n.value,t));a&&this.selectOption(a,o)}selectOption(t,o=!0){var a,n;if(!(0,Ee.deepEqual)((a=this.selectedOption)===null||a===void 0?void 0:a.value,t?.value)){this.selectedOption=t;for(let i of this.options)i.selected=i===t;o&&this.dispatchEvent(new CustomEvent("change",{detail:(n=this.selectedOption)===null||n===void 0?void 0:n.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}};F.elementDefinitions={"ft-input-label":_e,"ft-typography":He,"ft-ripple":q,"ft-icon":be,"ft-select-option":pe};F.searchTimeoutMilliseconds=2e3;F.styles=[Ye,Ql];se([(0,ee.property)({type:String})],F.prototype,"label",void 0);se([(0,ee.property)({type:String})],F.prototype,"ariaLabel",void 0);se([(0,ee.property)({type:String})],F.prototype,"helper",void 0);se([(0,ee.property)({type:Boolean})],F.prototype,"outlined",void 0);se([(0,ee.property)({type:Boolean})],F.prototype,"disabled",void 0);se([(0,ee.property)({type:Boolean})],F.prototype,"error",void 0);se([(0,ee.property)({type:Boolean})],F.prototype,"fixedMenuPosition",void 0);se([(0,ee.property)({type:Array})],F.prototype,"options",void 0);se([(0,ee.state)()],F.prototype,"selectedOption",void 0);se([(0,ee.state)()],F.prototype,"optionsDisplayed",void 0);se([(0,ee.state)()],F.prototype,"focusOptions",void 0);se([(0,ee.state)()],F.prototype,"currentSearch",void 0);se([(0,ee.state)()],F.prototype,"lastSearchInputDate",void 0);se([(0,ee.query)(".ft-select")],F.prototype,"container",void 0);se([(0,ee.query)(".ft-select--options")],F.prototype,"optionsMenu",void 0);se([(0,ee.query)(".ft-select--input-panel")],F.prototype,"mainPanel",void 0);se([(0,ee.query)("slot:not([name])")],F.prototype,"optionsSlot",void 0);var hn=S(P());(0,hn.customElement)("ft-select")(F);(0,hn.customElement)("ft-select-option")(pe);var dr=S(P()),ei=S(re());var mn;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(mn||(mn={}));var Ur=S(P());var a1=S(P());var x6=S(i1(),1);var s1;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(s1||(s1={}));var c1;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(c1||(c1={}));var l1;(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"})(l1||(l1={}));var d1;(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"})(d1||(d1={}));var u1;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(u1||(u1={}));var f1;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(f1||(f1={}));var p1;(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"})(p1||(p1={}));var h1;(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"})(h1||(h1={}));var m1;(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"})(m1||(m1={}));var g1;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(g1||(g1={}));var y1;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(y1||(y1={}));var b1;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(b1||(b1={}));var x1;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(x1||(x1={}));var v1;(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"})(v1||(v1={}));var gn;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(gn||(gn={}));var S1;(function(e){e.ASC="ASC",e.DESC="DESC"})(S1||(S1={}));var C1;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(C1||(C1={}));var yn;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(yn||(yn={}));var E1;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(E1||(E1={}));var L1;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(L1||(L1={}));var A1;(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"})(A1||(A1={}));var O1;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(O1||(O1={}));var R1;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(R1||(R1={}));var bn;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(bn||(bn={}));var _1;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(_1||(_1={}));var te;(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"})(te||(te={}));var Le;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Le||(Le={}));var w1;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(w1||(w1={}));var N1;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(N1||(N1={}));var M1;(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"})(M1||(M1={}));var T1;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(T1||(T1={}));var z1;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(z1||(z1={}));var P1;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(P1||(P1={}));var k1;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(k1||(k1={}));var I1;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(I1||(I1={}));var D1;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(D1||(D1={}));var b6={[te.PERSONAL_BOOK_SHARE_USER]:[te.PERSONAL_BOOK_USER],[te.HTML_EXPORT_USER]:[te.PERSONAL_BOOK_USER],[te.PDF_EXPORT_USER]:[te.PERSONAL_BOOK_USER],[te.KHUB_ADMIN]:[te.CONTENT_PUBLISHER],[te.ADMIN]:[te.KHUB_ADMIN,te.USERS_ADMIN,te.PORTAL_ADMIN,te.BEHAVIOR_DATA_USER],[te.GENERATIVE_AI_EXPORT_USER]:[te.GENERATIVE_AI_USER]};function U1(e,t){return e===t||(b6[e]??[]).some(o=>U1(o,t))}function B1(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(a=>U1(a,t))}var Wn=S(re());function v6(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,a,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(a=o;a--!==0;)if(!ho(e[a],t[a]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a of e.entries())if(!t.has(a[0]))return!1;for(a of e.entries())if(!ho(a[1],t.get(a[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a of e.entries())if(!t.has(a[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null);if(n=i(e),o=n.length,o!==i(t).length)return!1;for(a=o;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[a]))return!1;for(a=o;a--!==0;){let s=n[a];if(!ho(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function ho(e,t){try{return v6(e,t)}catch{return!1}}function Tr(e,t){return!ho(e,t)}function G1(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function mo(e,t){let o=a=>a[e]===!0;return a=>{if(o(a))return a;let n=t(a);return n[e]=!0,n}}var H1=S(re(),1);var xn=e=>{let t=e??{};return(o,a)=>{var n;let i={hasChanged:Tr,attribute:!1,...t};(0,H1.property)(i)(o,a);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(a,{selector:(n=t.selector)!==null&&n!==void 0?n:l=>l[a],store:t.store})}};var go=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(a=>a.type===t);return o&&(this.queue=this.queue.filter(a=>a!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Lt=S(re(),1);var F1=S(re(),1);function W1(e,t){let o=()=>JSON.parse(JSON.stringify(e));return(0,F1.property)({type:Object,converter:{fromAttribute:a=>{if(a==null)return o();try{return JSON.parse(a)}catch{return o()}},toAttribute:a=>JSON.stringify(a)},hasChanged:Tr,...t??{}})}var yo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,a)=>{this.resolvePromise=o,this.rejectPromise=a})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let a=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of a)try{await s()}catch(l){n(l);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 j1=S(K(),1);var bo=globalThis,S6=bo.ShadowRoot&&(bo.ShadyCSS===void 0||bo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Gy=Symbol();var $1=(e,t)=>{if(S6)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let a=document.createElement("style"),n=bo.litNonce;n!==void 0&&a.setAttribute("nonce",n),a.textContent=o.cssText,e.appendChild(a)}};var xo=class extends j1.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([n,i])=>t.registry.define(n,i)));let o={...t.shadowRootOptions,customElements:t.registry},a=this.renderOptions.creationScope=this.attachShadow(o);return $1(a,t.elementStyles),a}};function V1(e,t,...o){var a;let n=e.querySelector(t);for(let i of o)n=(a=n?.shadowRoot)===null||a===void 0?void 0:a.querySelector(i);return n}var rr=function(e,t,o,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,o):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,o,i):s(t,o))||i);return n>3&&i&&Object.defineProperty(t,o,i),i},Y1,K1=Symbol("constructorPrototype"),q1=Symbol("constructorName"),X1=Symbol("exportpartsDebouncer"),Z1=Symbol("dynamicDependenciesLoaded"),tr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};tr.eventName="exportparts-updated";var De=class extends xo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Y1]=new yo(5),this.scheduleExportpartsUpdate=()=>{var t,o,a;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(a=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&a!==void 0&&a)&&this[X1].run(()=>{var n,i;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[q1]=this.constructor.name,this[K1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[q1]&&Object.setPrototypeOf(this,this[K1])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(a){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",a)}let o=this.constructor;o[Z1]||(o[Z1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(tr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(tr.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 tr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:a,shadowPath:n}=this.elementToFocus;if(a!=null){let i=[...n??[],a];o=V1(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,a,n;if(((a=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&a!==void 0?a:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var o,a,n,i,s,l;let f=b=>b!=null&&b.trim().length>0,p=t.filter(f).map(b=>b.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(a=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&a!==void 0?a:[]){let C=(i=(n=b.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&i!==void 0?i:[],E=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(M=>M.split(":")[1]))!==null&&l!==void 0?l:[],O=[...C,...E].filter(f).map(M=>M.trim());for(let M of O)m.add(M)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(b=>p.map(C=>`${b}:${C}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};Y1=X1;rr([(0,Lt.property)()],De.prototype,"exportpartsPrefix",void 0);rr([W1([])],De.prototype,"exportpartsPrefixes",void 0);rr([(0,Lt.property)({reflect:!0})],De.prototype,"exportparts",void 0);rr([(0,Lt.property)()],De.prototype,"customStylesheet",void 0);rr([(0,Lt.property)()],De.prototype,"elementToFocus",void 0);rr([(0,Lt.state)()],De.prototype,"useAdoptedStyleSheets",void 0);function vo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var zr=Symbol("internalReduxEventsUnsubscribers"),nt=Symbol("internalStoresUnsubscribers"),At=Symbol("internalStores"),C6=mo(Symbol("withRedux"),function(e){var t,o,a;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[a]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[At].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[At].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[At].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[At].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[At].delete(l)}setupStores(){this.unsubscribeFromStores(),this[At].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[nt].has(s.store):this[nt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var f;this[nt].set(s,l.subscribe(()=>this.updateFromStores())),this[zr].set(s,[]),vo(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=b=>this[m](b);l.addEventListener(p.eventName,g),this[zr].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[nt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[nt].has(s)&&this[nt].get(s)(),this[nt].delete(s),(l=this[zr].get(s))===null||l===void 0||l.forEach(f=>f()),this[zr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=nt,o=At,a=zr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Q1=class extends C6(De){};function Ae(e){for(var t=arguments.length,o=Array(t>1?t-1:0),a=1;a<t;a++)o[a-1]=arguments[a];if(0)var n,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ke(e){return!!e&&!!e[Z]}function Me(e){var t;return!!e&&(function(o){if(!o||typeof o!="object")return!1;var a=Object.getPrototypeOf(o);if(a===null)return!0;var n=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===N6}(e)||Array.isArray(e)||!!e[n2]||!!(!((t=e.constructor)===null||t===void 0)&&t[n2])||_n(e)||wn(e))}function Ot(e,t,o){o===void 0&&(o=!1),nr(e)===0?(o?Object.keys:ar)(e).forEach(function(a){o&&typeof a=="symbol"||t(a,e[a],e)}):e.forEach(function(a,n){return t(n,a,e)})}function nr(e){var t=e[Z];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:_n(e)?2:wn(e)?3:0}function or(e,t){return nr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function E6(e,t){return nr(e)===2?e.get(t):e[t]}function i2(e,t,o){var a=nr(e);a===2?e.set(t,o):a===3?e.add(o):e[t]=o}function s2(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function _n(e){return _6&&e instanceof Map}function wn(e){return w6&&e instanceof Set}function it(e){return e.o||e.t}function Nn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=d2(e);delete t[Z];for(var o=ar(t),a=0;a<o.length;a++){var n=o[a],i=t[n];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[n]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function Mn(e,t){return t===void 0&&(t=!1),Tn(e)||Ke(e)||!Me(e)||(nr(e)>1&&(e.set=e.add=e.clear=e.delete=L6),Object.freeze(e),t&&Ot(e,function(o,a){return Mn(a,!0)},!0)),e}function L6(){Ae(2)}function Tn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ue(e){var t=Rn[e];return t||Ae(18,e),t}function A6(e,t){Rn[e]||(Rn[e]=t)}function Ln(){return kr}function vn(e,t){t&&(Ue("Patches"),e.u=[],e.s=[],e.v=t)}function So(e){An(e),e.p.forEach(O6),e.p=null}function An(e){e===kr&&(kr=e.l)}function J1(e){return kr={p:[],l:kr,h:e,m:!0,_:0}}function O6(e){var t=e[Z];t.i===0||t.i===1?t.j():t.g=!0}function Sn(e,t){t._=t.p.length;var o=t.p[0],a=e!==void 0&&e!==o;return t.h.O||Ue("ES5").S(t,e,a),a?(o[Z].P&&(So(t),Ae(4)),Me(e)&&(e=Co(t,e),t.l||Eo(t,e)),t.u&&Ue("Patches").M(o[Z].t,e,t.u,t.s)):e=Co(t,o,[]),So(t),t.u&&t.v(t.u,t.s),e!==l2?e:void 0}function Co(e,t,o){if(Tn(t))return t;var a=t[Z];if(!a)return Ot(t,function(l,f){return e2(e,a,t,l,f,o)},!0),t;if(a.A!==e)return t;if(!a.P)return Eo(e,a.t,!0),a.t;if(!a.I){a.I=!0,a.A._--;var n=a.i===4||a.i===5?a.o=Nn(a.k):a.o,i=n,s=!1;a.i===3&&(i=new Set(n),n.clear(),s=!0),Ot(i,function(l,f){return e2(e,a,n,l,f,o,s)}),Eo(e,n,!1),o&&e.u&&Ue("Patches").N(a,o,e.u,e.s)}return a.o}function e2(e,t,o,a,n,i,s){if(Ke(n)){var l=Co(e,n,i&&t&&t.i!==3&&!or(t.R,a)?i.concat(a):void 0);if(i2(o,a,l),!Ke(l))return;e.m=!1}else s&&o.add(n);if(Me(n)&&!Tn(n)){if(!e.h.D&&e._<1)return;Co(e,n),t&&t.A.l||Eo(e,n)}}function Eo(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&Mn(t,o)}function Cn(e,t){var o=e[Z];return(o?it(o):e)[t]}function t2(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var a=Object.getOwnPropertyDescriptor(o,t);if(a)return a;o=Object.getPrototypeOf(o)}}function st(e){e.P||(e.P=!0,e.l&&st(e.l))}function En(e){e.o||(e.o=Nn(e.t))}function On(e,t,o){var a=_n(t)?Ue("MapSet").F(t,o):wn(t)?Ue("MapSet").T(t,o):e.O?function(n,i){var s=Array.isArray(n),l={i:s?1:0,A:i?i.A:Ln(),P:!1,I:!1,R:{},l:i,t:n,k:null,o:null,j:null,C:!1},f=l,p=Ir;s&&(f=[l],p=Pr);var m=Proxy.revocable(f,p),g=m.revoke,b=m.proxy;return l.k=b,l.j=g,b}(t,o):Ue("ES5").J(t,o);return(o?o.A:Ln()).p.push(a),a}function R6(e){return Ke(e)||Ae(22,e),function t(o){if(!Me(o))return o;var a,n=o[Z],i=nr(o);if(n){if(!n.P&&(n.i<4||!Ue("ES5").K(n)))return n.t;n.I=!0,a=r2(o,i),n.I=!1}else a=r2(o,i);return Ot(a,function(s,l){n&&E6(n.t,s)===l||i2(a,s,t(l))}),i===3?new Set(a):a}(e)}function r2(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Nn(e)}function c2(){function e(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var p=this[Z];return Ir.get(p,s)},set:function(p){var m=this[Z];Ir.set(m,s,p)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][Z];if(!f.P)switch(f.i){case 5:a(f)&&st(f);break;case 4:o(f)&&st(f)}}}function o(s){for(var l=s.t,f=s.k,p=ar(f),m=p.length-1;m>=0;m--){var g=p[m];if(g!==Z){var b=l[g];if(b===void 0&&!or(l,g))return!0;var C=f[g],E=C&&C[Z];if(E?E.t!==b:!s2(C,b))return!0}}var O=!!l[Z];return p.length!==ar(l).length+(O?0:1)}function a(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function n(s){s.g&&Ae(3,JSON.stringify(it(s)))}var i={};A6("ES5",{J:function(s,l){var f=Array.isArray(s),p=function(g,b){if(g){for(var C=Array(b.length),E=0;E<b.length;E++)Object.defineProperty(C,""+E,e(E,!0));return C}var O=d2(b);delete O[Z];for(var M=ar(O),T=0;T<M.length;T++){var w=M[T];O[w]=e(w,g||!!O[w].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(f,s),m={i:f?5:4,A:l?l.A:Ln(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,Z,{value:m,writable:!0}),p},S:function(s,l,f){f?Ke(l)&&l[Z].A===s&&t(s.p):(s.u&&function p(m){if(m&&typeof m=="object"){var g=m[Z];if(g){var b=g.t,C=g.k,E=g.R,O=g.i;if(O===4)Ot(C,function(B){B!==Z&&(b[B]!==void 0||or(b,B)?E[B]||p(C[B]):(E[B]=!0,st(g)))}),Ot(b,function(B){C[B]!==void 0||or(C,B)||(E[B]=!1,st(g))});else if(O===5){if(a(g)&&(st(g),E.length=!0),C.length<b.length)for(var M=C.length;M<b.length;M++)E[M]=!1;else for(var T=b.length;T<C.length;T++)E[T]=!0;for(var w=Math.min(C.length,b.length),D=0;D<w;D++)C.hasOwnProperty(D)||(E[D]=!0),E[D]===void 0&&p(C[D])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):a(s)}})}var o2,kr,zn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",_6=typeof Map<"u",w6=typeof Set<"u",a2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",l2=zn?Symbol.for("immer-nothing"):((o2={})["immer-nothing"]=!0,o2),n2=zn?Symbol.for("immer-draftable"):"__$immer_draftable",Z=zn?Symbol.for("immer-state"):"__$immer_state";var N6=""+Object.prototype.constructor,ar=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,d2=Object.getOwnPropertyDescriptors||function(e){var t={};return ar(e).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)}),t},Rn={},Ir={get:function(e,t){if(t===Z)return e;var o=it(e);if(!or(o,t))return function(n,i,s){var l,f=t2(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(n.k):void 0}(e,o,t);var a=o[t];return e.I||!Me(a)?a:a===Cn(e.t,t)?(En(e),e.o[t]=On(e.A.h,a,e)):a},has:function(e,t){return t in it(e)},ownKeys:function(e){return Reflect.ownKeys(it(e))},set:function(e,t,o){var a=t2(it(e),t);if(a?.set)return a.set.call(e.k,o),!0;if(!e.P){var n=Cn(it(e),t),i=n?.[Z];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(s2(o,n)&&(o!==void 0||or(e.t,t)))return!0;En(e),st(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return Cn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,En(e),st(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=it(e),a=Reflect.getOwnPropertyDescriptor(o,t);return a&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:a.enumerable,value:o[t]}},defineProperty:function(){Ae(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ae(12)}},Pr={};Ot(Ir,function(e,t){Pr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Pr.deleteProperty=function(e,t){return Pr.set.call(this,e,t,void 0)},Pr.set=function(e,t,o){return Ir.set.call(this,e[0],t,o,e[0])};var M6=function(){function e(o){var a=this;this.O=a2,this.D=!0,this.produce=function(n,i,s){if(typeof n=="function"&&typeof i!="function"){var l=i;i=n;var f=a;return function(O){var M=this;O===void 0&&(O=l);for(var T=arguments.length,w=Array(T>1?T-1:0),D=1;D<T;D++)w[D-1]=arguments[D];return f.produce(O,function(B){var V;return(V=i).call.apply(V,[M,B].concat(w))})}}var p;if(typeof i!="function"&&Ae(6),s!==void 0&&typeof s!="function"&&Ae(7),Me(n)){var m=J1(a),g=On(a,n,void 0),b=!0;try{p=i(g),b=!1}finally{b?So(m):An(m)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(O){return vn(m,s),Sn(O,m)},function(O){throw So(m),O}):(vn(m,s),Sn(p,m))}if(!n||typeof n!="object"){if((p=i(n))===void 0&&(p=n),p===l2&&(p=void 0),a.D&&Mn(p,!0),s){var C=[],E=[];Ue("Patches").M(n,p,C,E),s(C,E)}return p}Ae(21,n)},this.produceWithPatches=function(n,i){if(typeof n=="function")return function(p){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return a.produceWithPatches(p,function(C){return n.apply(void 0,[C].concat(g))})};var s,l,f=a.produce(n,i,function(p,m){s=p,l=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(p){return[p,s,l]}):[f,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){Me(o)||Ae(8),Ke(o)&&(o=R6(o));var a=J1(this),n=On(this,o,void 0);return n[Z].C=!0,An(a),n},t.finishDraft=function(o,a){var n=o&&o[Z],i=n.A;return vn(i,a),Sn(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!a2&&Ae(20),this.O=o},t.applyPatches=function(o,a){var n;for(n=a.length-1;n>=0;n--){var i=a[n];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}n>-1&&(a=a.slice(n+1));var s=Ue("Patches").$;return Ke(o)?s(o,a):this.produce(o,function(l){return s(l,a)})},e}(),ve=new M6,T6=ve.produce,tb=ve.produceWithPatches.bind(ve),rb=ve.setAutoFreeze.bind(ve),ob=ve.setUseProxies.bind(ve),ab=ve.applyPatches.bind(ve),nb=ve.createDraft.bind(ve),ib=ve.finishDraft.bind(ve),Lo=T6;function Rt(e){"@babel/helpers - typeof";return Rt=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},Rt(e)}function u2(e,t){if(Rt(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var a=o.call(e,t||"default");if(Rt(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function f2(e){var t=u2(e,"string");return Rt(t)=="symbol"?t:t+""}function p2(e,t,o){return(t=f2(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function h2(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),o.push.apply(o,a)}return o}function Pn(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?h2(Object(o),!0).forEach(function(a){p2(e,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):h2(Object(o)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(o,a))})}return e}function fe(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 m2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),kn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ao={INIT:"@@redux/INIT"+kn(),REPLACE:"@@redux/REPLACE"+kn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+kn()}};function z6(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 In(e,t,o){var a;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(fe(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(fe(1));return o(In)(e,t)}if(typeof e!="function")throw new Error(fe(2));var n=e,i=t,s=[],l=s,f=!1;function p(){l===s&&(l=s.slice())}function m(){if(f)throw new Error(fe(3));return i}function g(O){if(typeof O!="function")throw new Error(fe(4));if(f)throw new Error(fe(5));var M=!0;return p(),l.push(O),function(){if(M){if(f)throw new Error(fe(6));M=!1,p();var w=l.indexOf(O);l.splice(w,1),s=null}}}function b(O){if(!z6(O))throw new Error(fe(7));if(typeof O.type>"u")throw new Error(fe(8));if(f)throw new Error(fe(9));try{f=!0,i=n(i,O)}finally{f=!1}for(var M=s=l,T=0;T<M.length;T++){var w=M[T];w()}return O}function C(O){if(typeof O!="function")throw new Error(fe(10));n=O,b({type:Ao.REPLACE})}function E(){var O,M=g;return O={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(fe(11));function D(){w.next&&w.next(m())}D();var B=M(D);return{unsubscribe:B}}},O[m2]=function(){return this},O}return b({type:Ao.INIT}),a={dispatch:b,subscribe:g,getState:m,replaceReducer:C},a[m2]=E,a}function P6(e){Object.keys(e).forEach(function(t){var o=e[t],a=o(void 0,{type:Ao.INIT});if(typeof a>"u")throw new Error(fe(12));if(typeof o(void 0,{type:Ao.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fe(13))})}function g2(e){for(var t=Object.keys(e),o={},a=0;a<t.length;a++){var n=t[a];typeof e[n]=="function"&&(o[n]=e[n])}var i=Object.keys(o),s,l;try{P6(o)}catch(f){l=f}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var b=!1,C={},E=0;E<i.length;E++){var O=i[E],M=o[O],T=p[O],w=M(T,m);if(typeof w>"u"){var D=m&&m.type;throw new Error(fe(14))}C[O]=w,b=b||w!==T}return b=b||i.length!==Object.keys(p).length,b?C:p}}function ir(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(a){return a}:t.length===1?t[0]:t.reduce(function(a,n){return function(){return a(n.apply(void 0,arguments))}})}function y2(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){return function(){var n=a.apply(void 0,arguments),i=function(){throw new Error(fe(15))},s={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=ir.apply(void 0,l)(n.dispatch),Pn(Pn({},n),{},{dispatch:i})}}}function b2(e){var t=function(a){var n=a.dispatch,i=a.getState;return function(s){return function(l){return typeof l=="function"?l(n,i,e):s(l)}}};return t}var x2=b2();x2.withExtraArgument=b2;var Dn=x2;var L2=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(a[i]=n[i])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}}(),k6=function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,n,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(m){return f([p,m])}}function f(p){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,n&&(i=p[0]&2?n.return:p[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,p[1])).done)return i;switch(n=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,n=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(m){p=[6,m],n=0}finally{a=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},sr=function(e,t){for(var o=0,a=t.length,n=e.length;o<a;o++,n++)e[n]=t[o];return e},I6=Object.defineProperty,D6=Object.defineProperties,U6=Object.getOwnPropertyDescriptors,v2=Object.getOwnPropertySymbols,B6=Object.prototype.hasOwnProperty,G6=Object.prototype.propertyIsEnumerable,S2=function(e,t,o){return t in e?I6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},ct=function(e,t){for(var o in t||(t={}))B6.call(t,o)&&S2(e,o,t[o]);if(v2)for(var a=0,n=v2(t);a<n.length;a++){var o=n[a];G6.call(t,o)&&S2(e,o,t[o])}return e},Un=function(e,t){return D6(e,U6(t))},H6=function(e,t,o){return new Promise(function(a,n){var i=function(f){try{l(o.next(f))}catch(p){n(p)}},s=function(f){try{l(o.throw(f))}catch(p){n(p)}},l=function(f){return f.done?a(f.value):Promise.resolve(f.value).then(i,s)};l((o=o.apply(e,t)).next())})};var F6=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ir:ir.apply(null,arguments)},Lb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function W6(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var $6=function(e){L2(t,e);function t(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var n=e.apply(this,o)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,sr([void 0],o[0].concat(this)))):new(t.bind.apply(t,sr([void 0],o.concat(this))))},t}(Array),j6=function(e){L2(t,e);function t(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var n=e.apply(this,o)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,sr([void 0],o[0].concat(this)))):new(t.bind.apply(t,sr([void 0],o.concat(this))))},t}(Array);function Hn(e){return Me(e)?Lo(e,function(){}):e}function V6(e){return typeof e=="boolean"}function K6(){return function(t){return q6(t)}}function q6(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,a=e.immutableCheck,n=a===void 0?!0:a,i=e.serializableCheck,s=i===void 0?!0:i,l=new $6;if(o&&(V6(o)?l.push(Dn):l.push(Dn.withExtraArgument(o.extraArgument))),0){if(n)var f;if(s)var p}return l}var Bn=!0;function A2(e){var t=K6(),o=e||{},a=o.reducer,n=a===void 0?void 0:a,i=o.middleware,s=i===void 0?t():i,l=o.devTools,f=l===void 0?!0:l,p=o.preloadedState,m=p===void 0?void 0:p,g=o.enhancers,b=g===void 0?void 0:g,C;if(typeof n=="function")C=n;else if(W6(n))C=g2(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var E=s;if(typeof E=="function"&&(E=E(t),!Bn&&!Array.isArray(E)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Bn&&E.some(function(B){return typeof B!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=y2.apply(void 0,E),M=ir;f&&(M=F6(ct({trace:!Bn},typeof f=="object"&&f)));var T=new j6(O),w=T;Array.isArray(b)?w=sr([O],b):typeof b=="function"&&(w=b(T));var D=M.apply(void 0,w);return In(C,m,D)}function lt(e,t){function o(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];if(t){var i=t.apply(void 0,a);if(!i)throw new Error("prepareAction did not return an object");return ct(ct({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:a[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(a){return a.type===e},o}function O2(e){var t={},o=[],a,n={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,n},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),n},addDefaultCase:function(i){return a=i,n}};return e(n),[t,o,a]}function Z6(e){return typeof e=="function"}function Y6(e,t,o,a){o===void 0&&(o=[]);var n=typeof t=="function"?O2(t):[t,o,a],i=n[0],s=n[1],l=n[2],f;if(Z6(e))f=function(){return Hn(e())};else{var p=Hn(e);f=function(){return p}}function m(g,b){g===void 0&&(g=f());var C=sr([i[b.type]],s.filter(function(E){var O=E.matcher;return O(b)}).map(function(E){var O=E.reducer;return O}));return C.filter(function(E){return!!E}).length===0&&(C=[l]),C.reduce(function(E,O){if(O)if(Ke(E)){var M=E,T=O(M,b);return T===void 0?E:T}else{if(Me(E))return Lo(E,function(w){return O(w,b)});var T=O(E,b);if(T===void 0){if(E===null)return E;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}return E},g)}return m.getInitialState=f,m}function X6(e,t){return e+"/"+t}function R2(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:Hn(e.initialState),a=e.reducers||{},n=Object.keys(a),i={},s={},l={};n.forEach(function(m){var g=a[m],b=X6(t,m),C,E;"reducer"in g?(C=g.reducer,E=g.prepare):C=g,i[m]=C,s[b]=C,l[m]=E?lt(b,E):lt(b)});function f(){var m=typeof e.extraReducers=="function"?O2(e.extraReducers):[e.extraReducers],g=m[0],b=g===void 0?{}:g,C=m[1],E=C===void 0?[]:C,O=m[2],M=O===void 0?void 0:O,T=ct(ct({},b),s);return Y6(o,function(w){for(var D in T)w.addCase(D,T[D]);for(var B=0,V=E;B<V.length;B++){var ye=V[B];w.addMatcher(ye.matcher,ye.reducer)}M&&w.addDefaultCase(M)})}var p;return{name:t,reducer:function(m,g){return p||(p=f()),p(m,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=f()),p.getInitialState()}}}var Q6="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",J6=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=Q6[Math.random()*64|0];return t},e8=["name","message","stack","code"],Gn=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),C2=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),t8=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,a=e8;o<a.length;o++){var n=a[o];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},_b=function(){function e(t,o,a){var n=lt(t+"/fulfilled",function(m,g,b,C){return{payload:m,meta:Un(ct({},C||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),i=lt(t+"/pending",function(m,g,b){return{payload:void 0,meta:Un(ct({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=lt(t+"/rejected",function(m,g,b,C,E){return{payload:C,error:(a&&a.serializeError||t8)(m||"Rejected"),meta:Un(ct({},E||{}),{arg:b,requestId:g,rejectedWithValue:!!C,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!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 p(m){return function(g,b,C){var E=a?.idGenerator?a.idGenerator(m):J6(),O=new f,M,T=!1;function w(B){M=B,O.abort()}var D=function(){return H6(this,null,function(){var B,V,ye,Re,le,ut,Mt;return k6(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),Re=(B=a?.condition)==null?void 0:B.call(a,m,{getState:b,extra:C}),o8(Re)?[4,Re]:[3,2];case 1:Re=y.sent(),y.label=2;case 2:if(Re===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=!0,le=new Promise(function(x,z){return O.signal.addEventListener("abort",function(){return z({name:"AbortError",message:M||"Aborted"})})}),g(i(E,m,(V=a?.getPendingMeta)==null?void 0:V.call(a,{requestId:E,arg:m},{getState:b,extra:C}))),[4,Promise.race([le,Promise.resolve(o(m,{dispatch:g,getState:b,extra:C,requestId:E,signal:O.signal,abort:w,rejectWithValue:function(x,z){return new Gn(x,z)},fulfillWithValue:function(x,z){return new C2(x,z)}})).then(function(x){if(x instanceof Gn)throw x;return x instanceof C2?n(x.payload,E,m,x.meta):n(x,E,m)})])];case 3:return ye=y.sent(),[3,5];case 4:return ut=y.sent(),ye=ut instanceof Gn?s(null,E,m,ut.payload,ut.meta):s(ut,E,m),[3,5];case 5:return Mt=a&&!a.dispatchConditionRejection&&s.match(ye)&&ye.meta.condition,Mt||g(ye),[2,ye]}})})}();return Object.assign(D,{abort:w,requestId:E,arg:m,unwrap:function(){return D.then(r8)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e}();function r8(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function o8(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var _2="listener",w2="completed",N2="cancelled",wb="task-"+N2,Nb="task-"+w2,Mb=_2+"-"+N2,Tb=_2+"-"+w2;var Fn="listenerMiddleware";var zb=lt(Fn+"/add"),Pb=lt(Fn+"/removeAll"),kb=lt(Fn+"/remove");var E2,Ib=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(E2||(E2=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},a8=function(e){return function(t){setTimeout(t,e)}},Db=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:a8(10);c2();var n8=mo(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,a,n){this.eventBus.addEventListener(o,a,n)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,a,n){this.eventBus.removeEventListener(o,a,n)}}}),Oo=class extends n8(Object){};window.ftReduxStores||(window.ftReduxStores={});var M2=class e extends Oo{static get(t){var o;let a=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,i=window.ftReduxStores[a];if(vo(i))return i;if(n==null)return;let s=R2({...n,reducers:(o=n.reducers)!==null&&o!==void 0?o:{}}),l=A2({reducer:(f,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=G1(s.getInitialState());for(let g of p.keeping)m[g]=(f??m)[g];return m}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...p.overwrites};return s.reducer(f,p)}});return window.ftReduxStores[n.name]=new e(s,l,n.eventBus)}constructor(t,o,a){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new go;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,p=i[f];return p?(...m)=>{let g=p(...m.map(n));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:n(m)})}}}),this.eventBus=a??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 Ro=class{static format(t,o,a,n){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(a,n)):this.getIntlDateTime(t,o,a,n)}static getMomentDateFormat(t,o){return t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,a,n){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(o,{dateStyle:a?"medium":"short"}).format(i);if(!n)return s;let l=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let t=a=>String(Math.floor(a)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var _o=S(P()),i8="ft-app-info",_t=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};_t.eventName="authentication-change";var s8={session:(e,t)=>{(0,_o.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>_.dispatchEvent(new _t(t.payload)),0))}},_=_o.FtReduxStore.get({name:i8,reducers:s8,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 T2=S(P()),wo=function(e,t,o,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,o):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,o,i):s(t,o))||i);return n>3&&i&&Object.defineProperty(t,o,i),i},ux=(0,T2.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...a){super(a),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(_)}dateFormatOptionsChanged(a){return a.has("metadataDescriptors")||a.has("useLongDateFormat")||a.has("useDateTimeFormat")||a.has("uiLocale")}getDateFormatter(a){var n,i;return((i=(n=this.metadataDescriptors.find(l=>l.key===a))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1)?l=>Ro.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return wo([(0,Wn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),wo([(0,Wn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),wo([xn({store:_.name,selector:o=>{var a,n;return(n=(a=o.metadataConfiguration)===null||a===void 0?void 0:a.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),wo([xn({store:_.name})],t.prototype,"uiLocale",void 0),t});var ko=S(P());var $n=S(P());var wt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:a}=_.getState(),n=t??a;if(o&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,n,!0)}static await(t){return new Promise(o=>{let a=e.get(t);if(a)o(a);else{let n=_.subscribe(()=>{a=e.get(t),a&&(n(),o(a))})}})}};var No=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:wt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):wt.await()}};var ge=class extends No{constructor(t=!0,o){var a;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let n=this.constructor;n.commonCache=(a=n.commonCache)!==null&&a!==void 0?a:new $n.CacheRegistry,this.cache=t?n.commonCache:new $n.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,a)=>0|31*o+a.charCodeAt(0),0))}};var Mo=class extends ge{async listMySearches(){let{session:t}=_.getState();return B1(t,te.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var To=class extends ge{async listMyBookmarks(){let t=_.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var zo=class extends ge{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=_.getState().session;return!!t?.sessionAuthenticated}};var Po=class extends ge{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=_.getState().session;return!!t?.sessionAuthenticated}};var c8="ft-user-assets",l8={setAssetCount:(e,t)=>{let{userAssetType:o,count:a}=t.payload.assetCount;e.assetCounts.allAsset[o]=a},clearAssetCount:e=>{Object.values(Le).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:a,asset:n}=t.payload;Vn(e,o,[...jn(e,o),n]),z2(e,o,1,a),P2(e,n)},editAsset:(e,t)=>{let{assetType:o,asset:a}=t.payload;Vn(e,o,jn(e,o).map(n=>n.id===a.id?a:n)),P2(e,a)},removeAsset:(e,t)=>{let{assetType:o,mapId:a,assetId:n}=t.payload;Vn(e,o,jn(e,o).filter(i=>i.id!==n)),z2(e,o,-1,a)}},k2={[Le.SEARCHES]:"savedSearches",[Le.BOOKMARKS]:"bookmarks",[Le.BOOKS]:void 0,[Le.COLLECTIONS]:void 0},jn=(e,t)=>{var o;let a=k2[t];return a?(o=e[a])!==null&&o!==void 0?o:[]:[]},Vn=(e,t,o)=>{let a=k2[t];a&&(e[a]=o)},z2=(e,t,o,a)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+o),t===Le.BOOKMARKS&&a)){let i=e.assetCounts.bookmarkByMap[a];e.assetCounts.bookmarkByMap[a]=Math.max(0,i+o)}},P2=(e,t)=>{let o=e.assetLabels.map(n=>n.title),a=t.labels.filter(n=>!o.includes(n)).map(n=>({title:n}));e.assetLabels.push(...a)},Se=ko.FtReduxStore.get({name:c8,reducers:l8,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Le).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Kn=class{constructor(t=new zo,o=new Po){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=_.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new To,this.savedSearchesService=new Mo,_.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=_.getState();(0,ko.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Se.actions.clearAssetCount(),Se.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Se.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Se.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Se.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Se.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&Se.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&Se.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(Se.getState().assetCounts.bookmarkByMap).length!==0;t===Le.BOOKMARKS&&o&&Se.actions.clearBookmarkCountByMap(),Se.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 o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Se.actions.bookmarks(o)}}},d8=new Kn;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=d8);var qn=class{addCommand(t,o=!1){_.commands.add(t,o)}consumeCommand(t){return _.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new qn;var Oe=S(P());var I2,cr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},u8=Symbol("clearAfterUnitTest"),Io=class extends(0,Oe.withEventBus)(ge){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[I2]=()=>{this.defaultMessages={},this.cache=new Oe.CacheRegistry,this.listeners={}},this.currentUiLocale=_.getState().uiLocale,_.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=_.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var a;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let n={...(a=this.defaultMessages[t])!==null&&a!==void 0?a:{},...o};(0,Oe.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,a;return this.fetchContext(t),(a=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&a!==void 0?a:{}}resolveRawMessage(t,o){let a=t.toLowerCase();return this.resolveContext(a)[o]}resolveMessage(t,o,...a){var n;let i=t.toLowerCase(),s=this.resolveContext(i);return new Oe.ParametrizedLabelResolver((n=this.defaultMessages[i])!==null&&n!==void 0?n:{},s).resolve(o,...a)}async fetchContext(t){let o=!this.cache.has(t),a;try{a=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(n){!(n instanceof Oe.CanceledPromiseError)&&o&&console.error(n)}return a}subscribe(t,o){var a;return t=t.toLowerCase(),this.listeners[t]=(a=this.listeners[t])!==null&&a!==void 0?a:new Set,this.listeners[t].add(o),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new cr({loadedContexts:t})),this.dispatchEvent(new cr({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new cr({loadedContexts:[t]})),this.dispatchEvent(new cr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(a=>(0,Oe.delay)(0).then(()=>a()).catch(()=>null)))}};I2=u8;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Io{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Io{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var lr=window.FluidTopicsI18nService,Do=window.FluidTopicsCustomI18nService;var D2=S(P()),Zn=class{highlightHtml(t,o,a){(0,D2.highlightHtml)(t,o,a)}};window.FluidTopicsHighlightHtmlService=new Zn;var U2=S(P());var Yn=class{isDate(t){var o,a,n,i;return(i=(n=((a=(o=_.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]).find(l=>l.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,o){var a,n,i;if(t==null)return"";try{return U2.DateFormatter.format(t,(a=o?.locale)!==null&&a!==void 0?a:_.getState().uiLocale,(n=o?.longFormat)!==null&&n!==void 0?n:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}catch(s){throw console.error(`Date ${JSON.stringify(t)} is not valid`,s),s}}};window.FluidTopicsDateService=new Yn;var B2=S(P());var Dr=class{static get(t,o){var a,n;let i=_.getState(),{lang:s,region:l}=(n=(a=i.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new B2.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var Xn=class{urlToSearchRequest(t){return Dr.get().parse(t)}searchRequestToUrl(t){return Dr.get().serialize(t)}};window.FluidTopicsUrlService=new Xn;var dt=S(P());var Nt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Nt.eventName="change";var Qn=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},G2=new Qn;var Uo=class e extends dt.WithEventBus{static build(){return new e(window.history,G2,()=>window.location,!1)}constructor(t,o,a,n){var i,s;super(),this.history=t,this.historyStorage=o,this.windowLocation=a,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,o=!1){let a=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,a&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,dt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Nt(this.currentItem())),0)}installProxies(){let t=o=>(a,n,[i,s,l])=>{let f=o(),p={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof l=="string"?l:(l??this.windowLocation()).href};a.apply(n,[p,s,l]),this.setCurrentState(p,!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 o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let a={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(a)}addHistoryChangeListener(t){this.addEventListener(Nt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Nt.eventName,t)}currentItem(){return(0,dt.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,dt.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,dt.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 o;let a=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!a)return t;let n=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,a);)this.hasState(i)&&(n=i),i++;return n}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var a;if(!this.hasState(t))return!1;let n=o??this.currentState.majorStateId,i=(a=this.states[t])===null||a===void 0?void 0:a.majorStateId;return i==null||i!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Uo.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 H2=S(K());var F2=H2.css`
1320
+ `}willUpdate(t){super.willUpdate(t),t.has("options")&&(this.selectedOption=this.options.filter(o=>o.selected)[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1)}contentAvailableCallback(t){var o,a;if(super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&((a=(o=this.selectedOptionElement)!==null&&o!==void 0?o:this.firstOption)===null||a===void 0||a.focus(),this.focusOptions=!1),t.has("optionsDisplayed")&&this.hasOptionsMenuOpen){this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px";let n=["bottom","top"];(0,Ee.computeOffsetAutoPosition)(this.mainPanel,this.optionsMenu,"bottom",n,"fixed",U.optionsHeight,0).then(({x:i,y:s})=>{this.optionsMenu.style.left=`${i}px`,this.optionsMenu.style.top=`${s}px`})}}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var o;t.stopPropagation(),this.isSlotEmpty=(0,Ee.isSlotEmptyOrWithoutContent)(this.optionsSlot);let a=(o=this.optionsSlot)===null||o===void 0?void 0:o.assignedElements().map(n=>n);a&&a.length>0&&(this.options=a)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0;break}}onOptionsKeyDown(t){var o,a;let n,i=this.focusedOption?this.optionsList.indexOf(this.focusedOption):0;switch(t.key){case" ":case"Enter":t.preventDefault(),t.stopPropagation(),this.onSelectOption(t),this.optionsDisplayed=!1,(o=this.mainPanel)===null||o===void 0||o.focus();break;case"Escape":this.optionsDisplayed=!1,(a=this.mainPanel)===null||a===void 0||a.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=this.optionsList[(i-1+this.optionsList.length)%this.optionsList.length];break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=this.optionsList[(i+1)%this.optionsList.length];break;default:if(t.key.length!=1)break;this.isKeyAlphanumeric(t.key)&&(n=this.handleAlphanumericPress(t.key));break}n?.focus()}isKeyAlphanumeric(t){let o=t.charCodeAt(0);return o>47&&o<58||o>64&&o<91||o>96&&o<123}handleAlphanumericPress(t){let o=new Date;o.getTime()-this.lastSearchInputDate.getTime()>e.searchTimeoutMilliseconds&&(this.currentSearch=""),this.currentSearch+=t.toLowerCase();let a=this.options.find(n=>{var i;return((i=n.label)===null||i===void 0?void 0:i.toLowerCase().substring(0,this.currentSearch.length))===this.currentSearch});return this.lastSearchInputDate=o,a&&this.optionsList.find(n=>n.value===a.value)}getOptionId(t){if(!t)return;let o=this.options.findIndex(a=>(0,Ee.deepEqual)(a.value,t.value));if(o!==-1)return`option-${o}`}onSelectOption(t){t.stopPropagation(),this.setValue(t.target.value)}setValue(t,o=!0){let a=this.options.find(n=>(0,Ee.deepEqual)(n.value,t));a&&this.selectOption(a,o)}selectOption(t,o=!0){var a,n;if(!(0,Ee.deepEqual)((a=this.selectedOption)===null||a===void 0?void 0:a.value,t?.value)){this.selectedOption=t;for(let i of this.options)i.selected=i===t;o&&this.dispatchEvent(new CustomEvent("change",{detail:(n=this.selectedOption)===null||n===void 0?void 0:n.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}};F.elementDefinitions={"ft-input-label":_e,"ft-typography":He,"ft-ripple":q,"ft-icon":be,"ft-select-option":pe};F.searchTimeoutMilliseconds=2e3;F.styles=[Ye,Ql];se([(0,ee.property)({type:String})],F.prototype,"label",void 0);se([(0,ee.property)({type:String})],F.prototype,"ariaLabel",void 0);se([(0,ee.property)({type:String})],F.prototype,"helper",void 0);se([(0,ee.property)({type:Boolean})],F.prototype,"outlined",void 0);se([(0,ee.property)({type:Boolean})],F.prototype,"disabled",void 0);se([(0,ee.property)({type:Boolean})],F.prototype,"error",void 0);se([(0,ee.property)({type:Boolean})],F.prototype,"fixedMenuPosition",void 0);se([(0,ee.property)({type:Array})],F.prototype,"options",void 0);se([(0,ee.state)()],F.prototype,"selectedOption",void 0);se([(0,ee.state)()],F.prototype,"optionsDisplayed",void 0);se([(0,ee.state)()],F.prototype,"focusOptions",void 0);se([(0,ee.state)()],F.prototype,"currentSearch",void 0);se([(0,ee.state)()],F.prototype,"lastSearchInputDate",void 0);se([(0,ee.query)(".ft-select")],F.prototype,"container",void 0);se([(0,ee.query)(".ft-select--options")],F.prototype,"optionsMenu",void 0);se([(0,ee.query)(".ft-select--input-panel")],F.prototype,"mainPanel",void 0);se([(0,ee.query)("slot:not([name])")],F.prototype,"optionsSlot",void 0);var hn=S(P());(0,hn.customElement)("ft-select")(F);(0,hn.customElement)("ft-select-option")(pe);var dr=S(P()),ei=S(re());var mn;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(mn||(mn={}));var Ur=S(P());var a1=S(P());var x6=S(i1(),1);var s1;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(s1||(s1={}));var c1;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(c1||(c1={}));var l1;(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"})(l1||(l1={}));var d1;(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"})(d1||(d1={}));var u1;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(u1||(u1={}));var f1;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(f1||(f1={}));var p1;(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"})(p1||(p1={}));var h1;(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"})(h1||(h1={}));var m1;(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"})(m1||(m1={}));var g1;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(g1||(g1={}));var y1;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(y1||(y1={}));var b1;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(b1||(b1={}));var x1;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(x1||(x1={}));var v1;(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"})(v1||(v1={}));var gn;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(gn||(gn={}));var S1;(function(e){e.ASC="ASC",e.DESC="DESC"})(S1||(S1={}));var C1;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(C1||(C1={}));var yn;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(yn||(yn={}));var E1;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(E1||(E1={}));var L1;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(L1||(L1={}));var A1;(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"})(A1||(A1={}));var O1;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(O1||(O1={}));var R1;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(R1||(R1={}));var bn;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(bn||(bn={}));var _1;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(_1||(_1={}));var te;(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"})(te||(te={}));var Le;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Le||(Le={}));var w1;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(w1||(w1={}));var N1;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(N1||(N1={}));var M1;(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"})(M1||(M1={}));var T1;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(T1||(T1={}));var z1;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(z1||(z1={}));var P1;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(P1||(P1={}));var k1;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(k1||(k1={}));var I1;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(I1||(I1={}));var D1;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(D1||(D1={}));var b6={[te.PERSONAL_BOOK_SHARE_USER]:[te.PERSONAL_BOOK_USER],[te.HTML_EXPORT_USER]:[te.PERSONAL_BOOK_USER],[te.PDF_EXPORT_USER]:[te.PERSONAL_BOOK_USER],[te.KHUB_ADMIN]:[te.CONTENT_PUBLISHER],[te.ADMIN]:[te.KHUB_ADMIN,te.USERS_ADMIN,te.PORTAL_ADMIN,te.BEHAVIOR_DATA_USER],[te.GENERATIVE_AI_EXPORT_USER]:[te.GENERATIVE_AI_USER]};function U1(e,t){return e===t||(b6[e]??[]).some(o=>U1(o,t))}function B1(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(a=>U1(a,t))}var Wn=S(re());function v6(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,a,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(a=o;a--!==0;)if(!ho(e[a],t[a]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a of e.entries())if(!t.has(a[0]))return!1;for(a of e.entries())if(!ho(a[1],t.get(a[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a of e.entries())if(!t.has(a[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null);if(n=i(e),o=n.length,o!==i(t).length)return!1;for(a=o;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[a]))return!1;for(a=o;a--!==0;){let s=n[a];if(!ho(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function ho(e,t){try{return v6(e,t)}catch{return!1}}function Tr(e,t){return!ho(e,t)}function G1(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function mo(e,t){let o=a=>a[e]===!0;return a=>{if(o(a))return a;let n=t(a);return n[e]=!0,n}}var H1=S(re(),1);var xn=e=>{let t=e??{};return(o,a)=>{var n;let i={hasChanged:Tr,attribute:!1,...t};(0,H1.property)(i)(o,a);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(a,{selector:(n=t.selector)!==null&&n!==void 0?n:l=>l[a],store:t.store})}};var go=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(a=>a.type===t);return o&&(this.queue=this.queue.filter(a=>a!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Lt=S(re(),1);var F1=S(re(),1);function W1(e,t){let o=()=>JSON.parse(JSON.stringify(e));return(0,F1.property)({type:Object,converter:{fromAttribute:a=>{if(a==null)return o();try{return JSON.parse(a)}catch{return o()}},toAttribute:a=>JSON.stringify(a)},hasChanged:Tr,...t??{}})}var yo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,a)=>{this.resolvePromise=o,this.rejectPromise=a})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let a=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of a)try{await s()}catch(l){n(l);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 j1=S(K(),1);var bo=globalThis,S6=bo.ShadowRoot&&(bo.ShadyCSS===void 0||bo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Gy=Symbol();var $1=(e,t)=>{if(S6)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let a=document.createElement("style"),n=bo.litNonce;n!==void 0&&a.setAttribute("nonce",n),a.textContent=o.cssText,e.appendChild(a)}};var xo=class extends j1.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([n,i])=>t.registry.define(n,i)));let o={...t.shadowRootOptions,customElements:t.registry},a=this.renderOptions.creationScope=this.attachShadow(o);return $1(a,t.elementStyles),a}};function V1(e,t,...o){var a;let n=e.querySelector(t);for(let i of o)n=(a=n?.shadowRoot)===null||a===void 0?void 0:a.querySelector(i);return n}var rr=function(e,t,o,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,o):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,o,i):s(t,o))||i);return n>3&&i&&Object.defineProperty(t,o,i),i},Y1,K1=Symbol("constructorPrototype"),q1=Symbol("constructorName"),X1=Symbol("exportpartsDebouncer"),Z1=Symbol("dynamicDependenciesLoaded"),tr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};tr.eventName="exportparts-updated";var De=class extends xo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Y1]=new yo(5),this.scheduleExportpartsUpdate=()=>{var t,o,a;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(a=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&a!==void 0&&a)&&this[X1].run(()=>{var n,i;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[q1]=this.constructor.name,this[K1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[q1]&&Object.setPrototypeOf(this,this[K1])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(a){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",a)}let o=this.constructor;o[Z1]||(o[Z1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(tr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(tr.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 tr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:a,shadowPath:n}=this.elementToFocus;if(a!=null){let i=[...n??[],a];o=V1(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,a,n;if(((a=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&a!==void 0?a:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var o,a,n,i,s,l;let f=b=>b!=null&&b.trim().length>0,p=t.filter(f).map(b=>b.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(a=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&a!==void 0?a:[]){let C=(i=(n=b.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&i!==void 0?i:[],E=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(M=>M.split(":")[1]))!==null&&l!==void 0?l:[],O=[...C,...E].filter(f).map(M=>M.trim());for(let M of O)m.add(M)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(b=>p.map(C=>`${b}:${C}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};Y1=X1;rr([(0,Lt.property)()],De.prototype,"exportpartsPrefix",void 0);rr([W1([])],De.prototype,"exportpartsPrefixes",void 0);rr([(0,Lt.property)({reflect:!0})],De.prototype,"exportparts",void 0);rr([(0,Lt.property)()],De.prototype,"customStylesheet",void 0);rr([(0,Lt.property)()],De.prototype,"elementToFocus",void 0);rr([(0,Lt.state)()],De.prototype,"useAdoptedStyleSheets",void 0);function vo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var zr=Symbol("internalReduxEventsUnsubscribers"),nt=Symbol("internalStoresUnsubscribers"),At=Symbol("internalStores"),C6=mo(Symbol("withRedux"),function(e){var t,o,a;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[a]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[At].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[At].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[At].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[At].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[At].delete(l)}setupStores(){this.unsubscribeFromStores(),this[At].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[nt].has(s.store):this[nt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var f;this[nt].set(s,l.subscribe(()=>this.updateFromStores())),this[zr].set(s,[]),vo(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=b=>this[m](b);l.addEventListener(p.eventName,g),this[zr].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[nt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[nt].has(s)&&this[nt].get(s)(),this[nt].delete(s),(l=this[zr].get(s))===null||l===void 0||l.forEach(f=>f()),this[zr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=nt,o=At,a=zr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Q1=class extends C6(De){};function Ae(e){for(var t=arguments.length,o=Array(t>1?t-1:0),a=1;a<t;a++)o[a-1]=arguments[a];if(0)var n,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ke(e){return!!e&&!!e[Z]}function Me(e){var t;return!!e&&(function(o){if(!o||typeof o!="object")return!1;var a=Object.getPrototypeOf(o);if(a===null)return!0;var n=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===N6}(e)||Array.isArray(e)||!!e[n2]||!!(!((t=e.constructor)===null||t===void 0)&&t[n2])||_n(e)||wn(e))}function Ot(e,t,o){o===void 0&&(o=!1),nr(e)===0?(o?Object.keys:ar)(e).forEach(function(a){o&&typeof a=="symbol"||t(a,e[a],e)}):e.forEach(function(a,n){return t(n,a,e)})}function nr(e){var t=e[Z];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:_n(e)?2:wn(e)?3:0}function or(e,t){return nr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function E6(e,t){return nr(e)===2?e.get(t):e[t]}function i2(e,t,o){var a=nr(e);a===2?e.set(t,o):a===3?e.add(o):e[t]=o}function s2(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function _n(e){return _6&&e instanceof Map}function wn(e){return w6&&e instanceof Set}function it(e){return e.o||e.t}function Nn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=d2(e);delete t[Z];for(var o=ar(t),a=0;a<o.length;a++){var n=o[a],i=t[n];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[n]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function Mn(e,t){return t===void 0&&(t=!1),Tn(e)||Ke(e)||!Me(e)||(nr(e)>1&&(e.set=e.add=e.clear=e.delete=L6),Object.freeze(e),t&&Ot(e,function(o,a){return Mn(a,!0)},!0)),e}function L6(){Ae(2)}function Tn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ue(e){var t=Rn[e];return t||Ae(18,e),t}function A6(e,t){Rn[e]||(Rn[e]=t)}function Ln(){return kr}function vn(e,t){t&&(Ue("Patches"),e.u=[],e.s=[],e.v=t)}function So(e){An(e),e.p.forEach(O6),e.p=null}function An(e){e===kr&&(kr=e.l)}function J1(e){return kr={p:[],l:kr,h:e,m:!0,_:0}}function O6(e){var t=e[Z];t.i===0||t.i===1?t.j():t.g=!0}function Sn(e,t){t._=t.p.length;var o=t.p[0],a=e!==void 0&&e!==o;return t.h.O||Ue("ES5").S(t,e,a),a?(o[Z].P&&(So(t),Ae(4)),Me(e)&&(e=Co(t,e),t.l||Eo(t,e)),t.u&&Ue("Patches").M(o[Z].t,e,t.u,t.s)):e=Co(t,o,[]),So(t),t.u&&t.v(t.u,t.s),e!==l2?e:void 0}function Co(e,t,o){if(Tn(t))return t;var a=t[Z];if(!a)return Ot(t,function(l,f){return e2(e,a,t,l,f,o)},!0),t;if(a.A!==e)return t;if(!a.P)return Eo(e,a.t,!0),a.t;if(!a.I){a.I=!0,a.A._--;var n=a.i===4||a.i===5?a.o=Nn(a.k):a.o,i=n,s=!1;a.i===3&&(i=new Set(n),n.clear(),s=!0),Ot(i,function(l,f){return e2(e,a,n,l,f,o,s)}),Eo(e,n,!1),o&&e.u&&Ue("Patches").N(a,o,e.u,e.s)}return a.o}function e2(e,t,o,a,n,i,s){if(Ke(n)){var l=Co(e,n,i&&t&&t.i!==3&&!or(t.R,a)?i.concat(a):void 0);if(i2(o,a,l),!Ke(l))return;e.m=!1}else s&&o.add(n);if(Me(n)&&!Tn(n)){if(!e.h.D&&e._<1)return;Co(e,n),t&&t.A.l||Eo(e,n)}}function Eo(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&Mn(t,o)}function Cn(e,t){var o=e[Z];return(o?it(o):e)[t]}function t2(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var a=Object.getOwnPropertyDescriptor(o,t);if(a)return a;o=Object.getPrototypeOf(o)}}function st(e){e.P||(e.P=!0,e.l&&st(e.l))}function En(e){e.o||(e.o=Nn(e.t))}function On(e,t,o){var a=_n(t)?Ue("MapSet").F(t,o):wn(t)?Ue("MapSet").T(t,o):e.O?function(n,i){var s=Array.isArray(n),l={i:s?1:0,A:i?i.A:Ln(),P:!1,I:!1,R:{},l:i,t:n,k:null,o:null,j:null,C:!1},f=l,p=Ir;s&&(f=[l],p=Pr);var m=Proxy.revocable(f,p),g=m.revoke,b=m.proxy;return l.k=b,l.j=g,b}(t,o):Ue("ES5").J(t,o);return(o?o.A:Ln()).p.push(a),a}function R6(e){return Ke(e)||Ae(22,e),function t(o){if(!Me(o))return o;var a,n=o[Z],i=nr(o);if(n){if(!n.P&&(n.i<4||!Ue("ES5").K(n)))return n.t;n.I=!0,a=r2(o,i),n.I=!1}else a=r2(o,i);return Ot(a,function(s,l){n&&E6(n.t,s)===l||i2(a,s,t(l))}),i===3?new Set(a):a}(e)}function r2(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Nn(e)}function c2(){function e(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var p=this[Z];return Ir.get(p,s)},set:function(p){var m=this[Z];Ir.set(m,s,p)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][Z];if(!f.P)switch(f.i){case 5:a(f)&&st(f);break;case 4:o(f)&&st(f)}}}function o(s){for(var l=s.t,f=s.k,p=ar(f),m=p.length-1;m>=0;m--){var g=p[m];if(g!==Z){var b=l[g];if(b===void 0&&!or(l,g))return!0;var C=f[g],E=C&&C[Z];if(E?E.t!==b:!s2(C,b))return!0}}var O=!!l[Z];return p.length!==ar(l).length+(O?0:1)}function a(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function n(s){s.g&&Ae(3,JSON.stringify(it(s)))}var i={};A6("ES5",{J:function(s,l){var f=Array.isArray(s),p=function(g,b){if(g){for(var C=Array(b.length),E=0;E<b.length;E++)Object.defineProperty(C,""+E,e(E,!0));return C}var O=d2(b);delete O[Z];for(var M=ar(O),T=0;T<M.length;T++){var w=M[T];O[w]=e(w,g||!!O[w].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(f,s),m={i:f?5:4,A:l?l.A:Ln(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,Z,{value:m,writable:!0}),p},S:function(s,l,f){f?Ke(l)&&l[Z].A===s&&t(s.p):(s.u&&function p(m){if(m&&typeof m=="object"){var g=m[Z];if(g){var b=g.t,C=g.k,E=g.R,O=g.i;if(O===4)Ot(C,function(B){B!==Z&&(b[B]!==void 0||or(b,B)?E[B]||p(C[B]):(E[B]=!0,st(g)))}),Ot(b,function(B){C[B]!==void 0||or(C,B)||(E[B]=!1,st(g))});else if(O===5){if(a(g)&&(st(g),E.length=!0),C.length<b.length)for(var M=C.length;M<b.length;M++)E[M]=!1;else for(var T=b.length;T<C.length;T++)E[T]=!0;for(var w=Math.min(C.length,b.length),D=0;D<w;D++)C.hasOwnProperty(D)||(E[D]=!0),E[D]===void 0&&p(C[D])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):a(s)}})}var o2,kr,zn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",_6=typeof Map<"u",w6=typeof Set<"u",a2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",l2=zn?Symbol.for("immer-nothing"):((o2={})["immer-nothing"]=!0,o2),n2=zn?Symbol.for("immer-draftable"):"__$immer_draftable",Z=zn?Symbol.for("immer-state"):"__$immer_state";var N6=""+Object.prototype.constructor,ar=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,d2=Object.getOwnPropertyDescriptors||function(e){var t={};return ar(e).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)}),t},Rn={},Ir={get:function(e,t){if(t===Z)return e;var o=it(e);if(!or(o,t))return function(n,i,s){var l,f=t2(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(n.k):void 0}(e,o,t);var a=o[t];return e.I||!Me(a)?a:a===Cn(e.t,t)?(En(e),e.o[t]=On(e.A.h,a,e)):a},has:function(e,t){return t in it(e)},ownKeys:function(e){return Reflect.ownKeys(it(e))},set:function(e,t,o){var a=t2(it(e),t);if(a?.set)return a.set.call(e.k,o),!0;if(!e.P){var n=Cn(it(e),t),i=n?.[Z];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(s2(o,n)&&(o!==void 0||or(e.t,t)))return!0;En(e),st(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return Cn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,En(e),st(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=it(e),a=Reflect.getOwnPropertyDescriptor(o,t);return a&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:a.enumerable,value:o[t]}},defineProperty:function(){Ae(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ae(12)}},Pr={};Ot(Ir,function(e,t){Pr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Pr.deleteProperty=function(e,t){return Pr.set.call(this,e,t,void 0)},Pr.set=function(e,t,o){return Ir.set.call(this,e[0],t,o,e[0])};var M6=function(){function e(o){var a=this;this.O=a2,this.D=!0,this.produce=function(n,i,s){if(typeof n=="function"&&typeof i!="function"){var l=i;i=n;var f=a;return function(O){var M=this;O===void 0&&(O=l);for(var T=arguments.length,w=Array(T>1?T-1:0),D=1;D<T;D++)w[D-1]=arguments[D];return f.produce(O,function(B){var V;return(V=i).call.apply(V,[M,B].concat(w))})}}var p;if(typeof i!="function"&&Ae(6),s!==void 0&&typeof s!="function"&&Ae(7),Me(n)){var m=J1(a),g=On(a,n,void 0),b=!0;try{p=i(g),b=!1}finally{b?So(m):An(m)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(O){return vn(m,s),Sn(O,m)},function(O){throw So(m),O}):(vn(m,s),Sn(p,m))}if(!n||typeof n!="object"){if((p=i(n))===void 0&&(p=n),p===l2&&(p=void 0),a.D&&Mn(p,!0),s){var C=[],E=[];Ue("Patches").M(n,p,C,E),s(C,E)}return p}Ae(21,n)},this.produceWithPatches=function(n,i){if(typeof n=="function")return function(p){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return a.produceWithPatches(p,function(C){return n.apply(void 0,[C].concat(g))})};var s,l,f=a.produce(n,i,function(p,m){s=p,l=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(p){return[p,s,l]}):[f,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){Me(o)||Ae(8),Ke(o)&&(o=R6(o));var a=J1(this),n=On(this,o,void 0);return n[Z].C=!0,An(a),n},t.finishDraft=function(o,a){var n=o&&o[Z],i=n.A;return vn(i,a),Sn(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!a2&&Ae(20),this.O=o},t.applyPatches=function(o,a){var n;for(n=a.length-1;n>=0;n--){var i=a[n];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}n>-1&&(a=a.slice(n+1));var s=Ue("Patches").$;return Ke(o)?s(o,a):this.produce(o,function(l){return s(l,a)})},e}(),ve=new M6,T6=ve.produce,tb=ve.produceWithPatches.bind(ve),rb=ve.setAutoFreeze.bind(ve),ob=ve.setUseProxies.bind(ve),ab=ve.applyPatches.bind(ve),nb=ve.createDraft.bind(ve),ib=ve.finishDraft.bind(ve),Lo=T6;function Rt(e){"@babel/helpers - typeof";return Rt=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},Rt(e)}function u2(e,t){if(Rt(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var a=o.call(e,t||"default");if(Rt(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function f2(e){var t=u2(e,"string");return Rt(t)=="symbol"?t:t+""}function p2(e,t,o){return(t=f2(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function h2(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),o.push.apply(o,a)}return o}function Pn(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?h2(Object(o),!0).forEach(function(a){p2(e,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):h2(Object(o)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(o,a))})}return e}function fe(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 m2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),kn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ao={INIT:"@@redux/INIT"+kn(),REPLACE:"@@redux/REPLACE"+kn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+kn()}};function z6(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 In(e,t,o){var a;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(fe(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(fe(1));return o(In)(e,t)}if(typeof e!="function")throw new Error(fe(2));var n=e,i=t,s=[],l=s,f=!1;function p(){l===s&&(l=s.slice())}function m(){if(f)throw new Error(fe(3));return i}function g(O){if(typeof O!="function")throw new Error(fe(4));if(f)throw new Error(fe(5));var M=!0;return p(),l.push(O),function(){if(M){if(f)throw new Error(fe(6));M=!1,p();var w=l.indexOf(O);l.splice(w,1),s=null}}}function b(O){if(!z6(O))throw new Error(fe(7));if(typeof O.type>"u")throw new Error(fe(8));if(f)throw new Error(fe(9));try{f=!0,i=n(i,O)}finally{f=!1}for(var M=s=l,T=0;T<M.length;T++){var w=M[T];w()}return O}function C(O){if(typeof O!="function")throw new Error(fe(10));n=O,b({type:Ao.REPLACE})}function E(){var O,M=g;return O={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(fe(11));function D(){w.next&&w.next(m())}D();var B=M(D);return{unsubscribe:B}}},O[m2]=function(){return this},O}return b({type:Ao.INIT}),a={dispatch:b,subscribe:g,getState:m,replaceReducer:C},a[m2]=E,a}function P6(e){Object.keys(e).forEach(function(t){var o=e[t],a=o(void 0,{type:Ao.INIT});if(typeof a>"u")throw new Error(fe(12));if(typeof o(void 0,{type:Ao.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fe(13))})}function g2(e){for(var t=Object.keys(e),o={},a=0;a<t.length;a++){var n=t[a];typeof e[n]=="function"&&(o[n]=e[n])}var i=Object.keys(o),s,l;try{P6(o)}catch(f){l=f}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var b=!1,C={},E=0;E<i.length;E++){var O=i[E],M=o[O],T=p[O],w=M(T,m);if(typeof w>"u"){var D=m&&m.type;throw new Error(fe(14))}C[O]=w,b=b||w!==T}return b=b||i.length!==Object.keys(p).length,b?C:p}}function ir(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(a){return a}:t.length===1?t[0]:t.reduce(function(a,n){return function(){return a(n.apply(void 0,arguments))}})}function y2(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){return function(){var n=a.apply(void 0,arguments),i=function(){throw new Error(fe(15))},s={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=ir.apply(void 0,l)(n.dispatch),Pn(Pn({},n),{},{dispatch:i})}}}function b2(e){var t=function(a){var n=a.dispatch,i=a.getState;return function(s){return function(l){return typeof l=="function"?l(n,i,e):s(l)}}};return t}var x2=b2();x2.withExtraArgument=b2;var Dn=x2;var L2=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(a[i]=n[i])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function a(){this.constructor=t}t.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}}(),k6=function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,n,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(m){return f([p,m])}}function f(p){if(a)throw new TypeError("Generator is already executing.");for(;o;)try{if(a=1,n&&(i=p[0]&2?n.return:p[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,p[1])).done)return i;switch(n=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,n=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(m){p=[6,m],n=0}finally{a=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},sr=function(e,t){for(var o=0,a=t.length,n=e.length;o<a;o++,n++)e[n]=t[o];return e},I6=Object.defineProperty,D6=Object.defineProperties,U6=Object.getOwnPropertyDescriptors,v2=Object.getOwnPropertySymbols,B6=Object.prototype.hasOwnProperty,G6=Object.prototype.propertyIsEnumerable,S2=function(e,t,o){return t in e?I6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},ct=function(e,t){for(var o in t||(t={}))B6.call(t,o)&&S2(e,o,t[o]);if(v2)for(var a=0,n=v2(t);a<n.length;a++){var o=n[a];G6.call(t,o)&&S2(e,o,t[o])}return e},Un=function(e,t){return D6(e,U6(t))},H6=function(e,t,o){return new Promise(function(a,n){var i=function(f){try{l(o.next(f))}catch(p){n(p)}},s=function(f){try{l(o.throw(f))}catch(p){n(p)}},l=function(f){return f.done?a(f.value):Promise.resolve(f.value).then(i,s)};l((o=o.apply(e,t)).next())})};var F6=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ir:ir.apply(null,arguments)},Lb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function W6(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var $6=function(e){L2(t,e);function t(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var n=e.apply(this,o)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,sr([void 0],o[0].concat(this)))):new(t.bind.apply(t,sr([void 0],o.concat(this))))},t}(Array),j6=function(e){L2(t,e);function t(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var n=e.apply(this,o)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,sr([void 0],o[0].concat(this)))):new(t.bind.apply(t,sr([void 0],o.concat(this))))},t}(Array);function Hn(e){return Me(e)?Lo(e,function(){}):e}function V6(e){return typeof e=="boolean"}function K6(){return function(t){return q6(t)}}function q6(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,a=e.immutableCheck,n=a===void 0?!0:a,i=e.serializableCheck,s=i===void 0?!0:i,l=new $6;if(o&&(V6(o)?l.push(Dn):l.push(Dn.withExtraArgument(o.extraArgument))),0){if(n)var f;if(s)var p}return l}var Bn=!0;function A2(e){var t=K6(),o=e||{},a=o.reducer,n=a===void 0?void 0:a,i=o.middleware,s=i===void 0?t():i,l=o.devTools,f=l===void 0?!0:l,p=o.preloadedState,m=p===void 0?void 0:p,g=o.enhancers,b=g===void 0?void 0:g,C;if(typeof n=="function")C=n;else if(W6(n))C=g2(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var E=s;if(typeof E=="function"&&(E=E(t),!Bn&&!Array.isArray(E)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Bn&&E.some(function(B){return typeof B!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=y2.apply(void 0,E),M=ir;f&&(M=F6(ct({trace:!Bn},typeof f=="object"&&f)));var T=new j6(O),w=T;Array.isArray(b)?w=sr([O],b):typeof b=="function"&&(w=b(T));var D=M.apply(void 0,w);return In(C,m,D)}function lt(e,t){function o(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];if(t){var i=t.apply(void 0,a);if(!i)throw new Error("prepareAction did not return an object");return ct(ct({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:a[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(a){return a.type===e},o}function O2(e){var t={},o=[],a,n={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,n},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),n},addDefaultCase:function(i){return a=i,n}};return e(n),[t,o,a]}function Z6(e){return typeof e=="function"}function Y6(e,t,o,a){o===void 0&&(o=[]);var n=typeof t=="function"?O2(t):[t,o,a],i=n[0],s=n[1],l=n[2],f;if(Z6(e))f=function(){return Hn(e())};else{var p=Hn(e);f=function(){return p}}function m(g,b){g===void 0&&(g=f());var C=sr([i[b.type]],s.filter(function(E){var O=E.matcher;return O(b)}).map(function(E){var O=E.reducer;return O}));return C.filter(function(E){return!!E}).length===0&&(C=[l]),C.reduce(function(E,O){if(O)if(Ke(E)){var M=E,T=O(M,b);return T===void 0?E:T}else{if(Me(E))return Lo(E,function(w){return O(w,b)});var T=O(E,b);if(T===void 0){if(E===null)return E;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}return E},g)}return m.getInitialState=f,m}function X6(e,t){return e+"/"+t}function R2(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:Hn(e.initialState),a=e.reducers||{},n=Object.keys(a),i={},s={},l={};n.forEach(function(m){var g=a[m],b=X6(t,m),C,E;"reducer"in g?(C=g.reducer,E=g.prepare):C=g,i[m]=C,s[b]=C,l[m]=E?lt(b,E):lt(b)});function f(){var m=typeof e.extraReducers=="function"?O2(e.extraReducers):[e.extraReducers],g=m[0],b=g===void 0?{}:g,C=m[1],E=C===void 0?[]:C,O=m[2],M=O===void 0?void 0:O,T=ct(ct({},b),s);return Y6(o,function(w){for(var D in T)w.addCase(D,T[D]);for(var B=0,V=E;B<V.length;B++){var ye=V[B];w.addMatcher(ye.matcher,ye.reducer)}M&&w.addDefaultCase(M)})}var p;return{name:t,reducer:function(m,g){return p||(p=f()),p(m,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=f()),p.getInitialState()}}}var Q6="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",J6=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=Q6[Math.random()*64|0];return t},e8=["name","message","stack","code"],Gn=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),C2=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),t8=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,a=e8;o<a.length;o++){var n=a[o];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},_b=function(){function e(t,o,a){var n=lt(t+"/fulfilled",function(m,g,b,C){return{payload:m,meta:Un(ct({},C||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),i=lt(t+"/pending",function(m,g,b){return{payload:void 0,meta:Un(ct({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=lt(t+"/rejected",function(m,g,b,C,E){return{payload:C,error:(a&&a.serializeError||t8)(m||"Rejected"),meta:Un(ct({},E||{}),{arg:b,requestId:g,rejectedWithValue:!!C,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!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 p(m){return function(g,b,C){var E=a?.idGenerator?a.idGenerator(m):J6(),O=new f,M,T=!1;function w(B){M=B,O.abort()}var D=function(){return H6(this,null,function(){var B,V,ye,Re,le,ut,Mt;return k6(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),Re=(B=a?.condition)==null?void 0:B.call(a,m,{getState:b,extra:C}),o8(Re)?[4,Re]:[3,2];case 1:Re=y.sent(),y.label=2;case 2:if(Re===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=!0,le=new Promise(function(x,z){return O.signal.addEventListener("abort",function(){return z({name:"AbortError",message:M||"Aborted"})})}),g(i(E,m,(V=a?.getPendingMeta)==null?void 0:V.call(a,{requestId:E,arg:m},{getState:b,extra:C}))),[4,Promise.race([le,Promise.resolve(o(m,{dispatch:g,getState:b,extra:C,requestId:E,signal:O.signal,abort:w,rejectWithValue:function(x,z){return new Gn(x,z)},fulfillWithValue:function(x,z){return new C2(x,z)}})).then(function(x){if(x instanceof Gn)throw x;return x instanceof C2?n(x.payload,E,m,x.meta):n(x,E,m)})])];case 3:return ye=y.sent(),[3,5];case 4:return ut=y.sent(),ye=ut instanceof Gn?s(null,E,m,ut.payload,ut.meta):s(ut,E,m),[3,5];case 5:return Mt=a&&!a.dispatchConditionRejection&&s.match(ye)&&ye.meta.condition,Mt||g(ye),[2,ye]}})})}();return Object.assign(D,{abort:w,requestId:E,arg:m,unwrap:function(){return D.then(r8)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e}();function r8(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function o8(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var _2="listener",w2="completed",N2="cancelled",wb="task-"+N2,Nb="task-"+w2,Mb=_2+"-"+N2,Tb=_2+"-"+w2;var Fn="listenerMiddleware";var zb=lt(Fn+"/add"),Pb=lt(Fn+"/removeAll"),kb=lt(Fn+"/remove");var E2,Ib=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(E2||(E2=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},a8=function(e){return function(t){setTimeout(t,e)}},Db=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:a8(10);c2();var n8=mo(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,a,n){this.eventBus.addEventListener(o,a,n)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,a,n){this.eventBus.removeEventListener(o,a,n)}}}),Oo=class extends n8(Object){};window.ftReduxStores||(window.ftReduxStores={});var M2=class e extends Oo{static get(t){var o;let a=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,i=window.ftReduxStores[a];if(vo(i))return i;if(n==null)return;let s=R2({...n,reducers:(o=n.reducers)!==null&&o!==void 0?o:{}}),l=A2({reducer:(f,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=G1(s.getInitialState());for(let g of p.keeping)m[g]=(f??m)[g];return m}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...p.overwrites};return s.reducer(f,p)}});return window.ftReduxStores[n.name]=new e(s,l,n.eventBus)}constructor(t,o,a){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new go;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,p=i[f];return p?(...m)=>{let g=p(...m.map(n));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:n(m)})}}}),this.eventBus=a??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 Ro=class{static format(t,o,a,n,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(a,n,!!i)):this.getIntlDateTime(t,o,a,n,!!i)}static getMomentDateFormat(t,o,a){return a?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,a,n,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:a?"medium":"short"}).format(s),f=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return i?f:n?`${l} ${f}`:l}static getTimezoneAsString(){let t=a=>String(Math.floor(a)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var _o=S(P()),i8="ft-app-info",_t=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};_t.eventName="authentication-change";var s8={session:(e,t)=>{(0,_o.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>_.dispatchEvent(new _t(t.payload)),0))}},_=_o.FtReduxStore.get({name:i8,reducers:s8,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 T2=S(P()),wo=function(e,t,o,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,o):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,o,i):s(t,o))||i);return n>3&&i&&Object.defineProperty(t,o,i),i},ux=(0,T2.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...a){super(a),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(_)}dateFormatOptionsChanged(a){return a.has("metadataDescriptors")||a.has("useLongDateFormat")||a.has("useDateTimeFormat")||a.has("uiLocale")}getDateFormatter(a){var n,i;return((i=(n=this.metadataDescriptors.find(l=>l.key===a))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1)?l=>Ro.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return wo([(0,Wn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),wo([(0,Wn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),wo([xn({store:_.name,selector:o=>{var a,n;return(n=(a=o.metadataConfiguration)===null||a===void 0?void 0:a.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),wo([xn({store:_.name})],t.prototype,"uiLocale",void 0),t});var ko=S(P());var $n=S(P());var wt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:a}=_.getState(),n=t??a;if(o&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,n,!0)}static await(t){return new Promise(o=>{let a=e.get(t);if(a)o(a);else{let n=_.subscribe(()=>{a=e.get(t),a&&(n(),o(a))})}})}};var No=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:wt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):wt.await()}};var ge=class extends No{constructor(t=!0,o){var a;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let n=this.constructor;n.commonCache=(a=n.commonCache)!==null&&a!==void 0?a:new $n.CacheRegistry,this.cache=t?n.commonCache:new $n.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,a)=>0|31*o+a.charCodeAt(0),0))}};var Mo=class extends ge{async listMySearches(){let{session:t}=_.getState();return B1(t,te.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var To=class extends ge{async listMyBookmarks(){let t=_.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var zo=class extends ge{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=_.getState().session;return!!t?.sessionAuthenticated}};var Po=class extends ge{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=_.getState().session;return!!t?.sessionAuthenticated}};var c8="ft-user-assets",l8={setAssetCount:(e,t)=>{let{userAssetType:o,count:a}=t.payload.assetCount;e.assetCounts.allAsset[o]=a},clearAssetCount:e=>{Object.values(Le).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:a,asset:n}=t.payload;Vn(e,o,[...jn(e,o),n]),z2(e,o,1,a),P2(e,n)},editAsset:(e,t)=>{let{assetType:o,asset:a}=t.payload;Vn(e,o,jn(e,o).map(n=>n.id===a.id?a:n)),P2(e,a)},removeAsset:(e,t)=>{let{assetType:o,mapId:a,assetId:n}=t.payload;Vn(e,o,jn(e,o).filter(i=>i.id!==n)),z2(e,o,-1,a)}},k2={[Le.SEARCHES]:"savedSearches",[Le.BOOKMARKS]:"bookmarks",[Le.BOOKS]:void 0,[Le.COLLECTIONS]:void 0},jn=(e,t)=>{var o;let a=k2[t];return a?(o=e[a])!==null&&o!==void 0?o:[]:[]},Vn=(e,t,o)=>{let a=k2[t];a&&(e[a]=o)},z2=(e,t,o,a)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+o),t===Le.BOOKMARKS&&a)){let i=e.assetCounts.bookmarkByMap[a];e.assetCounts.bookmarkByMap[a]=Math.max(0,i+o)}},P2=(e,t)=>{let o=e.assetLabels.map(n=>n.title),a=t.labels.filter(n=>!o.includes(n)).map(n=>({title:n}));e.assetLabels.push(...a)},Se=ko.FtReduxStore.get({name:c8,reducers:l8,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Le).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Kn=class{constructor(t=new zo,o=new Po){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=_.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new To,this.savedSearchesService=new Mo,_.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=_.getState();(0,ko.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Se.actions.clearAssetCount(),Se.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Se.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Se.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Se.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Se.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&Se.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&Se.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(Se.getState().assetCounts.bookmarkByMap).length!==0;t===Le.BOOKMARKS&&o&&Se.actions.clearBookmarkCountByMap(),Se.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 o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Se.actions.bookmarks(o)}}},d8=new Kn;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=d8);var qn=class{addCommand(t,o=!1){_.commands.add(t,o)}consumeCommand(t){return _.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new qn;var Oe=S(P());var I2,cr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},u8=Symbol("clearAfterUnitTest"),Io=class extends(0,Oe.withEventBus)(ge){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[I2]=()=>{this.defaultMessages={},this.cache=new Oe.CacheRegistry,this.listeners={}},this.currentUiLocale=_.getState().uiLocale,_.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=_.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var a;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let n={...(a=this.defaultMessages[t])!==null&&a!==void 0?a:{},...o};(0,Oe.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,a;return this.fetchContext(t),(a=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&a!==void 0?a:{}}resolveRawMessage(t,o){let a=t.toLowerCase();return this.resolveContext(a)[o]}resolveMessage(t,o,...a){var n;let i=t.toLowerCase(),s=this.resolveContext(i);return new Oe.ParametrizedLabelResolver((n=this.defaultMessages[i])!==null&&n!==void 0?n:{},s).resolve(o,...a)}async fetchContext(t){let o=!this.cache.has(t),a;try{a=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(n){!(n instanceof Oe.CanceledPromiseError)&&o&&console.error(n)}return a}subscribe(t,o){var a;return t=t.toLowerCase(),this.listeners[t]=(a=this.listeners[t])!==null&&a!==void 0?a:new Set,this.listeners[t].add(o),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new cr({loadedContexts:t})),this.dispatchEvent(new cr({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new cr({loadedContexts:[t]})),this.dispatchEvent(new cr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(a=>(0,Oe.delay)(0).then(()=>a()).catch(()=>null)))}};I2=u8;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Io{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Io{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var lr=window.FluidTopicsI18nService,Do=window.FluidTopicsCustomI18nService;var D2=S(P()),Zn=class{highlightHtml(t,o,a){(0,D2.highlightHtml)(t,o,a)}};window.FluidTopicsHighlightHtmlService=new Zn;var U2=S(P());var Yn=class{isDate(t){var o,a,n,i;return(i=(n=((a=(o=_.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]).find(l=>l.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,o){var a,n,i,s;if(t==null)return"";try{return U2.DateFormatter.format(t,(a=o?.locale)!==null&&a!==void 0?a:_.getState().uiLocale,(n=o?.longFormat)!==null&&n!==void 0?n:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1,(s=o?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new Yn;var B2=S(P());var Dr=class{static get(t,o){var a,n;let i=_.getState(),{lang:s,region:l}=(n=(a=i.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new B2.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var Xn=class{urlToSearchRequest(t){return Dr.get().parse(t)}searchRequestToUrl(t){return Dr.get().serialize(t)}};window.FluidTopicsUrlService=new Xn;var dt=S(P());var Nt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Nt.eventName="change";var Qn=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},G2=new Qn;var Uo=class e extends dt.WithEventBus{static build(){return new e(window.history,G2,()=>window.location,!1)}constructor(t,o,a,n){var i,s;super(),this.history=t,this.historyStorage=o,this.windowLocation=a,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,o=!1){let a=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,a&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,dt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Nt(this.currentItem())),0)}installProxies(){let t=o=>(a,n,[i,s,l])=>{let f=o(),p={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof l=="string"?l:(l??this.windowLocation()).href};a.apply(n,[p,s,l]),this.setCurrentState(p,!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 o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let a={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(a)}addHistoryChangeListener(t){this.addEventListener(Nt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Nt.eventName,t)}currentItem(){return(0,dt.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,dt.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,dt.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 o;let a=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!a)return t;let n=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,a);)this.hasState(i)&&(n=i),i++;return n}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var a;if(!this.hasState(t))return!1;let n=o??this.currentState.majorStateId,i=(a=this.states[t])===null||a===void 0?void 0:a.majorStateId;return i==null||i!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Uo.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 H2=S(K());var F2=H2.css`
1321
1321
  `;var $2=S(K()),ce=S(re()),Te=S(P());function W2(e,t){let{authenticationRequired:o,session:a}=_.getState();return o&&!a?.sessionAuthenticated?Promise.resolve(t):e()}var oe=function(e,t,o,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,o):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,o,i):s(t,o))||i);return n>3&&i&&Object.defineProperty(t,o,i),i},j=class extends Te.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=()=>wt.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Te.CacheRegistry,this.cleanSessionDebouncer=new Te.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return $2.html`
1322
1322
  <slot></slot>
1323
1323
  `}connectedCallback(){super.connectedCallback(),_.addEventListener(_t.eventName,this.reloadConfiguration)}disconnectedCallback(){_.addEventListener(_t.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var o,a,n,i,s,l,f;super.update(t),t.has("baseUrl")&&(_.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&_.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&_.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&_.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&_.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&_.actions.noCustom(this.noCustom),t.has("editorMode")&&_.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&_.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&_.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>lr.addContext(p)),t.has("openExternalDocumentInNewTab")&&_.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&_.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&_.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(_.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),_.actions.availableUiLocales((n=(a=this.localesConfiguration)===null||a===void 0?void 0:a.availableUiLocales)!==null&&n!==void 0?n:[]),_.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&_.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&_.actions.availableContentLocales((f=(l=this.availableContentLocales)===null||l===void 0?void 0:l.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",()=>W2(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};j.elementDefinitions={};j.styles=F2;oe([(0,ce.property)()],j.prototype,"baseUrl",void 0);oe([(0,ce.property)()],j.prototype,"apiIntegrationIdentifier",void 0);oe([(0,ce.property)()],j.prototype,"apiIntegrationAppVersion",void 0);oe([(0,ce.property)()],j.prototype,"uiLocale",void 0);oe([(0,Te.jsonProperty)(null)],j.prototype,"availableUiLocales",void 0);oe([(0,Te.jsonProperty)(null)],j.prototype,"metadataConfiguration",void 0);oe([(0,ce.property)({type:Boolean})],j.prototype,"editorMode",void 0);oe([(0,ce.property)({type:Boolean})],j.prototype,"noCustom",void 0);oe([(0,ce.property)({type:Boolean})],j.prototype,"openExternalDocumentInNewTab",void 0);oe([(0,ce.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],j.prototype,"noCustomComponent",void 0);oe([(0,ce.property)({type:Boolean})],j.prototype,"withManualResources",void 0);oe([(0,ce.property)({type:Boolean})],j.prototype,"navigatorOnline",void 0);oe([(0,ce.property)({type:Boolean})],j.prototype,"forcedOffline",void 0);oe([(0,ce.property)({type:Object})],j.prototype,"apiProvider",void 0);oe([(0,ce.property)({type:Boolean})],j.prototype,"authenticationRequired",void 0);oe([(0,Te.jsonProperty)([])],j.prototype,"messageContexts",void 0);oe([(0,Te.jsonProperty)(void 0)],j.prototype,"session",void 0);oe([(0,ce.state)()],j.prototype,"localesConfiguration",void 0);oe([(0,ce.state)()],j.prototype,"availableContentLocales",void 0);var j2=S(P());(0,j2.customElement)("ft-app-context")(j);var Bo=class e extends Event{constructor(){super(e.eventName)}};Bo.eventName="search-context-clear-all-filters";var V2=function(e,t,o,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,o):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,o,i):s(t,o))||i);return n>3&&i&&Object.defineProperty(t,o,i),i},ti=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},K2=Symbol("registerInterval"),Jn=Symbol("registerAttempts"),f8=40,p8=(0,dr.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(a){var n,i,s;super.willUpdate(a),a.has("neededSearchRequests")&&((n=this.stateManager)===null||n===void 0||n.unregisterComponent(this,(i=a.get("neededSearchRequests"))!==null&&i!==void 0?i:[]),(s=this.stateManager)===null||s===void 0||s.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(a){this.clearStateManager(),this.stateManager=a,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(a.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Jn]=0,this.tryToRegisterToContext(),this[K2]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Jn]>f8?window.clearInterval(this[K2]):(this[Jn]++,this.dispatchEvent(new ti))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return V2([(0,ei.state)()],t.prototype,"stateManager",void 0),V2([(0,ei.state)({hasChanged:dr.hasChanged})],t.prototype,"neededSearchRequests",void 0),t}),Go=class extends p8(dr.FtLitElementRedux){};var Ho=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?Do:lr}constructor(t,o=!1){this.name=t,this.custom=o,this.properties=new Proxy({},{get:(a,n)=>{let i=n;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(a,n)=>(...i)=>this.service.resolveMessage(this.name,n,...i)}),this.rawMessages=new Proxy({},{get:(a,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(a,n)=>()=>n}),this.attributes=new Proxy({},{get:(a,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var ur=S(P());var Y2=S(re());var ri=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[o,a]=t.split(".");return{context:o,key:a,custom:o!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},q2=new ri;var h8=function(e,t,o,a){var n=arguments.length,i=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,o):a,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,o,i):s(t,o))||i);return n>3&&i&&Object.defineProperty(t,o,i),i},m8=Symbol("i18nAttributes"),g8=Symbol("i18nListAttributes"),X2=Symbol("i18nProperties"),Fo=Symbol("i18nContexts"),Br=Symbol("i18nUnsubs"),$o=(0,ur.applyMixinOnce)(Symbol("withI18n"),function(e){var t,o;class a extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Do:lr}i18n(i){let{context:s,key:l,message:f}=i,{custom:p,args:m,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let b=m??(g?g(this):[]);return this.getI18nService(p).resolveMessage(s,l,...b)}return f}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(q2.isI18nKey(i)){let[l,f]=i.split(".");return this.i18n({custom:!0,context:l,key:f,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,f)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,f)=>{var p;return((p=f?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let f=this,p=(m,g,b)=>b?.context&&b.key&&i(m,g,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...m})}:b;(s=this[m8])===null||s===void 0||s.forEach((m,g)=>f[g]=p(m,g,f[g])),(l=this[g8])===null||l===void 0||l.forEach((m,g)=>{var b;return f[g]=(b=f[g])===null||b===void 0?void 0:b.map(C=>p(m,g,C))})}updateI18nProperties(i){var s;(s=this[X2])===null||s===void 0||s.forEach((l,f)=>{i(l,f)&&(this[f]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let f=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[Fo].set(f,{isCustomContext:l}),this[Br].has(f)||this[Br].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[Fo].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Fo].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Br].forEach(i=>i()),this[Br].clear()}}return t=Fo,o=Br,h8([(0,Y2.property)({type:Boolean})],a.prototype,"useCustomMessageContexts",void 0),a}),Z2=class extends $o(ur.FtLitElement){},Wo=class extends $o(ur.FtLitElementRedux){};var Q2=S(K());var J2=Q2.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 Hl={};var wi={};F(wi,{ParametrizedLabelResolver:()=>So});var So=class e{constructor(t,r){this.defaultLabels=t,this.labels=r}resolve(t,...r){var o,a;t=this.resolvePluralKey(t,r);let i=(a=(o=this.labels[t])!==null&&o!==void 0?o:this.defaultLabels[t])!==null&&a!==void 0?a:"";return e.replaceParameters(i,...r)}static replaceParameters(t,...r){return r.forEach((o,a)=>t=t.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>e.formatValue(o,s))),t}resolvePluralKey(t,r){for(let o of r)if(typeof o=="number"){let a=`${String(t)}[\\=${o}]`;if(a in this.labels||a in this.defaultLabels)return a}return t}static formatValue(t,r){return t instanceof Date?e.formatDate(t,r):t??""}static formatDate(t,r){let o=a=>r?.includes("date")?t.toLocaleDateString(a):r?.includes("time")?t.toLocaleTimeString(a):t.toLocaleString(a);try{return o(document.documentElement.lang)}catch{return o()}}};var Qi={};F(Qi,{FtCommandQueue:()=>Eo,FtLitElementRedux:()=>Jt,FtReduxStore:()=>_t,FtStateManager:()=>vn,ReduxWatcher:()=>xn,clearAllStores:()=>ep,isFtReduxStore:()=>Rr,redux:()=>it,reduxEventListener:()=>yu,reduxReactive:()=>gu,watch:()=>v1,withRedux:()=>Fl});var gu=()=>(e,t)=>{var r;let o=e.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(t)},it=e=>{let t=e??{};return(r,o)=>{var a;let i={hasChanged:ot,attribute:!1,...t};R(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=t.selector)!==null&&a!==void 0?a:c=>c[o],store:t.store})}},yu=e=>(t,r)=>{let o=t.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,e)};var Eo=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(o=>o.type===t);return r&&(this.queue=this.queue.filter(o=>o!==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))}};function Rr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Co=Symbol("internalReduxEventsUnsubscribers"),At=Symbol("internalStoresUnsubscribers"),Qt=Symbol("internalStores"),Fl=ce(Symbol("withRedux"),function(e){var t,r,o;class a extends e{constructor(){super(...arguments),this[t]=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[Qt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Qt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Qt].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Qt].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Qt].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Qt].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[At].has(s.store):this[At].size>0)&&(this[c]=s.selector(f.getState(),this))}})}subscribeToStore(s,c){var d;this[At].set(s,c.subscribe(()=>this.updateFromStores())),this[Co].set(s,[]),Rr(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[Co].get(s).push(()=>c.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[At].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[At].has(s)&&this[At].get(s)(),this[At].delete(s),(c=this[Co].get(s))===null||c===void 0||c.forEach(d=>d()),this[Co].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=At,r=Qt,o=Co,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Jt=class extends Fl(Z){};function Pe(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];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 st(e){return!!e&&!!e[ne]}function Fe(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Ou}(e)||Array.isArray(e)||!!e[ql]||!!(!((t=e.constructor)===null||t===void 0)&&t[ql])||Di(e)||Ui(e))}function er(e,t,r){r===void 0&&(r=!1),Nr(e)===0?(r?Object.keys:_r)(e).forEach(function(o){r&&typeof o=="symbol"||t(o,e[o],e)}):e.forEach(function(o,a){return t(a,o,e)})}function Nr(e){var t=e[ne];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Di(e)?2:Ui(e)?3:0}function wr(e,t){return Nr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function bu(e,t){return Nr(e)===2?e.get(t):e[t]}function Zl(e,t,r){var o=Nr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function Yl(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Di(e){return Cu&&e instanceof Map}function Ui(e){return Au&&e instanceof Set}function Ot(e){return e.o||e.t}function Bi(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Jl(e);delete t[ne];for(var r=_r(t),o=0;o<r.length;o++){var a=r[o],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 Hi(e,t){return t===void 0&&(t=!1),Fi(e)||st(e)||!Fe(e)||(Nr(e)>1&&(e.set=e.add=e.clear=e.delete=xu),Object.freeze(e),t&&er(e,function(r,o){return Hi(o,!0)},!0)),e}function xu(){Pe(2)}function Fi(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Qe(e){var t=zi[e];return t||Pe(18,e),t}function vu(e,t){zi[e]||(zi[e]=t)}function Pi(){return Oo}function _i(e,t){t&&(Qe("Patches"),e.u=[],e.s=[],e.v=t)}function hn(e){ki(e),e.p.forEach(Su),e.p=null}function ki(e){e===Oo&&(Oo=e.l)}function Gl(e){return Oo={p:[],l:Oo,h:e,m:!0,_:0}}function Su(e){var t=e[ne];t.i===0||t.i===1?t.j():t.g=!0}function Ni(e,t){t._=t.p.length;var r=t.p[0],o=e!==void 0&&e!==r;return t.h.O||Qe("ES5").S(t,e,o),o?(r[ne].P&&(hn(t),Pe(4)),Fe(e)&&(e=mn(t,e),t.l||gn(t,e)),t.u&&Qe("Patches").M(r[ne].t,e,t.u,t.s)):e=mn(t,r,[]),hn(t),t.u&&t.v(t.u,t.s),e!==Ql?e:void 0}function mn(e,t,r){if(Fi(t))return t;var o=t[ne];if(!o)return er(t,function(c,d){return $l(e,o,t,c,d,r)},!0),t;if(o.A!==e)return t;if(!o.P)return gn(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Bi(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),er(i,function(c,d){return $l(e,o,a,c,d,r,s)}),gn(e,a,!1),r&&e.u&&Qe("Patches").N(o,r,e.u,e.s)}return o.o}function $l(e,t,r,o,a,i,s){if(st(a)){var c=mn(e,a,i&&t&&t.i!==3&&!wr(t.R,o)?i.concat(o):void 0);if(Zl(r,o,c),!st(c))return;e.m=!1}else s&&r.add(a);if(Fe(a)&&!Fi(a)){if(!e.h.D&&e._<1)return;mn(e,a),t&&t.A.l||gn(e,a)}}function gn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Hi(t,r)}function Ti(e,t){var r=e[ne];return(r?Ot(r):e)[t]}function Wl(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Object.getPrototypeOf(r)}}function Lt(e){e.P||(e.P=!0,e.l&&Lt(e.l))}function Mi(e){e.o||(e.o=Bi(e.t))}function Ii(e,t,r){var o=Di(t)?Qe("MapSet").F(t,r):Ui(t)?Qe("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Pi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,f=Lo;s&&(d=[c],f=Ao);var h=Proxy.revocable(d,f),p=h.revoke,g=h.proxy;return c.k=g,c.j=p,g}(t,r):Qe("ES5").J(t,r);return(r?r.A:Pi()).p.push(o),o}function Eu(e){return st(e)||Pe(22,e),function t(r){if(!Fe(r))return r;var o,a=r[ne],i=Nr(r);if(a){if(!a.P&&(a.i<4||!Qe("ES5").K(a)))return a.t;a.I=!0,o=jl(r,i),a.I=!1}else o=jl(r,i);return er(o,function(s,c){a&&bu(a.t,s)===c||Zl(o,s,t(c))}),i===3?new Set(o):o}(e)}function jl(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Bi(e)}function Xl(){function e(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var f=this[ne];return Lo.get(f,s)},set:function(f){var h=this[ne];Lo.set(h,s,f)}},d}function t(s){for(var c=s.length-1;c>=0;c--){var d=s[c][ne];if(!d.P)switch(d.i){case 5:o(d)&&Lt(d);break;case 4:r(d)&&Lt(d)}}}function r(s){for(var c=s.t,d=s.k,f=_r(d),h=f.length-1;h>=0;h--){var p=f[h];if(p!==ne){var g=c[p];if(g===void 0&&!wr(c,p))return!0;var x=d[p],v=x&&x[ne];if(v?v.t!==g:!Yl(x,g))return!0}}var A=!!c[ne];return f.length!==_r(c).length+(A?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 a(s){s.g&&Pe(3,JSON.stringify(Ot(s)))}var i={};vu("ES5",{J:function(s,c){var d=Array.isArray(s),f=function(p,g){if(p){for(var x=Array(g.length),v=0;v<g.length;v++)Object.defineProperty(x,""+v,e(v,!0));return x}var A=Jl(g);delete A[ne];for(var L=_r(A),_=0;_<L.length;_++){var N=L[_];A[N]=e(N,p||!!A[N].enumerable)}return Object.create(Object.getPrototypeOf(g),A)}(d,s),h={i:d?5:4,A:c?c.A:Pi(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,ne,{value:h,writable:!0}),f},S:function(s,c,d){d?st(c)&&c[ne].A===s&&t(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var p=h[ne];if(p){var g=p.t,x=p.k,v=p.R,A=p.i;if(A===4)er(x,function(S){S!==ne&&(g[S]!==void 0||wr(g,S)?v[S]||f(x[S]):(v[S]=!0,Lt(p)))}),er(g,function(S){x[S]!==void 0||wr(x,S)||(v[S]=!1,Lt(p))});else if(A===5){if(o(p)&&(Lt(p),v.length=!0),x.length<g.length)for(var L=x.length;L<g.length;L++)v[L]=!1;else for(var _=g.length;_<x.length;_++)v[_]=!0;for(var N=Math.min(x.length,g.length),E=0;E<N;E++)x.hasOwnProperty(E)||(v[E]=!0),v[E]===void 0&&f(x[E])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Vl,Oo,Gi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Cu=typeof Map<"u",Au=typeof Set<"u",Kl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ql=Gi?Symbol.for("immer-nothing"):((Vl={})["immer-nothing"]=!0,Vl),ql=Gi?Symbol.for("immer-draftable"):"__$immer_draftable",ne=Gi?Symbol.for("immer-state"):"__$immer_state";var Ou=""+Object.prototype.constructor,_r=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Jl=Object.getOwnPropertyDescriptors||function(e){var t={};return _r(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},zi={},Lo={get:function(e,t){if(t===ne)return e;var r=Ot(e);if(!wr(r,t))return function(a,i,s){var c,d=Wl(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0}(e,r,t);var o=r[t];return e.I||!Fe(o)?o:o===Ti(e.t,t)?(Mi(e),e.o[t]=Ii(e.A.h,o,e)):o},has:function(e,t){return t in Ot(e)},ownKeys:function(e){return Reflect.ownKeys(Ot(e))},set:function(e,t,r){var o=Wl(Ot(e),t);if(o?.set)return o.set.call(e.k,r),!0;if(!e.P){var a=Ti(Ot(e),t),i=a?.[ne];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Yl(r,a)&&(r!==void 0||wr(e.t,t)))return!0;Mi(e),Lt(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 Ti(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Mi(e),Lt(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Ot(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty:function(){Pe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Pe(12)}},Ao={};er(Lo,function(e,t){Ao[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ao.deleteProperty=function(e,t){return Ao.set.call(this,e,t,void 0)},Ao.set=function(e,t,r){return Lo.set.call(this,e[0],t,r,e[0])};var Lu=function(){function e(r){var o=this;this.O=Kl,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(A){var L=this;A===void 0&&(A=c);for(var _=arguments.length,N=Array(_>1?_-1:0),E=1;E<_;E++)N[E-1]=arguments[E];return d.produce(A,function(S){var O;return(O=i).call.apply(O,[L,S].concat(N))})}}var f;if(typeof i!="function"&&Pe(6),s!==void 0&&typeof s!="function"&&Pe(7),Fe(a)){var h=Gl(o),p=Ii(o,a,void 0),g=!0;try{f=i(p),g=!1}finally{g?hn(h):ki(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(A){return _i(h,s),Ni(A,h)},function(A){throw hn(h),A}):(_i(h,s),Ni(f,h))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===Ql&&(f=void 0),o.D&&Hi(f,!0),s){var x=[],v=[];Qe("Patches").M(a,f,x,v),s(x,v)}return f}Pe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="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(x){return a.apply(void 0,[x].concat(p))})};var s,c,d=o.produce(a,i,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 t=e.prototype;return t.createDraft=function(r){Fe(r)||Pe(8),st(r)&&(r=Eu(r));var o=Gl(this),a=Ii(this,r,void 0);return a[ne].C=!0,ki(o),a},t.finishDraft=function(r,o){var a=r&&r[ne],i=a.A;return _i(i,o),Ni(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Kl&&Pe(20),this.O=r},t.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=Qe("Patches").$;return st(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},e}(),Le=new Lu,Ru=Le.produce,cv=Le.produceWithPatches.bind(Le),lv=Le.setAutoFreeze.bind(Le),dv=Le.setUseProxies.bind(Le),fv=Le.applyPatches.bind(Le),uv=Le.createDraft.bind(Le),pv=Le.finishDraft.bind(Le),yn=Ru;function tr(e){"@babel/helpers - typeof";return tr=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},tr(e)}function e1(e,t){if(tr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(tr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function t1(e){var t=e1(e,"string");return tr(t)=="symbol"?t:t+""}function r1(e,t,r){return(t=t1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,o)}return r}function $i(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?o1(Object(r),!0).forEach(function(o){r1(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o1(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function ge(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"}(),Wi=function(){return Math.random().toString(36).substring(7).split("").join(".")},bn={INIT:"@@redux/INIT"+Wi(),REPLACE:"@@redux/REPLACE"+Wi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Wi()}};function wu(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 ji(e,t,r){var o;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ge(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ge(1));return r(ji)(e,t)}if(typeof e!="function")throw new Error(ge(2));var a=e,i=t,s=[],c=s,d=!1;function f(){c===s&&(c=s.slice())}function h(){if(d)throw new Error(ge(3));return i}function p(A){if(typeof A!="function")throw new Error(ge(4));if(d)throw new Error(ge(5));var L=!0;return f(),c.push(A),function(){if(L){if(d)throw new Error(ge(6));L=!1,f();var N=c.indexOf(A);c.splice(N,1),s=null}}}function g(A){if(!wu(A))throw new Error(ge(7));if(typeof A.type>"u")throw new Error(ge(8));if(d)throw new Error(ge(9));try{d=!0,i=a(i,A)}finally{d=!1}for(var L=s=c,_=0;_<L.length;_++){var N=L[_];N()}return A}function x(A){if(typeof A!="function")throw new Error(ge(10));a=A,g({type:bn.REPLACE})}function v(){var A,L=p;return A={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ge(11));function E(){N.next&&N.next(h())}E();var S=L(E);return{unsubscribe:S}}},A[n1]=function(){return this},A}return g({type:bn.INIT}),o={dispatch:g,subscribe:p,getState:h,replaceReducer:x},o[n1]=v,o}function _u(e){Object.keys(e).forEach(function(t){var r=e[t],o=r(void 0,{type:bn.INIT});if(typeof o>"u")throw new Error(ge(12));if(typeof r(void 0,{type:bn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ge(13))})}function a1(e){for(var t=Object.keys(e),r={},o=0;o<t.length;o++){var a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),s,c;try{_u(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,x={},v=0;v<i.length;v++){var A=i[v],L=r[A],_=f[A],N=L(_,h);if(typeof N>"u"){var E=h&&h.type;throw new Error(ge(14))}x[A]=N,g=g||N!==_}return g=g||i.length!==Object.keys(f).length,g?x:f}}function Tr(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(o){return o}:t.length===1?t[0]:t.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function i1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(ge(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=t.map(function(d){return d(s)});return i=Tr.apply(void 0,c)(a.dispatch),$i($i({},a),{},{dispatch:i})}}}function s1(e){var t=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,e):s(c)}}};return t}var c1=s1();c1.withExtraArgument=s1;var Vi=c1;var p1=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[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 o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),Nu=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,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(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,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,a=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){r.label=f[1];break}if(f[0]===6&&r.label<i[1]){r.label=i[1],i=f;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(f);break}i[2]&&r.ops.pop(),r.trys.pop();continue}f=t.call(e,r)}catch(h){f=[6,h],a=0}finally{o=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Mr=function(e,t){for(var r=0,o=t.length,a=e.length;r<o;r++,a++)e[a]=t[r];return e},Tu=Object.defineProperty,Mu=Object.defineProperties,Pu=Object.getOwnPropertyDescriptors,l1=Object.getOwnPropertySymbols,ku=Object.prototype.hasOwnProperty,Iu=Object.prototype.propertyIsEnumerable,d1=function(e,t,r){return t in e?Tu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Rt=function(e,t){for(var r in t||(t={}))ku.call(t,r)&&d1(e,r,t[r]);if(l1)for(var o=0,a=l1(t);o<a.length;o++){var r=a[o];Iu.call(t,r)&&d1(e,r,t[r])}return e},Ki=function(e,t){return Mu(e,Pu(t))},zu=function(e,t,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(f){a(f)}},s=function(d){try{c(r.throw(d))}catch(f){a(f)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(e,t)).next())})};var Du=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tr:Tr.apply(null,arguments)},Tv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Uu(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 Bu=function(e){p1(t,e);function t(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];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=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return e.prototype.concat.apply(this,r)},t.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(t.bind.apply(t,Mr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Mr([void 0],r.concat(this))))},t}(Array),Hu=function(e){p1(t,e);function t(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];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=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return e.prototype.concat.apply(this,r)},t.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(t.bind.apply(t,Mr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Mr([void 0],r.concat(this))))},t}(Array);function Yi(e){return Fe(e)?yn(e,function(){}):e}function Fu(e){return typeof e=="boolean"}function Gu(){return function(t){return $u(t)}}function $u(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,o=e.immutableCheck,a=o===void 0?!0:o,i=e.serializableCheck,s=i===void 0?!0:i,c=new Bu;if(r&&(Fu(r)?c.push(Vi):c.push(Vi.withExtraArgument(r.extraArgument))),0){if(a)var d;if(s)var f}return c}var qi=!0;function h1(e){var t=Gu(),r=e||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?t():i,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,x;if(typeof a=="function")x=a;else if(Uu(a))x=a1(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 v=s;if(typeof v=="function"&&(v=v(t),!qi&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!qi&&v.some(function(S){return typeof S!="function"}))throw new Error("each middleware provided to configureStore must be a function");var A=i1.apply(void 0,v),L=Tr;d&&(L=Du(Rt({trace:!qi},typeof d=="object"&&d)));var _=new Hu(A),N=_;Array.isArray(g)?N=Mr([A],g):typeof g=="function"&&(N=g(_));var E=L.apply(void 0,N);return ji(x,h,E)}function wt(e,t){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(t){var i=t.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return Rt(Rt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:o[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(o){return o.type===e},r}function m1(e){var t={},r=[],o,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 o=i,a}};return e(a),[t,r,o]}function Wu(e){return typeof e=="function"}function ju(e,t,r,o){r===void 0&&(r=[]);var a=typeof t=="function"?m1(t):[t,r,o],i=a[0],s=a[1],c=a[2],d;if(Wu(e))d=function(){return Yi(e())};else{var f=Yi(e);d=function(){return f}}function h(p,g){p===void 0&&(p=d());var x=Mr([i[g.type]],s.filter(function(v){var A=v.matcher;return A(g)}).map(function(v){var A=v.reducer;return A}));return x.filter(function(v){return!!v}).length===0&&(x=[c]),x.reduce(function(v,A){if(A)if(st(v)){var L=v,_=A(L,g);return _===void 0?v:_}else{if(Fe(v))return yn(v,function(N){return A(N,g)});var _=A(v,g);if(_===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return _}return v},p)}return h.getInitialState=d,h}function Vu(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:Yi(e.initialState),o=e.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(h){var p=o[h],g=Vu(t,h),x,v;"reducer"in p?(x=p.reducer,v=p.prepare):x=p,i[h]=x,s[g]=x,c[h]=v?wt(g,v):wt(g)});function d(){var h=typeof e.extraReducers=="function"?m1(e.extraReducers):[e.extraReducers],p=h[0],g=p===void 0?{}:p,x=h[1],v=x===void 0?[]:x,A=h[2],L=A===void 0?void 0:A,_=Rt(Rt({},g),s);return ju(r,function(N){for(var E in _)N.addCase(E,_[E]);for(var S=0,O=v;S<O.length;S++){var M=O[S];N.addMatcher(M.matcher,M.reducer)}L&&N.addDefaultCase(L)})}var f;return{name:t,reducer:function(h,p){return f||(f=d()),f(h,p)},actions:c,caseReducers:i,getInitialState:function(){return f||(f=d()),f.getInitialState()}}}var Ku="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qu=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Ku[Math.random()*64|0];return t},Zu=["name","message","stack","code"],Zi=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),f1=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Yu=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,o=Zu;r<o.length;r++){var a=o[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},Iv=function(){function e(t,r,o){var a=wt(t+"/fulfilled",function(h,p,g,x){return{payload:h,meta:Ki(Rt({},x||{}),{arg:g,requestId:p,requestStatus:"fulfilled"})}}),i=wt(t+"/pending",function(h,p,g){return{payload:void 0,meta:Ki(Rt({},g||{}),{arg:p,requestId:h,requestStatus:"pending"})}}),s=wt(t+"/rejected",function(h,p,g,x,v){return{payload:x,error:(o&&o.serializeError||Yu)(h||"Rejected"),meta:Ki(Rt({},v||{}),{arg:g,requestId:p,rejectedWithValue:!!x,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,x){var v=o?.idGenerator?o.idGenerator(h):qu(),A=new d,L,_=!1;function N(S){L=S,A.abort()}var E=function(){return zu(this,null,function(){var S,O,M,B,j,$,z;return Nu(this,function(b){switch(b.label){case 0:return b.trys.push([0,4,,5]),B=(S=o?.condition)==null?void 0:S.call(o,h,{getState:g,extra:x}),Qu(B)?[4,B]:[3,2];case 1:B=b.sent(),b.label=2;case 2:if(B===!1||A.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return _=!0,j=new Promise(function(C,P){return A.signal.addEventListener("abort",function(){return P({name:"AbortError",message:L||"Aborted"})})}),p(i(v,h,(O=o?.getPendingMeta)==null?void 0:O.call(o,{requestId:v,arg:h},{getState:g,extra:x}))),[4,Promise.race([j,Promise.resolve(r(h,{dispatch:p,getState:g,extra:x,requestId:v,signal:A.signal,abort:N,rejectWithValue:function(C,P){return new Zi(C,P)},fulfillWithValue:function(C,P){return new f1(C,P)}})).then(function(C){if(C instanceof Zi)throw C;return C instanceof f1?a(C.payload,v,h,C.meta):a(C,v,h)})])];case 3:return M=b.sent(),[3,5];case 4:return $=b.sent(),M=$ instanceof Zi?s(null,v,h,$.payload,$.meta):s($,v,h),[3,5];case 5:return z=o&&!o.dispatchConditionRejection&&s.match(M)&&M.meta.condition,z||p(M),[2,M]}})})}();return Object.assign(E,{abort:N,requestId:v,arg:h,unwrap:function(){return E.then(Xu)}})}}return Object.assign(f,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Xu(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Qu(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var y1="listener",b1="completed",x1="cancelled",zv="task-"+x1,Dv="task-"+b1,Uv=y1+"-"+x1,Bv=y1+"-"+b1;var Xi="listenerMiddleware";var Hv=wt(Xi+"/add"),Fv=wt(Xi+"/removeAll"),Gv=wt(Xi+"/remove");var u1,$v=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(u1||(u1=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Ju=function(e){return function(t){setTimeout(t,e)}},Wv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ju(10);Xl();window.ftReduxStores||(window.ftReduxStores={});var _t=class e extends nt{static get(t){var r;let o=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[o];if(Rr(i))return i;if(a==null)return;let s=g1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=h1({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=$t(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[a.name]=new e(s,c,a.eventBus)}constructor(t,r,o){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Eo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,f=i[d];return f?(...h)=>{let p=f(...h.map(a));return this.reduxStore.dispatch(p),p}:h=>{this.setState({[d]:a(h)})}}}),this.eventBus=o??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()}};function ep(){var e;for(let t of Object.values((e=window.ftReduxStores)!==null&&e!==void 0?e:{}))Rr(t)&&t.clear()}var xn=class{constructor(t,r,o){this.store=t,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let t=this.store.getState(),r=this.valueSelector(t);ot(this.lastValue,r)&&(this.callback(r,t),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function v1(e,t,r){return new xn(e,t,r).watch()}var vn=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(t){var r;return(r=this.requestConsumers.get(t))!==null&&r!==void 0?r:this.requestConsumers.set(t,new Set).get(t)}registerComponent(t,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(t).size==1&&this.onNewNeededRequest(o)}unregisterComponent(t,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(t)}isRequestNeeded(t){return this.getOrCreateRequestConsumers(t).size>0}};var ts={};F(ts,{scrollHelper:()=>tp});var Ji,Sn=new Map,es=class{lock(t,r){if(r){let o=Sn.get(r);if(o==null||o===t)return Sn.set(r,t),r}}release(t,r){r&&Sn.get(r)===t&&Sn.delete(r)}findFirstScrollableParent(t){var r;let o,a;for(let i of La(t)){let s=i,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&a==null&&(a=s)}return(r=o??a)!==null&&r!==void 0?r:document.body}elementCanScroll(t){try{return["auto","scroll"].includes(getComputedStyle(t).overflowY)&&!["contents"].includes(getComputedStyle(t).display)}catch{return!1}}getAbsoluteScrollOffset(t,r){var o,a;let i=0;for(;r&&r.offsetParent!==t.offsetParent;)i+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a:0)-t.offsetTop}computeTopOffsetRatio(t,r){if(typeof t=="number")return t;switch(t){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(t,r){let o=this.findFirstScrollableParent(t);if(t&&this.lock(this,o)){let a=this.getAbsoluteScrollOffset(o,t),i=a-o.clientHeight+t.clientHeight,s=a,c=vt(0,(s-o.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,c)*(i-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",t,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(Ji=window.FluidTopicsScrollHelper)!==null&&Ji!==void 0?Ji:new es;var tp=window.FluidTopicsScrollHelper;var os={};F(os,{SearchPlaceConverter:()=>Ir,SearchPlaceQueryParams:()=>Q,isSearchPlaceQueryParams:()=>n2,serializeRequest:()=>ap});var op=C4(E1(),1);var C1;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(C1||(C1={}));var A1;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(A1||(A1={}));var O1;(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"})(O1||(O1={}));var L1;(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"})(L1||(L1={}));var R1;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(R1||(R1={}));var w1;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(w1||(w1={}));var _1;(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"})(_1||(_1={}));var N1;(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"})(N1||(N1={}));var T1;(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"})(T1||(T1={}));var M1;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(M1||(M1={}));var P1;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(P1||(P1={}));var k1;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(k1||(k1={}));var I1;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(I1||(I1={}));var z1;(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"})(z1||(z1={}));var rr;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(rr||(rr={}));var D1;(function(e){e.ASC="ASC",e.DESC="DESC"})(D1||(D1={}));var U1;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(U1||(U1={}));var An;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(An||(An={}));var j1=e=>Object.keys(An).includes(e);var B1;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(B1||(B1={}));var H1;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(H1||(H1={}));var F1;(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"})(F1||(F1={}));var kr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(kr||(kr={}));var V1=e=>Object.keys(kr).includes(e);var G1;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(G1||(G1={}));var rs;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(rs||(rs={}));var $1;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})($1||($1={}));var se;(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"})(se||(se={}));var ke;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ke||(ke={}));var W1;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(W1||(W1={}));var K1;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(K1||(K1={}));var q1;(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"})(q1||(q1={}));var Z1;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Z1||(Z1={}));var Y1;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Y1||(Y1={}));var X1;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(X1||(X1={}));var Q1;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Q1||(Q1={}));var J1;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(J1||(J1={}));var e2;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(e2||(e2={}));var rp={[se.PERSONAL_BOOK_SHARE_USER]:[se.PERSONAL_BOOK_USER],[se.HTML_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.PDF_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.KHUB_ADMIN]:[se.CONTENT_PUBLISHER],[se.ADMIN]:[se.KHUB_ADMIN,se.USERS_ADMIN,se.PORTAL_ADMIN,se.BEHAVIOR_DATA_USER],[se.GENERATIVE_AI_EXPORT_USER]:[se.GENERATIVE_AI_USER]};function t2(e,t){return e===t||(rp[e]??[]).some(r=>t2(r,t))}function r2(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(o=>t2(o,t))}function np(e){return`"${e}"`}function o2(e){return e.startsWith('"')&&e.endsWith('"')?e.replace(/(^"+)|("+$)/g,""):e}function ap(e,t){return new Ir(e).serialize(t)}var Q;(function(e){e.LOCALE="content-lang",e.QUERY="query",e.SCOPE="scope",e.FILTERS="filters",e.VIRTUAL_FIELD="virtual-field",e.PERIOD="period",e.VALUE_FILTERS="value-filters",e.DATE_FILTERS="date-filters",e.RANGE_FILTERS="range-filters",e.SORT="sort",e.PER_PAGE="per-page",e.KEYWORD_MATCH="keyword-match"})(Q||(Q={}));var ip=new Set(Object.values(Q));function n2(e){return ip.has(e)}var Ir=class{constructor(t,r=20,o=!1,a="en-US"){this.baseUrl=t,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(t,r){return this.serializeToCurrentPageIfPossible(t,r??"/search")}serializeToCurrentPageIfPossible(t,r){let o=r==null||r.trim().length===0,a=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(t),a.toString()}toURLSearchParams(t,r=!1){var o,a,i,s,c,d,f,h,p,g,x;let v=new URLSearchParams;t.contentLocale?(!r||t.contentLocale!==this.defaultContentLocale)&&v.append(Q.LOCALE,t.contentLocale):v.append(Q.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=t.query)===null||o===void 0?void 0:o.length)>0&&v.append(Q.QUERY,t.query);let A=(i=(a=t.metadataFilters)===null||a===void 0?void 0:a.filter(S=>S.valueFilter&&!S.valueFilter.negative))!==null&&i!==void 0?i:[];if(A.length>0){let S=A.map(O=>{var M,B;let j=((B=(M=O.valueFilter)===null||M===void 0?void 0:M.values)!==null&&B!==void 0?B:[]).map($=>this.escapeFilters($)).map($=>np(o2($))).join("_");return`${O.key}~${j}`}).join("*");v.append(Q.VALUE_FILTERS,S)}let L=(c=(s=t.metadataFilters)===null||s===void 0?void 0:s.filter(S=>S.dateFilter))!==null&&c!==void 0?c:[];if(L.length>0){let S=L.map(O=>{var M;return`${O.key}~${(M=O.dateFilter)===null||M===void 0?void 0:M.type.toLowerCase()}`}).join("*");v.append(Q.DATE_FILTERS,S)}let _=(f=(d=t.metadataFilters)===null||d===void 0?void 0:d.filter(S=>S.rangeFilter))!==null&&f!==void 0?f:[];if(_.length>0){let S=_.map(O=>{var M,B;return`${O.key}~${(M=O.rangeFilter)===null||M===void 0?void 0:M.from}_${(B=O.rangeFilter)===null||B===void 0?void 0:B.to}`}).join("*");v.append(Q.RANGE_FILTERS,S)}t.virtualField&&t.virtualField!=="EVERYWHERE"&&v.append(Q.VIRTUAL_FIELD,t.virtualField.toLowerCase()),t.scope&&t.scope!=="DEFAULT"&&v.append(Q.SCOPE,t.scope.toLowerCase()),t.sortId!=null&&v.append(Q.SORT,t.sortId),!((h=t.paging)===null||h===void 0)&&h.perPage&&((g=(p=t.paging)===null||p===void 0?void 0:p.perPage)!==null&&g!==void 0?g:this.defaultPerPage)!=this.defaultPerPage&&v.append(Q.PER_PAGE,String(t.paging.perPage)),t.keywordMatch!=null&&v.append(Q.KEYWORD_MATCH,t.keywordMatch.toLowerCase());let N=(x=t.otherQueryParams)!==null&&x!==void 0?x:{};for(let S in N)v.append(S,N[S]);let E=new Array;return v.forEach((S,O)=>{E.push(this.encodeQueryString(O)+"="+this.encodeQueryString(S))}),encodeURI(E.join("&")).replace(/#/g,"%23")}encodeQueryString(t){return encodeURIComponent(t).replace(/%20/g,"+")}parse(t){var r;let o=t.split("?"),a=this.fromURLSearchParams(o.slice(1).join("?")),i=o[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(t){var r,o,a,i,s,c;try{t=decodeURI(t).replace(/%23/g,"#")}catch(_){console.warn("Could not decode search request query params, fallback on raw value",_)}let d=new URLSearchParams(t),f=d.get(Q.LOCALE)==="all"?void 0:d.get(Q.LOCALE),h=((r=d.get(Q.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),p=(o=d.get(Q.SORT))===null||o===void 0?void 0:o.toLowerCase(),g=(a=d.get(Q.SCOPE))!==null&&a!==void 0?a:"default",x=+((i=d.get(Q.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),v=d.get(Q.KEYWORD_MATCH),A=v?v.toUpperCase()===rr.MANDATORY?rr.MANDATORY:rr.OPTIONAL:void 0,L={};for(let _ of d.keys())n2(_)||(L[_]=d.get(_));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(Q.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[g])!==null&&c!==void 0?c:"DEFAULT",virtualField:j1(h)?h:"EVERYWHERE",sortId:p,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:vt(1,isNaN(x)?this.defaultPerPage:x,1e3)},keywordMatch:A,otherQueryParams:L}}parseCompatFilters(t){var r,o,a,i,s,c;let d=[];return t.has(Q.FILTERS)&&(d=this.parseValueFilters((r=t.get(Q.FILTERS))!==null&&r!==void 0?r:"")),(o=t.has(Q.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=t.get(Q.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=t.get(Q.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=t.get(Q.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=t.get(Q.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}splitUnknownFilter(t){return this.superEscapeFilters(t).split("*").map(r=>r.split("~"))}parseValueFilters(t){return t.length===0?[]:this.splitUnknownFilter(t).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(o2).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(t){return t.length===0?[]:this.splitUnknownFilter(t).map(r=>({key:r[0],dateFilter:{type:kr[r[1].toUpperCase()]}}))}parseRangeFilters(t){return t.length===0?[]:this.splitUnknownFilter(t).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(t){for(let[r,o,a]of this.filtersEscapeMapping)t=t.replaceAll(r,o);return t}superEscapeFilters(t){for(let[r,o,a]of this.filtersEscapeMapping)t=t.replaceAll(o,a);return t}unescapeFilterValue(t){for(let[r,o,a]of this.filtersEscapeMapping)t=t.replace(a,r);return t}parseLegacyPeriodFilter(t){if(V1(t))return[{key:"ft:lastEdition",dateFilter:{type:kr[t]}}];if(t.startsWith("CUSTOM_")){let[r,o,a]=t.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}};var as={};F(as,{toFtFormComponent:()=>sp});var ns=Symbol("elementInternals"),sp=ce(Symbol("toFtFormComponent"),function(e){class t extends e{static get formAssociated(){return!0}get form(){return this[ns].form}constructor(...o){super(o),this[ns]=this.attachInternals()}setFormValue(o){this[ns].setFormValue(o)}}return t});var is={};F(is,{DateFormatter:()=>or});var or=class{static format(t,r,o,a){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(o,a)):this.getIntlDateTime(t,r,o,a)}static getMomentDateFormat(t,r){return t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,o,a){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(r,{dateStyle:o?"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=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var cs={};F(cs,{ALL_KEYS_VALUE:()=>ss,SameWindowStorageEvent:()=>zr});var ss="__all__",zr=class extends CustomEvent{constructor(t,r,o){super("same-window-storage",{detail:{key:t,oldValue:r,newValue:o}})}keyMatch(t){return this.detail.key.includes(t)||this.detail.key==ss}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(e,t,r){let o=t.getItem(r[0]);Reflect.apply(e,t,r),window.dispatchEvent(new zr(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(e,t,r){let o=t.getItem(r[0]);Reflect.apply(e,t,r),window.dispatchEvent(new zr(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(e,t,r){Reflect.apply(e,t,r),window.dispatchEvent(new zr(ss))}});var ds={};F(ds,{FocusMainContentEvent:()=>ls});var ls=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var a2={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function cp(e){(e.key==="Enter"||e.key===" "||e.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=e.key}function lp(e){window.FluidTopicsA11yHints.isKeyboardNavigation=e.detail==0}document.addEventListener("keydown",cp);document.addEventListener("click",lp);var i2=D`
48
+ `;var Hl={};var wi={};F(wi,{ParametrizedLabelResolver:()=>So});var So=class e{constructor(t,r){this.defaultLabels=t,this.labels=r}resolve(t,...r){var o,a;t=this.resolvePluralKey(t,r);let i=(a=(o=this.labels[t])!==null&&o!==void 0?o:this.defaultLabels[t])!==null&&a!==void 0?a:"";return e.replaceParameters(i,...r)}static replaceParameters(t,...r){return r.forEach((o,a)=>t=t.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>e.formatValue(o,s))),t}resolvePluralKey(t,r){for(let o of r)if(typeof o=="number"){let a=`${String(t)}[\\=${o}]`;if(a in this.labels||a in this.defaultLabels)return a}return t}static formatValue(t,r){return t instanceof Date?e.formatDate(t,r):t??""}static formatDate(t,r){let o=a=>r?.includes("date")?t.toLocaleDateString(a):r?.includes("time")?t.toLocaleTimeString(a):t.toLocaleString(a);try{return o(document.documentElement.lang)}catch{return o()}}};var Qi={};F(Qi,{FtCommandQueue:()=>Eo,FtLitElementRedux:()=>Jt,FtReduxStore:()=>_t,FtStateManager:()=>vn,ReduxWatcher:()=>xn,clearAllStores:()=>ep,isFtReduxStore:()=>Rr,redux:()=>it,reduxEventListener:()=>yu,reduxReactive:()=>gu,watch:()=>v1,withRedux:()=>Fl});var gu=()=>(e,t)=>{var r;let o=e.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(t)},it=e=>{let t=e??{};return(r,o)=>{var a;let i={hasChanged:ot,attribute:!1,...t};R(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=t.selector)!==null&&a!==void 0?a:c=>c[o],store:t.store})}},yu=e=>(t,r)=>{let o=t.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,e)};var Eo=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(o=>o.type===t);return r&&(this.queue=this.queue.filter(o=>o!==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))}};function Rr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Co=Symbol("internalReduxEventsUnsubscribers"),At=Symbol("internalStoresUnsubscribers"),Qt=Symbol("internalStores"),Fl=ce(Symbol("withRedux"),function(e){var t,r,o;class a extends e{constructor(){super(...arguments),this[t]=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[Qt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Qt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Qt].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Qt].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Qt].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Qt].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[At].has(s.store):this[At].size>0)&&(this[c]=s.selector(f.getState(),this))}})}subscribeToStore(s,c){var d;this[At].set(s,c.subscribe(()=>this.updateFromStores())),this[Co].set(s,[]),Rr(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[Co].get(s).push(()=>c.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[At].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[At].has(s)&&this[At].get(s)(),this[At].delete(s),(c=this[Co].get(s))===null||c===void 0||c.forEach(d=>d()),this[Co].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=At,r=Qt,o=Co,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Jt=class extends Fl(Z){};function Pe(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];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 st(e){return!!e&&!!e[ne]}function Fe(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Ou}(e)||Array.isArray(e)||!!e[ql]||!!(!((t=e.constructor)===null||t===void 0)&&t[ql])||Di(e)||Ui(e))}function er(e,t,r){r===void 0&&(r=!1),Nr(e)===0?(r?Object.keys:_r)(e).forEach(function(o){r&&typeof o=="symbol"||t(o,e[o],e)}):e.forEach(function(o,a){return t(a,o,e)})}function Nr(e){var t=e[ne];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Di(e)?2:Ui(e)?3:0}function wr(e,t){return Nr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function bu(e,t){return Nr(e)===2?e.get(t):e[t]}function Zl(e,t,r){var o=Nr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function Yl(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Di(e){return Cu&&e instanceof Map}function Ui(e){return Au&&e instanceof Set}function Ot(e){return e.o||e.t}function Bi(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Jl(e);delete t[ne];for(var r=_r(t),o=0;o<r.length;o++){var a=r[o],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 Hi(e,t){return t===void 0&&(t=!1),Fi(e)||st(e)||!Fe(e)||(Nr(e)>1&&(e.set=e.add=e.clear=e.delete=xu),Object.freeze(e),t&&er(e,function(r,o){return Hi(o,!0)},!0)),e}function xu(){Pe(2)}function Fi(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Qe(e){var t=zi[e];return t||Pe(18,e),t}function vu(e,t){zi[e]||(zi[e]=t)}function Pi(){return Oo}function _i(e,t){t&&(Qe("Patches"),e.u=[],e.s=[],e.v=t)}function hn(e){ki(e),e.p.forEach(Su),e.p=null}function ki(e){e===Oo&&(Oo=e.l)}function Gl(e){return Oo={p:[],l:Oo,h:e,m:!0,_:0}}function Su(e){var t=e[ne];t.i===0||t.i===1?t.j():t.g=!0}function Ni(e,t){t._=t.p.length;var r=t.p[0],o=e!==void 0&&e!==r;return t.h.O||Qe("ES5").S(t,e,o),o?(r[ne].P&&(hn(t),Pe(4)),Fe(e)&&(e=mn(t,e),t.l||gn(t,e)),t.u&&Qe("Patches").M(r[ne].t,e,t.u,t.s)):e=mn(t,r,[]),hn(t),t.u&&t.v(t.u,t.s),e!==Ql?e:void 0}function mn(e,t,r){if(Fi(t))return t;var o=t[ne];if(!o)return er(t,function(c,d){return $l(e,o,t,c,d,r)},!0),t;if(o.A!==e)return t;if(!o.P)return gn(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Bi(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),er(i,function(c,d){return $l(e,o,a,c,d,r,s)}),gn(e,a,!1),r&&e.u&&Qe("Patches").N(o,r,e.u,e.s)}return o.o}function $l(e,t,r,o,a,i,s){if(st(a)){var c=mn(e,a,i&&t&&t.i!==3&&!wr(t.R,o)?i.concat(o):void 0);if(Zl(r,o,c),!st(c))return;e.m=!1}else s&&r.add(a);if(Fe(a)&&!Fi(a)){if(!e.h.D&&e._<1)return;mn(e,a),t&&t.A.l||gn(e,a)}}function gn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Hi(t,r)}function Ti(e,t){var r=e[ne];return(r?Ot(r):e)[t]}function Wl(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Object.getPrototypeOf(r)}}function Lt(e){e.P||(e.P=!0,e.l&&Lt(e.l))}function Mi(e){e.o||(e.o=Bi(e.t))}function Ii(e,t,r){var o=Di(t)?Qe("MapSet").F(t,r):Ui(t)?Qe("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Pi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,f=Lo;s&&(d=[c],f=Ao);var h=Proxy.revocable(d,f),p=h.revoke,g=h.proxy;return c.k=g,c.j=p,g}(t,r):Qe("ES5").J(t,r);return(r?r.A:Pi()).p.push(o),o}function Eu(e){return st(e)||Pe(22,e),function t(r){if(!Fe(r))return r;var o,a=r[ne],i=Nr(r);if(a){if(!a.P&&(a.i<4||!Qe("ES5").K(a)))return a.t;a.I=!0,o=jl(r,i),a.I=!1}else o=jl(r,i);return er(o,function(s,c){a&&bu(a.t,s)===c||Zl(o,s,t(c))}),i===3?new Set(o):o}(e)}function jl(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Bi(e)}function Xl(){function e(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var f=this[ne];return Lo.get(f,s)},set:function(f){var h=this[ne];Lo.set(h,s,f)}},d}function t(s){for(var c=s.length-1;c>=0;c--){var d=s[c][ne];if(!d.P)switch(d.i){case 5:o(d)&&Lt(d);break;case 4:r(d)&&Lt(d)}}}function r(s){for(var c=s.t,d=s.k,f=_r(d),h=f.length-1;h>=0;h--){var p=f[h];if(p!==ne){var g=c[p];if(g===void 0&&!wr(c,p))return!0;var x=d[p],v=x&&x[ne];if(v?v.t!==g:!Yl(x,g))return!0}}var A=!!c[ne];return f.length!==_r(c).length+(A?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 a(s){s.g&&Pe(3,JSON.stringify(Ot(s)))}var i={};vu("ES5",{J:function(s,c){var d=Array.isArray(s),f=function(p,g){if(p){for(var x=Array(g.length),v=0;v<g.length;v++)Object.defineProperty(x,""+v,e(v,!0));return x}var A=Jl(g);delete A[ne];for(var L=_r(A),_=0;_<L.length;_++){var N=L[_];A[N]=e(N,p||!!A[N].enumerable)}return Object.create(Object.getPrototypeOf(g),A)}(d,s),h={i:d?5:4,A:c?c.A:Pi(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,ne,{value:h,writable:!0}),f},S:function(s,c,d){d?st(c)&&c[ne].A===s&&t(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var p=h[ne];if(p){var g=p.t,x=p.k,v=p.R,A=p.i;if(A===4)er(x,function(S){S!==ne&&(g[S]!==void 0||wr(g,S)?v[S]||f(x[S]):(v[S]=!0,Lt(p)))}),er(g,function(S){x[S]!==void 0||wr(x,S)||(v[S]=!1,Lt(p))});else if(A===5){if(o(p)&&(Lt(p),v.length=!0),x.length<g.length)for(var L=x.length;L<g.length;L++)v[L]=!1;else for(var _=g.length;_<x.length;_++)v[_]=!0;for(var N=Math.min(x.length,g.length),E=0;E<N;E++)x.hasOwnProperty(E)||(v[E]=!0),v[E]===void 0&&f(x[E])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Vl,Oo,Gi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Cu=typeof Map<"u",Au=typeof Set<"u",Kl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ql=Gi?Symbol.for("immer-nothing"):((Vl={})["immer-nothing"]=!0,Vl),ql=Gi?Symbol.for("immer-draftable"):"__$immer_draftable",ne=Gi?Symbol.for("immer-state"):"__$immer_state";var Ou=""+Object.prototype.constructor,_r=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Jl=Object.getOwnPropertyDescriptors||function(e){var t={};return _r(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},zi={},Lo={get:function(e,t){if(t===ne)return e;var r=Ot(e);if(!wr(r,t))return function(a,i,s){var c,d=Wl(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0}(e,r,t);var o=r[t];return e.I||!Fe(o)?o:o===Ti(e.t,t)?(Mi(e),e.o[t]=Ii(e.A.h,o,e)):o},has:function(e,t){return t in Ot(e)},ownKeys:function(e){return Reflect.ownKeys(Ot(e))},set:function(e,t,r){var o=Wl(Ot(e),t);if(o?.set)return o.set.call(e.k,r),!0;if(!e.P){var a=Ti(Ot(e),t),i=a?.[ne];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Yl(r,a)&&(r!==void 0||wr(e.t,t)))return!0;Mi(e),Lt(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 Ti(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Mi(e),Lt(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Ot(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty:function(){Pe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Pe(12)}},Ao={};er(Lo,function(e,t){Ao[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ao.deleteProperty=function(e,t){return Ao.set.call(this,e,t,void 0)},Ao.set=function(e,t,r){return Lo.set.call(this,e[0],t,r,e[0])};var Lu=function(){function e(r){var o=this;this.O=Kl,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(A){var L=this;A===void 0&&(A=c);for(var _=arguments.length,N=Array(_>1?_-1:0),E=1;E<_;E++)N[E-1]=arguments[E];return d.produce(A,function(S){var O;return(O=i).call.apply(O,[L,S].concat(N))})}}var f;if(typeof i!="function"&&Pe(6),s!==void 0&&typeof s!="function"&&Pe(7),Fe(a)){var h=Gl(o),p=Ii(o,a,void 0),g=!0;try{f=i(p),g=!1}finally{g?hn(h):ki(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(A){return _i(h,s),Ni(A,h)},function(A){throw hn(h),A}):(_i(h,s),Ni(f,h))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===Ql&&(f=void 0),o.D&&Hi(f,!0),s){var x=[],v=[];Qe("Patches").M(a,f,x,v),s(x,v)}return f}Pe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="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(x){return a.apply(void 0,[x].concat(p))})};var s,c,d=o.produce(a,i,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 t=e.prototype;return t.createDraft=function(r){Fe(r)||Pe(8),st(r)&&(r=Eu(r));var o=Gl(this),a=Ii(this,r,void 0);return a[ne].C=!0,ki(o),a},t.finishDraft=function(r,o){var a=r&&r[ne],i=a.A;return _i(i,o),Ni(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Kl&&Pe(20),this.O=r},t.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=Qe("Patches").$;return st(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},e}(),Le=new Lu,Ru=Le.produce,cv=Le.produceWithPatches.bind(Le),lv=Le.setAutoFreeze.bind(Le),dv=Le.setUseProxies.bind(Le),fv=Le.applyPatches.bind(Le),uv=Le.createDraft.bind(Le),pv=Le.finishDraft.bind(Le),yn=Ru;function tr(e){"@babel/helpers - typeof";return tr=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},tr(e)}function e1(e,t){if(tr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(tr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function t1(e){var t=e1(e,"string");return tr(t)=="symbol"?t:t+""}function r1(e,t,r){return(t=t1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,o)}return r}function $i(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?o1(Object(r),!0).forEach(function(o){r1(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o1(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function ge(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"}(),Wi=function(){return Math.random().toString(36).substring(7).split("").join(".")},bn={INIT:"@@redux/INIT"+Wi(),REPLACE:"@@redux/REPLACE"+Wi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Wi()}};function wu(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 ji(e,t,r){var o;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ge(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ge(1));return r(ji)(e,t)}if(typeof e!="function")throw new Error(ge(2));var a=e,i=t,s=[],c=s,d=!1;function f(){c===s&&(c=s.slice())}function h(){if(d)throw new Error(ge(3));return i}function p(A){if(typeof A!="function")throw new Error(ge(4));if(d)throw new Error(ge(5));var L=!0;return f(),c.push(A),function(){if(L){if(d)throw new Error(ge(6));L=!1,f();var N=c.indexOf(A);c.splice(N,1),s=null}}}function g(A){if(!wu(A))throw new Error(ge(7));if(typeof A.type>"u")throw new Error(ge(8));if(d)throw new Error(ge(9));try{d=!0,i=a(i,A)}finally{d=!1}for(var L=s=c,_=0;_<L.length;_++){var N=L[_];N()}return A}function x(A){if(typeof A!="function")throw new Error(ge(10));a=A,g({type:bn.REPLACE})}function v(){var A,L=p;return A={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ge(11));function E(){N.next&&N.next(h())}E();var S=L(E);return{unsubscribe:S}}},A[n1]=function(){return this},A}return g({type:bn.INIT}),o={dispatch:g,subscribe:p,getState:h,replaceReducer:x},o[n1]=v,o}function _u(e){Object.keys(e).forEach(function(t){var r=e[t],o=r(void 0,{type:bn.INIT});if(typeof o>"u")throw new Error(ge(12));if(typeof r(void 0,{type:bn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ge(13))})}function a1(e){for(var t=Object.keys(e),r={},o=0;o<t.length;o++){var a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),s,c;try{_u(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,x={},v=0;v<i.length;v++){var A=i[v],L=r[A],_=f[A],N=L(_,h);if(typeof N>"u"){var E=h&&h.type;throw new Error(ge(14))}x[A]=N,g=g||N!==_}return g=g||i.length!==Object.keys(f).length,g?x:f}}function Tr(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(o){return o}:t.length===1?t[0]:t.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function i1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(ge(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=t.map(function(d){return d(s)});return i=Tr.apply(void 0,c)(a.dispatch),$i($i({},a),{},{dispatch:i})}}}function s1(e){var t=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,e):s(c)}}};return t}var c1=s1();c1.withExtraArgument=s1;var Vi=c1;var p1=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[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 o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),Nu=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,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(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,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,a=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){r.label=f[1];break}if(f[0]===6&&r.label<i[1]){r.label=i[1],i=f;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(f);break}i[2]&&r.ops.pop(),r.trys.pop();continue}f=t.call(e,r)}catch(h){f=[6,h],a=0}finally{o=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Mr=function(e,t){for(var r=0,o=t.length,a=e.length;r<o;r++,a++)e[a]=t[r];return e},Tu=Object.defineProperty,Mu=Object.defineProperties,Pu=Object.getOwnPropertyDescriptors,l1=Object.getOwnPropertySymbols,ku=Object.prototype.hasOwnProperty,Iu=Object.prototype.propertyIsEnumerable,d1=function(e,t,r){return t in e?Tu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Rt=function(e,t){for(var r in t||(t={}))ku.call(t,r)&&d1(e,r,t[r]);if(l1)for(var o=0,a=l1(t);o<a.length;o++){var r=a[o];Iu.call(t,r)&&d1(e,r,t[r])}return e},Ki=function(e,t){return Mu(e,Pu(t))},zu=function(e,t,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(f){a(f)}},s=function(d){try{c(r.throw(d))}catch(f){a(f)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(e,t)).next())})};var Du=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tr:Tr.apply(null,arguments)},Tv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Uu(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 Bu=function(e){p1(t,e);function t(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];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=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return e.prototype.concat.apply(this,r)},t.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(t.bind.apply(t,Mr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Mr([void 0],r.concat(this))))},t}(Array),Hu=function(e){p1(t,e);function t(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];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=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return e.prototype.concat.apply(this,r)},t.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(t.bind.apply(t,Mr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Mr([void 0],r.concat(this))))},t}(Array);function Yi(e){return Fe(e)?yn(e,function(){}):e}function Fu(e){return typeof e=="boolean"}function Gu(){return function(t){return $u(t)}}function $u(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,o=e.immutableCheck,a=o===void 0?!0:o,i=e.serializableCheck,s=i===void 0?!0:i,c=new Bu;if(r&&(Fu(r)?c.push(Vi):c.push(Vi.withExtraArgument(r.extraArgument))),0){if(a)var d;if(s)var f}return c}var qi=!0;function h1(e){var t=Gu(),r=e||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?t():i,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,x;if(typeof a=="function")x=a;else if(Uu(a))x=a1(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 v=s;if(typeof v=="function"&&(v=v(t),!qi&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!qi&&v.some(function(S){return typeof S!="function"}))throw new Error("each middleware provided to configureStore must be a function");var A=i1.apply(void 0,v),L=Tr;d&&(L=Du(Rt({trace:!qi},typeof d=="object"&&d)));var _=new Hu(A),N=_;Array.isArray(g)?N=Mr([A],g):typeof g=="function"&&(N=g(_));var E=L.apply(void 0,N);return ji(x,h,E)}function wt(e,t){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(t){var i=t.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return Rt(Rt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:o[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(o){return o.type===e},r}function m1(e){var t={},r=[],o,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 o=i,a}};return e(a),[t,r,o]}function Wu(e){return typeof e=="function"}function ju(e,t,r,o){r===void 0&&(r=[]);var a=typeof t=="function"?m1(t):[t,r,o],i=a[0],s=a[1],c=a[2],d;if(Wu(e))d=function(){return Yi(e())};else{var f=Yi(e);d=function(){return f}}function h(p,g){p===void 0&&(p=d());var x=Mr([i[g.type]],s.filter(function(v){var A=v.matcher;return A(g)}).map(function(v){var A=v.reducer;return A}));return x.filter(function(v){return!!v}).length===0&&(x=[c]),x.reduce(function(v,A){if(A)if(st(v)){var L=v,_=A(L,g);return _===void 0?v:_}else{if(Fe(v))return yn(v,function(N){return A(N,g)});var _=A(v,g);if(_===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return _}return v},p)}return h.getInitialState=d,h}function Vu(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:Yi(e.initialState),o=e.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(h){var p=o[h],g=Vu(t,h),x,v;"reducer"in p?(x=p.reducer,v=p.prepare):x=p,i[h]=x,s[g]=x,c[h]=v?wt(g,v):wt(g)});function d(){var h=typeof e.extraReducers=="function"?m1(e.extraReducers):[e.extraReducers],p=h[0],g=p===void 0?{}:p,x=h[1],v=x===void 0?[]:x,A=h[2],L=A===void 0?void 0:A,_=Rt(Rt({},g),s);return ju(r,function(N){for(var E in _)N.addCase(E,_[E]);for(var S=0,O=v;S<O.length;S++){var M=O[S];N.addMatcher(M.matcher,M.reducer)}L&&N.addDefaultCase(L)})}var f;return{name:t,reducer:function(h,p){return f||(f=d()),f(h,p)},actions:c,caseReducers:i,getInitialState:function(){return f||(f=d()),f.getInitialState()}}}var Ku="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qu=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Ku[Math.random()*64|0];return t},Zu=["name","message","stack","code"],Zi=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),f1=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Yu=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,o=Zu;r<o.length;r++){var a=o[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},Iv=function(){function e(t,r,o){var a=wt(t+"/fulfilled",function(h,p,g,x){return{payload:h,meta:Ki(Rt({},x||{}),{arg:g,requestId:p,requestStatus:"fulfilled"})}}),i=wt(t+"/pending",function(h,p,g){return{payload:void 0,meta:Ki(Rt({},g||{}),{arg:p,requestId:h,requestStatus:"pending"})}}),s=wt(t+"/rejected",function(h,p,g,x,v){return{payload:x,error:(o&&o.serializeError||Yu)(h||"Rejected"),meta:Ki(Rt({},v||{}),{arg:g,requestId:p,rejectedWithValue:!!x,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,x){var v=o?.idGenerator?o.idGenerator(h):qu(),A=new d,L,_=!1;function N(S){L=S,A.abort()}var E=function(){return zu(this,null,function(){var S,O,M,B,j,$,z;return Nu(this,function(b){switch(b.label){case 0:return b.trys.push([0,4,,5]),B=(S=o?.condition)==null?void 0:S.call(o,h,{getState:g,extra:x}),Qu(B)?[4,B]:[3,2];case 1:B=b.sent(),b.label=2;case 2:if(B===!1||A.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return _=!0,j=new Promise(function(C,P){return A.signal.addEventListener("abort",function(){return P({name:"AbortError",message:L||"Aborted"})})}),p(i(v,h,(O=o?.getPendingMeta)==null?void 0:O.call(o,{requestId:v,arg:h},{getState:g,extra:x}))),[4,Promise.race([j,Promise.resolve(r(h,{dispatch:p,getState:g,extra:x,requestId:v,signal:A.signal,abort:N,rejectWithValue:function(C,P){return new Zi(C,P)},fulfillWithValue:function(C,P){return new f1(C,P)}})).then(function(C){if(C instanceof Zi)throw C;return C instanceof f1?a(C.payload,v,h,C.meta):a(C,v,h)})])];case 3:return M=b.sent(),[3,5];case 4:return $=b.sent(),M=$ instanceof Zi?s(null,v,h,$.payload,$.meta):s($,v,h),[3,5];case 5:return z=o&&!o.dispatchConditionRejection&&s.match(M)&&M.meta.condition,z||p(M),[2,M]}})})}();return Object.assign(E,{abort:N,requestId:v,arg:h,unwrap:function(){return E.then(Xu)}})}}return Object.assign(f,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Xu(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Qu(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var y1="listener",b1="completed",x1="cancelled",zv="task-"+x1,Dv="task-"+b1,Uv=y1+"-"+x1,Bv=y1+"-"+b1;var Xi="listenerMiddleware";var Hv=wt(Xi+"/add"),Fv=wt(Xi+"/removeAll"),Gv=wt(Xi+"/remove");var u1,$v=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(u1||(u1=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Ju=function(e){return function(t){setTimeout(t,e)}},Wv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ju(10);Xl();window.ftReduxStores||(window.ftReduxStores={});var _t=class e extends nt{static get(t){var r;let o=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[o];if(Rr(i))return i;if(a==null)return;let s=g1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=h1({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=$t(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[a.name]=new e(s,c,a.eventBus)}constructor(t,r,o){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Eo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,f=i[d];return f?(...h)=>{let p=f(...h.map(a));return this.reduxStore.dispatch(p),p}:h=>{this.setState({[d]:a(h)})}}}),this.eventBus=o??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()}};function ep(){var e;for(let t of Object.values((e=window.ftReduxStores)!==null&&e!==void 0?e:{}))Rr(t)&&t.clear()}var xn=class{constructor(t,r,o){this.store=t,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let t=this.store.getState(),r=this.valueSelector(t);ot(this.lastValue,r)&&(this.callback(r,t),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function v1(e,t,r){return new xn(e,t,r).watch()}var vn=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(t){var r;return(r=this.requestConsumers.get(t))!==null&&r!==void 0?r:this.requestConsumers.set(t,new Set).get(t)}registerComponent(t,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(t).size==1&&this.onNewNeededRequest(o)}unregisterComponent(t,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(t)}isRequestNeeded(t){return this.getOrCreateRequestConsumers(t).size>0}};var ts={};F(ts,{scrollHelper:()=>tp});var Ji,Sn=new Map,es=class{lock(t,r){if(r){let o=Sn.get(r);if(o==null||o===t)return Sn.set(r,t),r}}release(t,r){r&&Sn.get(r)===t&&Sn.delete(r)}findFirstScrollableParent(t){var r;let o,a;for(let i of La(t)){let s=i,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&a==null&&(a=s)}return(r=o??a)!==null&&r!==void 0?r:document.body}elementCanScroll(t){try{return["auto","scroll"].includes(getComputedStyle(t).overflowY)&&!["contents"].includes(getComputedStyle(t).display)}catch{return!1}}getAbsoluteScrollOffset(t,r){var o,a;let i=0;for(;r&&r.offsetParent!==t.offsetParent;)i+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a:0)-t.offsetTop}computeTopOffsetRatio(t,r){if(typeof t=="number")return t;switch(t){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(t,r){let o=this.findFirstScrollableParent(t);if(t&&this.lock(this,o)){let a=this.getAbsoluteScrollOffset(o,t),i=a-o.clientHeight+t.clientHeight,s=a,c=vt(0,(s-o.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,c)*(i-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",t,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(Ji=window.FluidTopicsScrollHelper)!==null&&Ji!==void 0?Ji:new es;var tp=window.FluidTopicsScrollHelper;var os={};F(os,{SearchPlaceConverter:()=>Ir,SearchPlaceQueryParams:()=>Q,isSearchPlaceQueryParams:()=>n2,serializeRequest:()=>ap});var op=C4(E1(),1);var C1;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(C1||(C1={}));var A1;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(A1||(A1={}));var O1;(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"})(O1||(O1={}));var L1;(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"})(L1||(L1={}));var R1;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(R1||(R1={}));var w1;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(w1||(w1={}));var _1;(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"})(_1||(_1={}));var N1;(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"})(N1||(N1={}));var T1;(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"})(T1||(T1={}));var M1;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(M1||(M1={}));var P1;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(P1||(P1={}));var k1;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(k1||(k1={}));var I1;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(I1||(I1={}));var z1;(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"})(z1||(z1={}));var rr;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(rr||(rr={}));var D1;(function(e){e.ASC="ASC",e.DESC="DESC"})(D1||(D1={}));var U1;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(U1||(U1={}));var An;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(An||(An={}));var j1=e=>Object.keys(An).includes(e);var B1;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(B1||(B1={}));var H1;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(H1||(H1={}));var F1;(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"})(F1||(F1={}));var kr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(kr||(kr={}));var V1=e=>Object.keys(kr).includes(e);var G1;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(G1||(G1={}));var rs;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(rs||(rs={}));var $1;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})($1||($1={}));var se;(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"})(se||(se={}));var ke;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ke||(ke={}));var W1;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(W1||(W1={}));var K1;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(K1||(K1={}));var q1;(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"})(q1||(q1={}));var Z1;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Z1||(Z1={}));var Y1;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Y1||(Y1={}));var X1;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(X1||(X1={}));var Q1;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Q1||(Q1={}));var J1;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(J1||(J1={}));var e2;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(e2||(e2={}));var rp={[se.PERSONAL_BOOK_SHARE_USER]:[se.PERSONAL_BOOK_USER],[se.HTML_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.PDF_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.KHUB_ADMIN]:[se.CONTENT_PUBLISHER],[se.ADMIN]:[se.KHUB_ADMIN,se.USERS_ADMIN,se.PORTAL_ADMIN,se.BEHAVIOR_DATA_USER],[se.GENERATIVE_AI_EXPORT_USER]:[se.GENERATIVE_AI_USER]};function t2(e,t){return e===t||(rp[e]??[]).some(r=>t2(r,t))}function r2(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(o=>t2(o,t))}function np(e){return`"${e}"`}function o2(e){return e.startsWith('"')&&e.endsWith('"')?e.replace(/(^"+)|("+$)/g,""):e}function ap(e,t){return new Ir(e).serialize(t)}var Q;(function(e){e.LOCALE="content-lang",e.QUERY="query",e.SCOPE="scope",e.FILTERS="filters",e.VIRTUAL_FIELD="virtual-field",e.PERIOD="period",e.VALUE_FILTERS="value-filters",e.DATE_FILTERS="date-filters",e.RANGE_FILTERS="range-filters",e.SORT="sort",e.PER_PAGE="per-page",e.KEYWORD_MATCH="keyword-match"})(Q||(Q={}));var ip=new Set(Object.values(Q));function n2(e){return ip.has(e)}var Ir=class{constructor(t,r=20,o=!1,a="en-US"){this.baseUrl=t,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(t,r){return this.serializeToCurrentPageIfPossible(t,r??"/search")}serializeToCurrentPageIfPossible(t,r){let o=r==null||r.trim().length===0,a=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(t),a.toString()}toURLSearchParams(t,r=!1){var o,a,i,s,c,d,f,h,p,g,x;let v=new URLSearchParams;t.contentLocale?(!r||t.contentLocale!==this.defaultContentLocale)&&v.append(Q.LOCALE,t.contentLocale):v.append(Q.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=t.query)===null||o===void 0?void 0:o.length)>0&&v.append(Q.QUERY,t.query);let A=(i=(a=t.metadataFilters)===null||a===void 0?void 0:a.filter(S=>S.valueFilter&&!S.valueFilter.negative))!==null&&i!==void 0?i:[];if(A.length>0){let S=A.map(O=>{var M,B;let j=((B=(M=O.valueFilter)===null||M===void 0?void 0:M.values)!==null&&B!==void 0?B:[]).map($=>this.escapeFilters($)).map($=>np(o2($))).join("_");return`${O.key}~${j}`}).join("*");v.append(Q.VALUE_FILTERS,S)}let L=(c=(s=t.metadataFilters)===null||s===void 0?void 0:s.filter(S=>S.dateFilter))!==null&&c!==void 0?c:[];if(L.length>0){let S=L.map(O=>{var M;return`${O.key}~${(M=O.dateFilter)===null||M===void 0?void 0:M.type.toLowerCase()}`}).join("*");v.append(Q.DATE_FILTERS,S)}let _=(f=(d=t.metadataFilters)===null||d===void 0?void 0:d.filter(S=>S.rangeFilter))!==null&&f!==void 0?f:[];if(_.length>0){let S=_.map(O=>{var M,B;return`${O.key}~${(M=O.rangeFilter)===null||M===void 0?void 0:M.from}_${(B=O.rangeFilter)===null||B===void 0?void 0:B.to}`}).join("*");v.append(Q.RANGE_FILTERS,S)}t.virtualField&&t.virtualField!=="EVERYWHERE"&&v.append(Q.VIRTUAL_FIELD,t.virtualField.toLowerCase()),t.scope&&t.scope!=="DEFAULT"&&v.append(Q.SCOPE,t.scope.toLowerCase()),t.sortId!=null&&v.append(Q.SORT,t.sortId),!((h=t.paging)===null||h===void 0)&&h.perPage&&((g=(p=t.paging)===null||p===void 0?void 0:p.perPage)!==null&&g!==void 0?g:this.defaultPerPage)!=this.defaultPerPage&&v.append(Q.PER_PAGE,String(t.paging.perPage)),t.keywordMatch!=null&&v.append(Q.KEYWORD_MATCH,t.keywordMatch.toLowerCase());let N=(x=t.otherQueryParams)!==null&&x!==void 0?x:{};for(let S in N)v.append(S,N[S]);let E=new Array;return v.forEach((S,O)=>{E.push(this.encodeQueryString(O)+"="+this.encodeQueryString(S))}),encodeURI(E.join("&")).replace(/#/g,"%23")}encodeQueryString(t){return encodeURIComponent(t).replace(/%20/g,"+")}parse(t){var r;let o=t.split("?"),a=this.fromURLSearchParams(o.slice(1).join("?")),i=o[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(t){var r,o,a,i,s,c;try{t=decodeURI(t).replace(/%23/g,"#")}catch(_){console.warn("Could not decode search request query params, fallback on raw value",_)}let d=new URLSearchParams(t),f=d.get(Q.LOCALE)==="all"?void 0:d.get(Q.LOCALE),h=((r=d.get(Q.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),p=(o=d.get(Q.SORT))===null||o===void 0?void 0:o.toLowerCase(),g=(a=d.get(Q.SCOPE))!==null&&a!==void 0?a:"default",x=+((i=d.get(Q.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),v=d.get(Q.KEYWORD_MATCH),A=v?v.toUpperCase()===rr.MANDATORY?rr.MANDATORY:rr.OPTIONAL:void 0,L={};for(let _ of d.keys())n2(_)||(L[_]=d.get(_));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(Q.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[g])!==null&&c!==void 0?c:"DEFAULT",virtualField:j1(h)?h:"EVERYWHERE",sortId:p,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:vt(1,isNaN(x)?this.defaultPerPage:x,1e3)},keywordMatch:A,otherQueryParams:L}}parseCompatFilters(t){var r,o,a,i,s,c;let d=[];return t.has(Q.FILTERS)&&(d=this.parseValueFilters((r=t.get(Q.FILTERS))!==null&&r!==void 0?r:"")),(o=t.has(Q.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=t.get(Q.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=t.get(Q.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=t.get(Q.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=t.get(Q.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}splitUnknownFilter(t){return this.superEscapeFilters(t).split("*").map(r=>r.split("~"))}parseValueFilters(t){return t.length===0?[]:this.splitUnknownFilter(t).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(o2).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(t){return t.length===0?[]:this.splitUnknownFilter(t).map(r=>({key:r[0],dateFilter:{type:kr[r[1].toUpperCase()]}}))}parseRangeFilters(t){return t.length===0?[]:this.splitUnknownFilter(t).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(t){for(let[r,o,a]of this.filtersEscapeMapping)t=t.replaceAll(r,o);return t}superEscapeFilters(t){for(let[r,o,a]of this.filtersEscapeMapping)t=t.replaceAll(o,a);return t}unescapeFilterValue(t){for(let[r,o,a]of this.filtersEscapeMapping)t=t.replace(a,r);return t}parseLegacyPeriodFilter(t){if(V1(t))return[{key:"ft:lastEdition",dateFilter:{type:kr[t]}}];if(t.startsWith("CUSTOM_")){let[r,o,a]=t.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}};var as={};F(as,{toFtFormComponent:()=>sp});var ns=Symbol("elementInternals"),sp=ce(Symbol("toFtFormComponent"),function(e){class t extends e{static get formAssociated(){return!0}get form(){return this[ns].form}constructor(...o){super(o),this[ns]=this.attachInternals()}setFormValue(o){this[ns].setFormValue(o)}}return t});var is={};F(is,{DateFormatter:()=>or});var or=class{static format(t,r,o,a,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(t,r,o,a,!!i)}static getMomentDateFormat(t,r,o){return o?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,o,a,i){let s=typeof t=="string"?new Date(t):t,c=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?d:a?`${c} ${d}`:c}static getTimezoneAsString(){let t=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var cs={};F(cs,{ALL_KEYS_VALUE:()=>ss,SameWindowStorageEvent:()=>zr});var ss="__all__",zr=class extends CustomEvent{constructor(t,r,o){super("same-window-storage",{detail:{key:t,oldValue:r,newValue:o}})}keyMatch(t){return this.detail.key.includes(t)||this.detail.key==ss}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(e,t,r){let o=t.getItem(r[0]);Reflect.apply(e,t,r),window.dispatchEvent(new zr(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(e,t,r){let o=t.getItem(r[0]);Reflect.apply(e,t,r),window.dispatchEvent(new zr(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(e,t,r){Reflect.apply(e,t,r),window.dispatchEvent(new zr(ss))}});var ds={};F(ds,{FocusMainContentEvent:()=>ls});var ls=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var a2={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function cp(e){(e.key==="Enter"||e.key===" "||e.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=e.key}function lp(e){window.FluidTopicsA11yHints.isKeyboardNavigation=e.detail==0}document.addEventListener("keydown",cp);document.addEventListener("click",lp);var i2=D`
49
49
  .sr-only {
50
50
  position:absolute;
51
51
  left:-10000px;
@@ -1397,7 +1397,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
1397
1397
  label="${t.label}"
1398
1398
  .value=${t.value}
1399
1399
  ></ft-select-option>
1400
- `}willUpdate(t){super.willUpdate(t),t.has("options")&&(this.selectedOption=this.options.filter(r=>r.selected)[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1)}contentAvailableCallback(t){var r,o;if(super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&((o=(r=this.selectedOptionElement)!==null&&r!==void 0?r:this.firstOption)===null||o===void 0||o.focus(),this.focusOptions=!1),t.has("optionsDisplayed")&&this.hasOptionsMenuOpen){this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px";let a=["bottom","top"];mi(this.mainPanel,this.optionsMenu,"bottom",a,"fixed",G.optionsHeight,0).then(({x:i,y:s})=>{this.optionsMenu.style.left=`${i}px`,this.optionsMenu.style.top=`${s}px`})}}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var r;t.stopPropagation(),this.isSlotEmpty=yo(this.optionsSlot);let o=(r=this.optionsSlot)===null||r===void 0?void 0:r.assignedElements().map(a=>a);o&&o.length>0&&(this.options=o)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0;break}}onOptionsKeyDown(t){var r,o;let a,i=this.focusedOption?this.optionsList.indexOf(this.focusedOption):0;switch(t.key){case" ":case"Enter":t.preventDefault(),t.stopPropagation(),this.onSelectOption(t),this.optionsDisplayed=!1,(r=this.mainPanel)===null||r===void 0||r.focus();break;case"Escape":this.optionsDisplayed=!1,(o=this.mainPanel)===null||o===void 0||o.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),a=this.optionsList[(i-1+this.optionsList.length)%this.optionsList.length];break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),a=this.optionsList[(i+1)%this.optionsList.length];break;default:if(t.key.length!=1)break;this.isKeyAlphanumeric(t.key)&&(a=this.handleAlphanumericPress(t.key));break}a?.focus()}isKeyAlphanumeric(t){let r=t.charCodeAt(0);return r>47&&r<58||r>64&&r<91||r>96&&r<123}handleAlphanumericPress(t){let r=new Date;r.getTime()-this.lastSearchInputDate.getTime()>e.searchTimeoutMilliseconds&&(this.currentSearch=""),this.currentSearch+=t.toLowerCase();let o=this.options.find(a=>{var i;return((i=a.label)===null||i===void 0?void 0:i.toLowerCase().substring(0,this.currentSearch.length))===this.currentSearch});return this.lastSearchInputDate=r,o&&this.optionsList.find(a=>a.value===o.value)}getOptionId(t){if(!t)return;let r=this.options.findIndex(o=>ue(o.value,t.value));if(r!==-1)return`option-${r}`}onSelectOption(t){t.stopPropagation(),this.setValue(t.target.value)}setValue(t,r=!0){let o=this.options.find(a=>ue(a.value,t));o&&this.selectOption(o,r)}selectOption(t,r=!0){var o,a;if(!ue((o=this.selectedOption)===null||o===void 0?void 0:o.value,t?.value)){this.selectedOption=t;for(let i of this.options)i.selected=i===t;r&&this.dispatchEvent(new CustomEvent("change",{detail:(a=this.selectedOption)===null||a===void 0?void 0:a.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}};te.elementDefinitions={"ft-input-label":Ge,"ft-typography":dt,"ft-ripple":ae,"ft-icon":Re,"ft-select-option":xe};te.searchTimeoutMilliseconds=2e3;te.styles=[Tt,Jd];he([R({type:String})],te.prototype,"label",void 0);he([R({type:String})],te.prototype,"ariaLabel",void 0);he([R({type:String})],te.prototype,"helper",void 0);he([R({type:Boolean})],te.prototype,"outlined",void 0);he([R({type:Boolean})],te.prototype,"disabled",void 0);he([R({type:Boolean})],te.prototype,"error",void 0);he([R({type:Boolean})],te.prototype,"fixedMenuPosition",void 0);he([R({type:Array})],te.prototype,"options",void 0);he([K()],te.prototype,"selectedOption",void 0);he([K()],te.prototype,"optionsDisplayed",void 0);he([K()],te.prototype,"focusOptions",void 0);he([K()],te.prototype,"currentSearch",void 0);he([K()],te.prototype,"lastSearchInputDate",void 0);he([Oe(".ft-select")],te.prototype,"container",void 0);he([Oe(".ft-select--options")],te.prototype,"optionsMenu",void 0);he([Oe(".ft-select--input-panel")],te.prototype,"mainPanel",void 0);he([Oe("slot:not([name])")],te.prototype,"optionsSlot",void 0);ie("ft-select")(te);ie("ft-select-option")(xe);var hc;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(hc||(hc={}));var b5="ft-app-info",pr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};pr.eventName="authentication-change";var x5={session:(e,t)=>{ue(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>I.dispatchEvent(new pr(t.payload)),0))}},I=_t.get({name:b5,reducers:x5,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 $n=function(e,t,r,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);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},ZL=ce(Symbol("withDateFormat"),function(e){class t extends e{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(I)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>or.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return $n([R({type:Boolean})],t.prototype,"useLongDateFormat",void 0),$n([R({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),$n([it({store:I.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),$n([it({store:I.name})],t.prototype,"uiLocale",void 0),t});var hr=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:o}=I.getState(),a=t??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let o=e.get(t);if(o)r(o);else{let a=I.subscribe(()=>{o=e.get(t),o&&(a(),r(o))})}})}};var Wn=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:hr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):hr.await()}};var Ae=class extends Wn{constructor(t=!0,r){var o;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Ke,this.cache=t?a.commonCache:new Ke}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var jn=class extends Ae{async listMySearches(){let{session:t}=I.getState();return r2(t,se.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Vn=class extends Ae{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Kn=class extends Ae{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=I.getState().session;return!!t?.sessionAuthenticated}};var qn=class extends Ae{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=I.getState().session;return!!t?.sessionAuthenticated}};var v5="ft-user-assets",S5={setAssetCount:(e,t)=>{let{userAssetType:r,count:o}=t.payload.assetCount;e.assetCounts.allAsset[r]=o},clearAssetCount:e=>{Object.values(ke).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:o,asset:a}=t.payload;gc(e,r,[...mc(e,r),a]),t4(e,r,1,o),r4(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:o}=t.payload;gc(e,r,mc(e,r).map(a=>a.id===o.id?o:a)),r4(e,o)},removeAsset:(e,t)=>{let{assetType:r,mapId:o,assetId:a}=t.payload;gc(e,r,mc(e,r).filter(i=>i.id!==a)),t4(e,r,-1,o)}},o4={[ke.SEARCHES]:"savedSearches",[ke.BOOKMARKS]:"bookmarks",[ke.BOOKS]:void 0,[ke.COLLECTIONS]:void 0},mc=(e,t)=>{var r;let o=o4[t];return o?(r=e[o])!==null&&r!==void 0?r:[]:[]},gc=(e,t,r)=>{let o=o4[t];o&&(e[o]=r)},t4=(e,t,r,o)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===ke.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},r4=(e,t)=>{let r=e.assetLabels.map(a=>a.title),o=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...o)},_e=_t.get({name:v5,reducers:S5,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ke).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),yc=class{constructor(t=new Kn,r=new qn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Vn,this.savedSearchesService=new jn,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=I.getState();ue((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(),_e.actions.clearAssetCount(),_e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();_e.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();_e.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&_e.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&_e.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(_e.getState().assetCounts.bookmarkByMap).length!==0;t===ke.BOOKMARKS&&r&&_e.actions.clearBookmarkCountByMap(),_e.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;_e.actions.bookmarks(r)}}},E5=new yc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=E5);var bc=class{addCommand(t,r=!1){I.commands.add(t,r)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new bc;var n4,Xr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},C5=Symbol("clearAfterUnitTest"),Zn=class extends on(Ae){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[n4]=()=>{this.defaultMessages={},this.cache=new Ke,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.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 o;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[t])!==null&&o!==void 0?o:{},...r};ue(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,o;return this.fetchContext(t),(o=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(t,r){let o=t.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(t,r,...o){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new So((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(t){let r=!this.cache.has(t),o;try{o=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof xt)&&r&&console.error(a)}return o}subscribe(t,r){var o;return t=t.toLowerCase(),this.listeners[t]=(o=this.listeners[t])!==null&&o!==void 0?o: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 Xr({loadedContexts:t})),this.dispatchEvent(new Xr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Xr({loadedContexts:[t]})),this.dispatchEvent(new Xr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>rn(0).then(()=>o()).catch(()=>null)))}};n4=C5;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Zn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Zn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Qr=window.FluidTopicsI18nService,Yn=window.FluidTopicsCustomI18nService;var xc=class{highlightHtml(t,r,o){Oi(t,r,o)}};window.FluidTopicsHighlightHtmlService=new xc;var vc=class{isDate(t){var r,o,a,i;return(i=(a=((o=(r=I.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var o,a,i;if(t==null)return"";try{return or.format(t,(o=r?.locale)!==null&&o!==void 0?o:I.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 vc;var Ho=class{static get(t,r){var o,a;let i=I.getState(),{lang:s,region:c}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Ir(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Sc=class{urlToSearchRequest(t){return Ho.get().parse(t)}searchRequestToUrl(t){return Ho.get().serialize(t)}};window.FluidTopicsUrlService=new Sc;var mr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};mr.eventName="change";var Ec=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))}},a4=new Ec;var Xn=class e extends nt{static build(){return new e(window.history,a4,()=>window.location,!1)}constructor(t,r,o,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=o,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 o=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},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),ue(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new mr(this.currentItem())),0)}installProxies(){let t=r=>(o,a,[i,s,c])=>{let d=r(),f={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(a,[f,s,c]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let o={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(t){this.addEventListener(mr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(mr.eventName,t)}currentItem(){return $t(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 $t(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 $t(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 o=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!o)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)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 o;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Xn.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 i4=D`
1400
+ `}willUpdate(t){super.willUpdate(t),t.has("options")&&(this.selectedOption=this.options.filter(r=>r.selected)[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1)}contentAvailableCallback(t){var r,o;if(super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&((o=(r=this.selectedOptionElement)!==null&&r!==void 0?r:this.firstOption)===null||o===void 0||o.focus(),this.focusOptions=!1),t.has("optionsDisplayed")&&this.hasOptionsMenuOpen){this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px";let a=["bottom","top"];mi(this.mainPanel,this.optionsMenu,"bottom",a,"fixed",G.optionsHeight,0).then(({x:i,y:s})=>{this.optionsMenu.style.left=`${i}px`,this.optionsMenu.style.top=`${s}px`})}}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var r;t.stopPropagation(),this.isSlotEmpty=yo(this.optionsSlot);let o=(r=this.optionsSlot)===null||r===void 0?void 0:r.assignedElements().map(a=>a);o&&o.length>0&&(this.options=o)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0;break}}onOptionsKeyDown(t){var r,o;let a,i=this.focusedOption?this.optionsList.indexOf(this.focusedOption):0;switch(t.key){case" ":case"Enter":t.preventDefault(),t.stopPropagation(),this.onSelectOption(t),this.optionsDisplayed=!1,(r=this.mainPanel)===null||r===void 0||r.focus();break;case"Escape":this.optionsDisplayed=!1,(o=this.mainPanel)===null||o===void 0||o.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),a=this.optionsList[(i-1+this.optionsList.length)%this.optionsList.length];break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),a=this.optionsList[(i+1)%this.optionsList.length];break;default:if(t.key.length!=1)break;this.isKeyAlphanumeric(t.key)&&(a=this.handleAlphanumericPress(t.key));break}a?.focus()}isKeyAlphanumeric(t){let r=t.charCodeAt(0);return r>47&&r<58||r>64&&r<91||r>96&&r<123}handleAlphanumericPress(t){let r=new Date;r.getTime()-this.lastSearchInputDate.getTime()>e.searchTimeoutMilliseconds&&(this.currentSearch=""),this.currentSearch+=t.toLowerCase();let o=this.options.find(a=>{var i;return((i=a.label)===null||i===void 0?void 0:i.toLowerCase().substring(0,this.currentSearch.length))===this.currentSearch});return this.lastSearchInputDate=r,o&&this.optionsList.find(a=>a.value===o.value)}getOptionId(t){if(!t)return;let r=this.options.findIndex(o=>ue(o.value,t.value));if(r!==-1)return`option-${r}`}onSelectOption(t){t.stopPropagation(),this.setValue(t.target.value)}setValue(t,r=!0){let o=this.options.find(a=>ue(a.value,t));o&&this.selectOption(o,r)}selectOption(t,r=!0){var o,a;if(!ue((o=this.selectedOption)===null||o===void 0?void 0:o.value,t?.value)){this.selectedOption=t;for(let i of this.options)i.selected=i===t;r&&this.dispatchEvent(new CustomEvent("change",{detail:(a=this.selectedOption)===null||a===void 0?void 0:a.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}};te.elementDefinitions={"ft-input-label":Ge,"ft-typography":dt,"ft-ripple":ae,"ft-icon":Re,"ft-select-option":xe};te.searchTimeoutMilliseconds=2e3;te.styles=[Tt,Jd];he([R({type:String})],te.prototype,"label",void 0);he([R({type:String})],te.prototype,"ariaLabel",void 0);he([R({type:String})],te.prototype,"helper",void 0);he([R({type:Boolean})],te.prototype,"outlined",void 0);he([R({type:Boolean})],te.prototype,"disabled",void 0);he([R({type:Boolean})],te.prototype,"error",void 0);he([R({type:Boolean})],te.prototype,"fixedMenuPosition",void 0);he([R({type:Array})],te.prototype,"options",void 0);he([K()],te.prototype,"selectedOption",void 0);he([K()],te.prototype,"optionsDisplayed",void 0);he([K()],te.prototype,"focusOptions",void 0);he([K()],te.prototype,"currentSearch",void 0);he([K()],te.prototype,"lastSearchInputDate",void 0);he([Oe(".ft-select")],te.prototype,"container",void 0);he([Oe(".ft-select--options")],te.prototype,"optionsMenu",void 0);he([Oe(".ft-select--input-panel")],te.prototype,"mainPanel",void 0);he([Oe("slot:not([name])")],te.prototype,"optionsSlot",void 0);ie("ft-select")(te);ie("ft-select-option")(xe);var hc;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(hc||(hc={}));var b5="ft-app-info",pr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};pr.eventName="authentication-change";var x5={session:(e,t)=>{ue(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>I.dispatchEvent(new pr(t.payload)),0))}},I=_t.get({name:b5,reducers:x5,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 $n=function(e,t,r,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);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},ZL=ce(Symbol("withDateFormat"),function(e){class t extends e{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(I)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>or.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return $n([R({type:Boolean})],t.prototype,"useLongDateFormat",void 0),$n([R({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),$n([it({store:I.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),$n([it({store:I.name})],t.prototype,"uiLocale",void 0),t});var hr=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:o}=I.getState(),a=t??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let o=e.get(t);if(o)r(o);else{let a=I.subscribe(()=>{o=e.get(t),o&&(a(),r(o))})}})}};var Wn=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:hr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):hr.await()}};var Ae=class extends Wn{constructor(t=!0,r){var o;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Ke,this.cache=t?a.commonCache:new Ke}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var jn=class extends Ae{async listMySearches(){let{session:t}=I.getState();return r2(t,se.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Vn=class extends Ae{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Kn=class extends Ae{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=I.getState().session;return!!t?.sessionAuthenticated}};var qn=class extends Ae{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=I.getState().session;return!!t?.sessionAuthenticated}};var v5="ft-user-assets",S5={setAssetCount:(e,t)=>{let{userAssetType:r,count:o}=t.payload.assetCount;e.assetCounts.allAsset[r]=o},clearAssetCount:e=>{Object.values(ke).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:o,asset:a}=t.payload;gc(e,r,[...mc(e,r),a]),t4(e,r,1,o),r4(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:o}=t.payload;gc(e,r,mc(e,r).map(a=>a.id===o.id?o:a)),r4(e,o)},removeAsset:(e,t)=>{let{assetType:r,mapId:o,assetId:a}=t.payload;gc(e,r,mc(e,r).filter(i=>i.id!==a)),t4(e,r,-1,o)}},o4={[ke.SEARCHES]:"savedSearches",[ke.BOOKMARKS]:"bookmarks",[ke.BOOKS]:void 0,[ke.COLLECTIONS]:void 0},mc=(e,t)=>{var r;let o=o4[t];return o?(r=e[o])!==null&&r!==void 0?r:[]:[]},gc=(e,t,r)=>{let o=o4[t];o&&(e[o]=r)},t4=(e,t,r,o)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===ke.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},r4=(e,t)=>{let r=e.assetLabels.map(a=>a.title),o=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...o)},_e=_t.get({name:v5,reducers:S5,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ke).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),yc=class{constructor(t=new Kn,r=new qn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Vn,this.savedSearchesService=new jn,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=I.getState();ue((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(),_e.actions.clearAssetCount(),_e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();_e.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();_e.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&_e.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&_e.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(_e.getState().assetCounts.bookmarkByMap).length!==0;t===ke.BOOKMARKS&&r&&_e.actions.clearBookmarkCountByMap(),_e.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;_e.actions.bookmarks(r)}}},E5=new yc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=E5);var bc=class{addCommand(t,r=!1){I.commands.add(t,r)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new bc;var n4,Xr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},C5=Symbol("clearAfterUnitTest"),Zn=class extends on(Ae){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[n4]=()=>{this.defaultMessages={},this.cache=new Ke,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.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 o;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[t])!==null&&o!==void 0?o:{},...r};ue(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,o;return this.fetchContext(t),(o=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(t,r){let o=t.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(t,r,...o){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new So((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(t){let r=!this.cache.has(t),o;try{o=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof xt)&&r&&console.error(a)}return o}subscribe(t,r){var o;return t=t.toLowerCase(),this.listeners[t]=(o=this.listeners[t])!==null&&o!==void 0?o: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 Xr({loadedContexts:t})),this.dispatchEvent(new Xr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Xr({loadedContexts:[t]})),this.dispatchEvent(new Xr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>rn(0).then(()=>o()).catch(()=>null)))}};n4=C5;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Zn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Zn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Qr=window.FluidTopicsI18nService,Yn=window.FluidTopicsCustomI18nService;var xc=class{highlightHtml(t,r,o){Oi(t,r,o)}};window.FluidTopicsHighlightHtmlService=new xc;var vc=class{isDate(t){var r,o,a,i;return(i=(a=((o=(r=I.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var o,a,i,s;if(t==null)return"";try{return or.format(t,(o=r?.locale)!==null&&o!==void 0?o:I.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 vc;var Ho=class{static get(t,r){var o,a;let i=I.getState(),{lang:s,region:c}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Ir(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Sc=class{urlToSearchRequest(t){return Ho.get().parse(t)}searchRequestToUrl(t){return Ho.get().serialize(t)}};window.FluidTopicsUrlService=new Sc;var mr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};mr.eventName="change";var Ec=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))}},a4=new Ec;var Xn=class e extends nt{static build(){return new e(window.history,a4,()=>window.location,!1)}constructor(t,r,o,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=o,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 o=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},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),ue(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new mr(this.currentItem())),0)}installProxies(){let t=r=>(o,a,[i,s,c])=>{let d=r(),f={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(a,[f,s,c]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let o={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(t){this.addEventListener(mr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(mr.eventName,t)}currentItem(){return $t(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 $t(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 $t(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 o=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!o)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)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 o;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Xn.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 i4=D`
1401
1401
  `;function s4(e,t){let{authenticationRequired:r,session:o}=I.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(t):e()}var le=function(e,t,r,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);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},oe=class extends Z{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=()=>hr.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Ke,this.cleanSessionDebouncer=new Be,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return Y`
1402
1402
  <slot></slot>
1403
1403
  `}connectedCallback(){super.connectedCallback(),I.addEventListener(pr.eventName,this.reloadConfiguration)}disconnectedCallback(){I.addEventListener(pr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,o,a,i,s,c,d;super.update(t),t.has("baseUrl")&&(I.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&I.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&I.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&I.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&I.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&I.actions.noCustom(this.noCustom),t.has("editorMode")&&I.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&I.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&I.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(f=>Qr.addContext(f)),t.has("openExternalDocumentInNewTab")&&I.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&I.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&I.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(I.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),I.actions.availableUiLocales((a=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&a!==void 0?a:[]),I.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&I.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&I.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 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",()=>s4(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};oe.elementDefinitions={};oe.styles=i4;le([R()],oe.prototype,"baseUrl",void 0);le([R()],oe.prototype,"apiIntegrationIdentifier",void 0);le([R()],oe.prototype,"apiIntegrationAppVersion",void 0);le([R()],oe.prototype,"uiLocale",void 0);le([qe(null)],oe.prototype,"availableUiLocales",void 0);le([qe(null)],oe.prototype,"metadataConfiguration",void 0);le([R({type:Boolean})],oe.prototype,"editorMode",void 0);le([R({type:Boolean})],oe.prototype,"noCustom",void 0);le([R({type:Boolean})],oe.prototype,"openExternalDocumentInNewTab",void 0);le([R({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],oe.prototype,"noCustomComponent",void 0);le([R({type:Boolean})],oe.prototype,"withManualResources",void 0);le([R({type:Boolean})],oe.prototype,"navigatorOnline",void 0);le([R({type:Boolean})],oe.prototype,"forcedOffline",void 0);le([R({type:Object})],oe.prototype,"apiProvider",void 0);le([R({type:Boolean})],oe.prototype,"authenticationRequired",void 0);le([qe([])],oe.prototype,"messageContexts",void 0);le([qe(void 0)],oe.prototype,"session",void 0);le([K()],oe.prototype,"localesConfiguration",void 0);le([K()],oe.prototype,"availableContentLocales",void 0);ie("ft-app-context")(oe);var Qn=class e extends Event{constructor(){super(e.eventName)}};Qn.eventName="search-context-clear-all-filters";var c4=function(e,t,r,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);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},Ac=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},l4=Symbol("registerInterval"),Cc=Symbol("registerAttempts"),A5=40,O5=ce(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(o){var a,i,s;super.willUpdate(o),o.has("neededSearchRequests")&&((a=this.stateManager)===null||a===void 0||a.unregisterComponent(this,(i=o.get("neededSearchRequests"))!==null&&i!==void 0?i:[]),(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[Cc]=0,this.tryToRegisterToContext(),this[l4]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Cc]>A5?window.clearInterval(this[l4]):(this[Cc]++,this.dispatchEvent(new Ac))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return c4([K()],t.prototype,"stateManager",void 0),c4([K({hasChanged:ot})],t.prototype,"neededSearchRequests",void 0),t}),Jn=class extends O5(Jt){};var ea=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?Yn:Qr}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(o,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(o,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(o,a)=>()=>a}),this.attributes=new Proxy({},{get:(o,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var Oc=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,o]=t.split(".");return{context:r,key:o,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},d4=new Oc;var L5=function(e,t,r,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);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},R5=Symbol("i18nAttributes"),w5=Symbol("i18nListAttributes"),u4=Symbol("i18nProperties"),ta=Symbol("i18nContexts"),Fo=Symbol("i18nUnsubs"),oa=ce(Symbol("withI18n"),function(e){var t,r;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Yn:Qr}i18n(i){let{context:s,key:c,message:d}=i,{custom:f,args:h,argsProvider:p}=i;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,f);let g=h??(p?p(this):[]);return this.getI18nService(f).resolveMessage(s,c,...g)}return d}async awaitI18n(i){let{context:s,custom:c}=i;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(i)}customI18n(i,s){if(d4.isI18nKey(i)){let[c,d]=i.split(".");return this.i18n({custom:!0,context:c,key:d,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,c,d)=>i.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,c,d)=>{var f;return((f=d?.context)===null||f===void 0?void 0:f.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,c;let d=this,f=(h,p,g)=>g?.context&&g.key&&i(h,p,g)?{...g,message:this.i18n({context:g.context,key:g.key,custom:g.custom,...h})}:g;(s=this[R5])===null||s===void 0||s.forEach((h,p)=>d[p]=f(h,p,d[p])),(c=this[w5])===null||c===void 0||c.forEach((h,p)=>{var g;return d[p]=(g=d[p])===null||g===void 0?void 0:g.map(x=>f(h,p,x))})}updateI18nProperties(i){var s;(s=this[u4])===null||s===void 0||s.forEach((c,d)=>{i(c,d)&&(this[d]=this.i18n(c))})}addI18nMessages(i,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,c)}addI18nContext(i,s,c){let d=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[ta].set(d,{isCustomContext:c}),this[Fo].has(d)||this[Fo].set(d,this.getI18nService(c).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(c).prepareContext(d,s)}hasI18nContext(i){return this[ta].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ta].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Fo].forEach(i=>i()),this[Fo].clear()}}return t=ta,r=Fo,L5([R({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),f4=class extends oa(Z){},ra=class extends oa(Jt){};var p4=D`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-language-filter",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "Content language filter for integrated fluid-topics search pages",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,11 +19,11 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "2.0.11",
22
+ "@fluid-topics/ft-wc-utils": "2.0.12",
23
23
  "lit": "3.1.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@fluid-topics/ft-wc-test-utils": "2.0.11"
26
+ "@fluid-topics/ft-wc-test-utils": "2.0.12"
27
27
  },
28
- "gitHead": "aedc97fb65c7bafd16b7adef8218a58f59fea690"
28
+ "gitHead": "4811b3ed72672d41022c271d4a0d1db15b458aca"
29
29
  }