@fluid-topics/ft-search-quick-filters 2.1.24 → 2.2.1
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.
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use strict";(()=>{var ks=Object.create;var gr=Object.defineProperty;var Ls=Object.getOwnPropertyDescriptor;var Ps=Object.getOwnPropertyNames;var Ds=Object.getPrototypeOf,Ms=Object.prototype.hasOwnProperty;var Fe=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Ns=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ps(e))!Ms.call(t,s)&&s!==r&&gr(t,s,{get:()=>e[s],enumerable:!(n=Ls(e,s))||n.enumerable});return t};var y=(t,e,r)=>(r=t!=null?ks(Ds(t)):{},Ns(e||!t||!t.__esModule?gr(r,"default",{value:t,enumerable:!0}):r,t));var O=Fe((ji,Sr)=>{Sr.exports=ftGlobals.wcUtils});var z=Fe((qi,br)=>{br.exports=ftGlobals.lit});var j=Fe((Bi,Er)=>{Er.exports=ftGlobals.litDecorators});var xs=Fe((Vl,As)=>{As.exports=ftGlobals.litRepeat});var Is=y(O());var St=y(z());var Ae=y(O()),fr=y(j());var xt;(function(t){t.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(xt||(xt={}));var ce=y(O());var Us=y(O());var Ar;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ar||(Ar={}));var xr;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(xr||(xr={}));var Cr;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Cr||(Cr={}));var Or;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Or||(Or={}));var wr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(wr||(wr={}));var Tr;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Tr||(Tr={}));var Rr;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Rr||(Rr={}));var _r;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(_r||(_r={}));var Ir;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Ir||(Ir={}));var kr;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(kr||(kr={}));var Lr;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(Lr||(Lr={}));var Pr;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Pr||(Pr={}));var Dr;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Dr||(Dr={}));var Mr;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Mr||(Mr={}));var Nr;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Nr||(Nr={}));var Ur;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Ur||(Ur={}));var Ct;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Ct||(Ct={}));var Fr;(function(t){t.ASC="ASC",t.DESC="DESC"})(Fr||(Fr={}));var jr;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(jr||(jr={}));var Ot;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ot||(Ot={}));var qr;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(qr||(qr={}));var Br;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Br||(Br={}));var Hr;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Hr||(Hr={}));var Vr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Vr||(Vr={}));var Kr;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Kr||(Kr={}));var wt;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(wt||(wt={}));var Gr;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Gr||(Gr={}));var w;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(w||(w={}));var P;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(P||(P={}));var $r;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})($r||($r={}));var zr;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(zr||(zr={}));var Wr;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Wr||(Wr={}));var Qr;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Qr||(Qr={}));var Yr;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Yr||(Yr={}));var Jr;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Jr||(Jr={}));var Xr;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Xr||(Xr={}));var Zr;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Zr||(Zr={}));var en;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(en||(en={}));var tn;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(tn||(tn={}));var rn;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(rn||(rn={}));var nn;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(nn||(nn={}));var Fs={[w.PERSONAL_BOOK_SHARE_USER]:[w.PERSONAL_BOOK_USER],[w.HTML_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.PDF_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.KHUB_ADMIN]:[w.CONTENT_PUBLISHER],[w.ADMIN]:[w.KHUB_ADMIN,w.USERS_ADMIN,w.PORTAL_ADMIN,w.BEHAVIOR_DATA_USER],[w.GENERATIVE_AI_EXPORT_USER]:[w.GENERATIVE_AI_USER]};function sn(t,e){return t===e||(Fs[t]??[]).some(r=>sn(r,e))}function Tt(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>sn(n,e))}var Zt=y(j());var an=y(j(),1);var Rt=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function on(t,e){return(0,an.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Te(t);try{return JSON.parse(r)}catch{return Te(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Re,...e??{}})}function js(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!de(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!de(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let s=a=>Object.keys(a).filter(o=>a[o]!=null),i=s(t);if(r=i.length,r!==s(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){let a=i[n];if(!de(t[a],e[a]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function de(t,e){try{return js(t,e)}catch{return!1}}function Re(t,e){return!de(t,e)}function Te(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function je(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let s=e(n);return s[t]=!0,s}}var un=y(j(),1);var _t=t=>{let e=t??{};return(r,n)=>{var s;let i={hasChanged:Re,attribute:!1,...e};(0,un.property)(i)(r,n);let a=r.constructor;a.reduxProperties=new Map(a.reduxProperties),a.reduxProperties.set(n,{selector:(s=e.selector)!==null&&s!==void 0?s:(o=>o[n]),store:e.store})}};var qe=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var Z=y(j(),1);var Be=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let s=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let a of n)try{await a()}catch(o){s(o);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ln=y(z(),1);var He=globalThis,qs=He.ShadowRoot&&(He.ShadyCSS===void 0||He.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var cn=(t,e)=>{if(qs)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),s=He.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,t.appendChild(n)}};var Ve=class extends ln.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return cn(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){Rt(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function dn(t,e,...r){var n;let s=t.querySelector(e);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var pe=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(i=(s<3?a(i):s>3?a(e,r,i):a(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},mn,fn=Symbol("constructorPrototype"),pn=Symbol("constructorName"),vn=Symbol("exportpartsDebouncer"),hn=Symbol("dynamicDependenciesLoaded"),fe=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};fe.eventName="exportparts-updated";var q=class extends Ve{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[mn]=new Be(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[vn].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.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[pn]=this.constructor.name,this[fn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[pn]&&Object.setPrototypeOf(this,this[fn])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[hn]||(r[hn]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(fe.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(fe.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new fe)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=dn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}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(e){var r,n,s,i,a,o;let u=d=>d!=null&&d.trim().length>0,c=e.filter(u).map(d=>d.trim());if(c.length===0){this.exportparts=void 0;return}let l=new Set;for(let d of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let m=(i=(s=d.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&i!==void 0?i:[],p=(o=(a=d.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(g=>g.split(":")[1]))!==null&&o!==void 0?o:[],h=[...m,...p].filter(u).map(g=>g.trim());for(let g of h)l.add(g)}if(l.size===0){this.exportparts=void 0;return}let f=[...l.values()].flatMap(d=>c.map(m=>`${d}:${m}--${d}`));this.exportparts=[...this.part,...f].join(", ")}};mn=vn;pe([(0,Z.property)()],q.prototype,"exportpartsPrefix",void 0);pe([on([])],q.prototype,"exportpartsPrefixes",void 0);pe([(0,Z.property)({reflect:!0})],q.prototype,"exportparts",void 0);pe([(0,Z.property)()],q.prototype,"customStylesheet",void 0);pe([(0,Z.property)()],q.prototype,"elementToFocus",void 0);pe([(0,Z.state)()],q.prototype,"useAdoptedStyleSheets",void 0);function Ke(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var _e=Symbol("internalReduxEventsUnsubscribers"),W=Symbol("internalStoresUnsubscribers"),ee=Symbol("internalStores"),Bs=je(Symbol("withRedux"),function(t){var e,r,n;class s extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(a){super.willUpdate(a),[...this.reduxConstructor.reduxReactiveProperties].some(o=>a.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[ee].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ee].values()][0]}getStore(a){return a==null?this.getUnnamedStore():this[ee].get(a)}addStore(a,o){var u;o=(u=o??a.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(o),this[ee].set(o,a),this.subscribeToStore(o,a),this.updateFromStores()}removeStore(a){let o=typeof a=="string"?a:a.name;this.unsubscribeFromStore(o),this[ee].delete(o)}setupStores(){this.unsubscribeFromStores(),this[ee].forEach((a,o)=>this.subscribeToStore(o,a)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((a,o)=>{let u=this.constructor.getPropertyOptions(o);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:o)){let c=this.getStore(a.store);c&&(a.store?this[W].has(a.store):this[W].size>0)&&(this[o]=a.selector(c.getState(),this))}})}subscribeToStore(a,o){var u;this[W].set(a,o.subscribe(()=>this.updateFromStores())),this[_e].set(a,[]),Ke(o)&&o.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((c,l)=>{if(typeof this[l]=="function"&&(!c.store||o.name===c.store)){let f=d=>this[l](d);o.addEventListener(c.eventName,f),this[_e].get(a).push(()=>o.removeEventListener(c.eventName,f))}})),this.onStoreAvailable(a)}unsubscribeFromStores(){this[W].forEach((a,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(a){var o;this[W].has(a)&&this[W].get(a)(),this[W].delete(a),(o=this[_e].get(a))===null||o===void 0||o.forEach(u=>u()),this[_e].delete(a)}onStoreAvailable(a){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=W,r=ee,n=_e,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),yn=class extends Bs(q){};function D(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var s,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(a){return"'"+a+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function V(t){return!!t&&!!t[A]}function U(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var s=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return s===Object||typeof s=="function"&&Function.toString.call(s)===Qs})(t)||Array.isArray(t)||!!t[Cn]||!!(!((e=t.constructor)===null||e===void 0)&&e[Cn])||Ft(t)||jt(t))}function te(t,e,r){r===void 0&&(r=!1),ve(t)===0?(r?Object.keys:me)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,s){return e(s,n,t)}))}function ve(t){var e=t[A];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ft(t)?2:jt(t)?3:0}function he(t,e){return ve(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Hs(t,e){return ve(t)===2?t.get(e):t[e]}function On(t,e,r){var n=ve(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function wn(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ft(t){return zs&&t instanceof Map}function jt(t){return Ws&&t instanceof Set}function Q(t){return t.o||t.t}function qt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=_n(t);delete e[A];for(var r=me(e),n=0;n<r.length;n++){var s=r[n],i=e[s];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[s]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[s]})}return Object.create(Object.getPrototypeOf(t),e)}function Bt(t,e){return e===void 0&&(e=!1),Ht(t)||V(t)||!U(t)||(ve(t)>1&&(t.set=t.add=t.clear=t.delete=Vs),Object.freeze(t),e&&te(t,(function(r,n){return Bt(n,!0)}),!0)),t}function Vs(){D(2)}function Ht(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function B(t){var e=Ut[t];return e||D(18,t),e}function Ks(t,e){Ut[t]||(Ut[t]=e)}function Dt(){return ke}function It(t,e){e&&(B("Patches"),t.u=[],t.s=[],t.v=e)}function Ge(t){Mt(t),t.p.forEach(Gs),t.p=null}function Mt(t){t===ke&&(ke=t.l)}function gn(t){return ke={p:[],l:ke,h:t,m:!0,_:0}}function Gs(t){var e=t[A];e.i===0||e.i===1?e.j():e.g=!0}function kt(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||B("ES5").S(e,t,n),n?(r[A].P&&(Ge(e),D(4)),U(t)&&(t=$e(e,t),e.l||ze(e,t)),e.u&&B("Patches").M(r[A].t,t,e.u,e.s)):t=$e(e,r,[]),Ge(e),e.u&&e.v(e.u,e.s),t!==Rn?t:void 0}function $e(t,e,r){if(Ht(e))return e;var n=e[A];if(!n)return te(e,(function(o,u){return Sn(t,n,e,o,u,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return ze(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var s=n.i===4||n.i===5?n.o=qt(n.k):n.o,i=s,a=!1;n.i===3&&(i=new Set(s),s.clear(),a=!0),te(i,(function(o,u){return Sn(t,n,s,o,u,r,a)})),ze(t,s,!1),r&&t.u&&B("Patches").N(n,r,t.u,t.s)}return n.o}function Sn(t,e,r,n,s,i,a){if(V(s)){var o=$e(t,s,i&&e&&e.i!==3&&!he(e.R,n)?i.concat(n):void 0);if(On(r,n,o),!V(o))return;t.m=!1}else a&&r.add(s);if(U(s)&&!Ht(s)){if(!t.h.D&&t._<1)return;$e(t,s),e&&e.A.l||ze(t,s)}}function ze(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Bt(e,r)}function Lt(t,e){var r=t[A];return(r?Q(r):t)[e]}function bn(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Y(t){t.P||(t.P=!0,t.l&&Y(t.l))}function Pt(t){t.o||(t.o=qt(t.t))}function Nt(t,e,r){var n=Ft(e)?B("MapSet").F(e,r):jt(e)?B("MapSet").T(e,r):t.O?(function(s,i){var a=Array.isArray(s),o={i:a?1:0,A:i?i.A:Dt(),P:!1,I:!1,R:{},l:i,t:s,k:null,o:null,j:null,C:!1},u=o,c=Le;a&&(u=[o],c=Ie);var l=Proxy.revocable(u,c),f=l.revoke,d=l.proxy;return o.k=d,o.j=f,d})(e,r):B("ES5").J(e,r);return(r?r.A:Dt()).p.push(n),n}function $s(t){return V(t)||D(22,t),(function e(r){if(!U(r))return r;var n,s=r[A],i=ve(r);if(s){if(!s.P&&(s.i<4||!B("ES5").K(s)))return s.t;s.I=!0,n=En(r,i),s.I=!1}else n=En(r,i);return te(n,(function(a,o){s&&Hs(s.t,a)===o||On(n,a,e(o))})),i===3?new Set(n):n})(t)}function En(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return qt(t)}function Tn(){function t(a,o){var u=i[a];return u?u.enumerable=o:i[a]=u={configurable:!0,enumerable:o,get:function(){var c=this[A];return Le.get(c,a)},set:function(c){var l=this[A];Le.set(l,a,c)}},u}function e(a){for(var o=a.length-1;o>=0;o--){var u=a[o][A];if(!u.P)switch(u.i){case 5:n(u)&&Y(u);break;case 4:r(u)&&Y(u)}}}function r(a){for(var o=a.t,u=a.k,c=me(u),l=c.length-1;l>=0;l--){var f=c[l];if(f!==A){var d=o[f];if(d===void 0&&!he(o,f))return!0;var m=u[f],p=m&&m[A];if(p?p.t!==d:!wn(m,d))return!0}}var h=!!o[A];return c.length!==me(o).length+(h?0:1)}function n(a){var o=a.k;if(o.length!==a.t.length)return!0;var u=Object.getOwnPropertyDescriptor(o,o.length-1);if(u&&!u.get)return!0;for(var c=0;c<o.length;c++)if(!o.hasOwnProperty(c))return!0;return!1}function s(a){a.g&&D(3,JSON.stringify(Q(a)))}var i={};Ks("ES5",{J:function(a,o){var u=Array.isArray(a),c=(function(f,d){if(f){for(var m=Array(d.length),p=0;p<d.length;p++)Object.defineProperty(m,""+p,t(p,!0));return m}var h=_n(d);delete h[A];for(var g=me(h),S=0;S<g.length;S++){var b=g[S];h[b]=t(b,f||!!h[b].enumerable)}return Object.create(Object.getPrototypeOf(d),h)})(u,a),l={i:u?5:4,A:o?o.A:Dt(),P:!1,I:!1,R:{},l:o,t:a,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,A,{value:l,writable:!0}),c},S:function(a,o,u){u?V(o)&&o[A].A===a&&e(a.p):(a.u&&(function c(l){if(l&&typeof l=="object"){var f=l[A];if(f){var d=f.t,m=f.k,p=f.R,h=f.i;if(h===4)te(m,(function(E){E!==A&&(d[E]!==void 0||he(d,E)?p[E]||c(m[E]):(p[E]=!0,Y(f)))})),te(d,(function(E){m[E]!==void 0||he(m,E)||(p[E]=!1,Y(f))}));else if(h===5){if(n(f)&&(Y(f),p.length=!0),m.length<d.length)for(var g=m.length;g<d.length;g++)p[g]=!1;else for(var S=d.length;S<m.length;S++)p[S]=!0;for(var b=Math.min(m.length,d.length),x=0;x<b;x++)m.hasOwnProperty(x)||(p[x]=!0),p[x]===void 0&&c(m[x])}}}})(a.p[0]),e(a.p))},K:function(a){return a.i===4?r(a):n(a)}})}var An,ke,Vt=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",zs=typeof Map<"u",Ws=typeof Set<"u",xn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Rn=Vt?Symbol.for("immer-nothing"):((An={})["immer-nothing"]=!0,An),Cn=Vt?Symbol.for("immer-draftable"):"__$immer_draftable",A=Vt?Symbol.for("immer-state"):"__$immer_state";var Qs=""+Object.prototype.constructor,me=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,_n=Object.getOwnPropertyDescriptors||function(t){var e={};return me(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Ut={},Le={get:function(t,e){if(e===A)return t;var r=Q(t);if(!he(r,e))return(function(s,i,a){var o,u=bn(i,a);return u?"value"in u?u.value:(o=u.get)===null||o===void 0?void 0:o.call(s.k):void 0})(t,r,e);var n=r[e];return t.I||!U(n)?n:n===Lt(t.t,e)?(Pt(t),t.o[e]=Nt(t.A.h,n,t)):n},has:function(t,e){return e in Q(t)},ownKeys:function(t){return Reflect.ownKeys(Q(t))},set:function(t,e,r){var n=bn(Q(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var s=Lt(Q(t),e),i=s?.[A];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(wn(r,s)&&(r!==void 0||he(t.t,e)))return!0;Pt(t),Y(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Lt(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Pt(t),Y(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Q(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){D(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){D(12)}},Ie={};te(Le,(function(t,e){Ie[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Ie.deleteProperty=function(t,e){return Ie.set.call(this,t,e,void 0)},Ie.set=function(t,e,r){return Le.set.call(this,t[0],e,r,t[0])};var Ys=(function(){function t(r){var n=this;this.O=xn,this.D=!0,this.produce=function(s,i,a){if(typeof s=="function"&&typeof i!="function"){var o=i;i=s;var u=n;return function(h){var g=this;h===void 0&&(h=o);for(var S=arguments.length,b=Array(S>1?S-1:0),x=1;x<S;x++)b[x-1]=arguments[x];return u.produce(h,(function(E){var $;return($=i).call.apply($,[g,E].concat(b))}))}}var c;if(typeof i!="function"&&D(6),a!==void 0&&typeof a!="function"&&D(7),U(s)){var l=gn(n),f=Nt(n,s,void 0),d=!0;try{c=i(f),d=!1}finally{d?Ge(l):Mt(l)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(h){return It(l,a),kt(h,l)}),(function(h){throw Ge(l),h})):(It(l,a),kt(c,l))}if(!s||typeof s!="object"){if((c=i(s))===void 0&&(c=s),c===Rn&&(c=void 0),n.D&&Bt(c,!0),a){var m=[],p=[];B("Patches").M(s,c,m,p),a(m,p)}return c}D(21,s)},this.produceWithPatches=function(s,i){if(typeof s=="function")return function(c){for(var l=arguments.length,f=Array(l>1?l-1:0),d=1;d<l;d++)f[d-1]=arguments[d];return n.produceWithPatches(c,(function(m){return s.apply(void 0,[m].concat(f))}))};var a,o,u=n.produce(s,i,(function(c,l){a=c,o=l}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(c){return[c,a,o]})):[u,a,o]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){U(r)||D(8),V(r)&&(r=$s(r));var n=gn(this),s=Nt(this,r,void 0);return s[A].C=!0,Mt(n),s},e.finishDraft=function(r,n){var s=r&&r[A],i=s.A;return It(i,n),kt(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!xn&&D(20),this.O=r},e.applyPatches=function(r,n){var s;for(s=n.length-1;s>=0;s--){var i=n[s];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}s>-1&&(n=n.slice(s+1));var a=B("Patches").$;return V(r)?a(r,n):this.produce(r,(function(o){return a(o,n)}))},t})(),L=new Ys,Js=L.produce,Ia=L.produceWithPatches.bind(L),ka=L.setAutoFreeze.bind(L),La=L.setUseProxies.bind(L),Pa=L.applyPatches.bind(L),Da=L.createDraft.bind(L),Ma=L.finishDraft.bind(L),We=Js;function re(t){"@babel/helpers - typeof";return re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},re(t)}function In(t,e){if(re(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(re(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kn(t){var e=In(t,"string");return re(e)=="symbol"?e:e+""}function Ln(t,e,r){return(e=kn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Kt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pn(Object(r),!0).forEach(function(n){Ln(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pn(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function R(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Dn=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Gt=function(){return Math.random().toString(36).substring(7).split("").join(".")},Qe={INIT:"@@redux/INIT"+Gt(),REPLACE:"@@redux/REPLACE"+Gt(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Gt()}};function Xs(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function $t(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(R(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(R(1));return r($t)(t,e)}if(typeof t!="function")throw new Error(R(2));var s=t,i=e,a=[],o=a,u=!1;function c(){o===a&&(o=a.slice())}function l(){if(u)throw new Error(R(3));return i}function f(h){if(typeof h!="function")throw new Error(R(4));if(u)throw new Error(R(5));var g=!0;return c(),o.push(h),function(){if(g){if(u)throw new Error(R(6));g=!1,c();var b=o.indexOf(h);o.splice(b,1),a=null}}}function d(h){if(!Xs(h))throw new Error(R(7));if(typeof h.type>"u")throw new Error(R(8));if(u)throw new Error(R(9));try{u=!0,i=s(i,h)}finally{u=!1}for(var g=a=o,S=0;S<g.length;S++){var b=g[S];b()}return h}function m(h){if(typeof h!="function")throw new Error(R(10));s=h,d({type:Qe.REPLACE})}function p(){var h,g=f;return h={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(R(11));function x(){b.next&&b.next(l())}x();var E=g(x);return{unsubscribe:E}}},h[Dn]=function(){return this},h}return d({type:Qe.INIT}),n={dispatch:d,subscribe:f,getState:l,replaceReducer:m},n[Dn]=p,n}function Zs(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:Qe.INIT});if(typeof n>"u")throw new Error(R(12));if(typeof r(void 0,{type:Qe.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(R(13))})}function Mn(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var s=e[n];typeof t[s]=="function"&&(r[s]=t[s])}var i=Object.keys(r),a,o;try{Zs(r)}catch(u){o=u}return function(c,l){if(c===void 0&&(c={}),o)throw o;if(0)var f;for(var d=!1,m={},p=0;p<i.length;p++){var h=i[p],g=r[h],S=c[h],b=g(S,l);if(typeof b>"u"){var x=l&&l.type;throw new Error(R(14))}m[h]=b,d=d||b!==S}return d=d||i.length!==Object.keys(c).length,d?m:c}}function ye(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,s){return function(){return n(s.apply(void 0,arguments))}})}function Nn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var s=n.apply(void 0,arguments),i=function(){throw new Error(R(15))},a={getState:s.getState,dispatch:function(){return i.apply(void 0,arguments)}},o=e.map(function(u){return u(a)});return i=ye.apply(void 0,o)(s.dispatch),Kt(Kt({},s),{},{dispatch:i})}}}function Un(t){var e=function(n){var s=n.dispatch,i=n.getState;return function(a){return function(o){return typeof o=="function"?o(s,i,t):a(o)}}};return e}var Fn=Un();Fn.withExtraArgument=Un;var zt=Fn;var Vn=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),ei=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(i=c[0]&2?s.return:c[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,c[1])).done)return i;switch(s=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,s=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1],i=c;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(c);break}i[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],s=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ge=function(t,e){for(var r=0,n=e.length,s=t.length;r<n;r++,s++)t[s]=e[r];return t},ti=Object.defineProperty,ri=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,jn=Object.getOwnPropertySymbols,si=Object.prototype.hasOwnProperty,ii=Object.prototype.propertyIsEnumerable,qn=function(t,e,r){return e in t?ti(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},J=function(t,e){for(var r in e||(e={}))si.call(e,r)&&qn(t,r,e[r]);if(jn)for(var n=0,s=jn(e);n<s.length;n++){var r=s[n];ii.call(e,r)&&qn(t,r,e[r])}return t},Wt=function(t,e){return ri(t,ni(e))},ai=function(t,e,r){return new Promise(function(n,s){var i=function(u){try{o(r.next(u))}catch(c){s(c)}},a=function(u){try{o(r.throw(u))}catch(c){s(c)}},o=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,a)};o((r=r.apply(t,e)).next())})};var oi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ye:ye.apply(null,arguments)},Za=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function ui(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function X(t,e){function r(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return J(J({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}var ci=(function(t){Vn(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var s=t.apply(this,r)||this;return Object.setPrototypeOf(s,e.prototype),s}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ge([void 0],r[0].concat(this)))):new(e.bind.apply(e,ge([void 0],r.concat(this))))},e})(Array),li=(function(t){Vn(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var s=t.apply(this,r)||this;return Object.setPrototypeOf(s,e.prototype),s}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ge([void 0],r[0].concat(this)))):new(e.bind.apply(e,ge([void 0],r.concat(this))))},e})(Array);function Jt(t){return U(t)?We(t,function(){}):t}function di(t){return typeof t=="boolean"}function fi(){return function(e){return pi(e)}}function pi(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,s=n===void 0?!0:n,i=t.serializableCheck,a=i===void 0?!0:i,o=t.actionCreatorCheck,u=o===void 0?!0:o,c=new ci;if(r&&(di(r)?c.push(zt):c.push(zt.withExtraArgument(r.extraArgument))),0){if(s)var l;if(a)var f;if(u)var d}return c}var Qt=!0;function Kn(t){var e=fi(),r=t||{},n=r.reducer,s=n===void 0?void 0:n,i=r.middleware,a=i===void 0?e():i,o=r.devTools,u=o===void 0?!0:o,c=r.preloadedState,l=c===void 0?void 0:c,f=r.enhancers,d=f===void 0?void 0:f,m;if(typeof s=="function")m=s;else if(ui(s))m=Mn(s);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 p=a;if(typeof p=="function"&&(p=p(e),!Qt&&!Array.isArray(p)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Qt&&p.some(function(E){return typeof E!="function"}))throw new Error("each middleware provided to configureStore must be a function");var h=Nn.apply(void 0,p),g=ye;u&&(g=oi(J({trace:!Qt},typeof u=="object"&&u)));var S=new li(h),b=S;Array.isArray(d)?b=ge([h],d):typeof d=="function"&&(b=d(S));var x=g.apply(void 0,b);return $t(m,l,x)}function Gn(t){var e={},r=[],n,s={addCase:function(i,a){var o=typeof i=="string"?i:i.type;if(!o)throw new Error("`builder.addCase` cannot be called with an empty action type");if(o in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[o]=a,s},addMatcher:function(i,a){return r.push({matcher:i,reducer:a}),s},addDefaultCase:function(i){return n=i,s}};return t(s),[e,r,n]}function hi(t){return typeof t=="function"}function mi(t,e,r,n){r===void 0&&(r=[]);var s=typeof e=="function"?Gn(e):[e,r,n],i=s[0],a=s[1],o=s[2],u;if(hi(t))u=function(){return Jt(t())};else{var c=Jt(t);u=function(){return c}}function l(f,d){f===void 0&&(f=u());var m=ge([i[d.type]],a.filter(function(p){var h=p.matcher;return h(d)}).map(function(p){var h=p.reducer;return h}));return m.filter(function(p){return!!p}).length===0&&(m=[o]),m.reduce(function(p,h){if(h)if(V(p)){var g=p,S=h(g,d);return S===void 0?p:S}else{if(U(p))return We(p,function(b){return h(b,d)});var S=h(p,d);if(S===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return p},f)}return l.getInitialState=u,l}function vi(t,e){return t+"/"+e}function $n(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Jt(t.initialState),n=t.reducers||{},s=Object.keys(n),i={},a={},o={};s.forEach(function(l){var f=n[l],d=vi(e,l),m,p;"reducer"in f?(m=f.reducer,p=f.prepare):m=f,i[l]=m,a[d]=m,o[l]=p?X(d,p):X(d)});function u(){var l=typeof t.extraReducers=="function"?Gn(t.extraReducers):[t.extraReducers],f=l[0],d=f===void 0?{}:f,m=l[1],p=m===void 0?[]:m,h=l[2],g=h===void 0?void 0:h,S=J(J({},d),a);return mi(r,function(b){for(var x in S)b.addCase(x,S[x]);for(var E=0,$=p;E<$.length;E++){var H=$[E];b.addMatcher(H.matcher,H.reducer)}g&&b.addDefaultCase(g)})}var c;return{name:e,reducer:function(l,f){return c||(c=u()),c(l,f)},actions:o,caseReducers:i,getInitialState:function(){return c||(c=u()),c.getInitialState()}}}var yi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",gi=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=yi[Math.random()*64|0];return e},Si=["name","message","stack","code"],Yt=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Bn=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),bi=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=Si;r<n.length;r++){var s=n[r];typeof t[s]=="string"&&(e[s]=t[s])}return e}return{message:String(t)}},no=(function(){function t(e,r,n){var s=X(e+"/fulfilled",function(l,f,d,m){return{payload:l,meta:Wt(J({},m||{}),{arg:d,requestId:f,requestStatus:"fulfilled"})}}),i=X(e+"/pending",function(l,f,d){return{payload:void 0,meta:Wt(J({},d||{}),{arg:f,requestId:l,requestStatus:"pending"})}}),a=X(e+"/rejected",function(l,f,d,m,p){return{payload:m,error:(n&&n.serializeError||bi)(l||"Rejected"),meta:Wt(J({},p||{}),{arg:d,requestId:f,rejectedWithValue:!!m,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"})}}),o=!1,u=typeof AbortController<"u"?AbortController:(function(){function l(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return l.prototype.abort=function(){},l})();function c(l){return function(f,d,m){var p=n?.idGenerator?n.idGenerator(l):gi(),h=new u,g,S=!1;function b(E){g=E,h.abort()}var x=(function(){return ai(this,null,function(){var E,$,H,Ce,vr,Oe,yr;return ei(this,function(le){switch(le.label){case 0:return le.trys.push([0,4,,5]),Ce=(E=n?.condition)==null?void 0:E.call(n,l,{getState:d,extra:m}),Ai(Ce)?[4,Ce]:[3,2];case 1:Ce=le.sent(),le.label=2;case 2:if(Ce===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,vr=new Promise(function(N,we){return h.signal.addEventListener("abort",function(){return we({name:"AbortError",message:g||"Aborted"})})}),f(i(p,l,($=n?.getPendingMeta)==null?void 0:$.call(n,{requestId:p,arg:l},{getState:d,extra:m}))),[4,Promise.race([vr,Promise.resolve(r(l,{dispatch:f,getState:d,extra:m,requestId:p,signal:h.signal,abort:b,rejectWithValue:function(N,we){return new Yt(N,we)},fulfillWithValue:function(N,we){return new Bn(N,we)}})).then(function(N){if(N instanceof Yt)throw N;return N instanceof Bn?s(N.payload,p,l,N.meta):s(N,p,l)})])];case 3:return H=le.sent(),[3,5];case 4:return Oe=le.sent(),H=Oe instanceof Yt?a(null,p,l,Oe.payload,Oe.meta):a(Oe,p,l),[3,5];case 5:return yr=n&&!n.dispatchConditionRejection&&a.match(H)&&H.meta.condition,yr||f(H),[2,H]}})})})();return Object.assign(x,{abort:b,requestId:p,arg:l,unwrap:function(){return x.then(Ei)}})}}return Object.assign(c,{pending:i,rejected:a,fulfilled:s,typePrefix:e})}return t.withTypes=function(){return t},t})();function Ei(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ai(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var zn="listener",Wn="completed",Qn="cancelled",so="task-"+Qn,io="task-"+Wn,ao=zn+"-"+Qn,oo=zn+"-"+Wn;var Xt="listenerMiddleware";var uo=X(Xt+"/add"),co=X(Xt+"/removeAll"),lo=X(Xt+"/remove");var Hn,fo=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Hn||(Hn=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},xi=function(t){return function(e){setTimeout(e,t)}},po=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:xi(10);Tn();var Ci=je(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),Ye=class extends Ci(Object){};window.ftReduxStores||(window.ftReduxStores={});var Yn=class t extends Ye{static get(e){var r;let n=typeof e=="string"?e:e.name,s=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(Ke(i))return i;if(s==null)return;let a=$n({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),o=Kn({reducer:(u,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let l=Te(a.getInitialState());for(let f of c.keeping)l[f]=(u??l)[f];return l}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...c.overwrites};return a.reducer(u,c)}});return window.ftReduxStores[s.name]=new t(a,o,s.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new qe;let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,o)=>{let u=a,c=i[u];return c?(...l)=>{let f=c(...l.map(s));return this.reduxStore.dispatch(f),f}:l=>{let f=u,d=this.getState()[f];de(d,l)||this.setState({[f]:s(l)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Je=class{static format(e,r,n,s,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(e,r,n,s,!!i)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,s,i){let a=typeof e=="string"?new Date(e):e,o=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(a),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return i?u:s?`${o} ${u}`:o}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Xe=y(O()),Oi="ft-app-info",ne=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ne.eventName="authentication-change";var Pe=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Pe.eventName="ui-locale-changed";var wi={session:(t,e)=>{(0,Xe.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>v.dispatchEvent(new ne(e.payload)),0))}},v=Xe.FtReduxStore.get({name:Oi,reducers:wi,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Jn=y(O()),Ze=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(i=(s<3?a(i):s>3?a(e,r,i):a(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},Bo=(0,Jn.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(v)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(o=>o.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?o=>Je.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ze([(0,Zt.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Ze([(0,Zt.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Ze([_t({store:v.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],e.prototype,"metadataDescriptors",void 0),Ze([_t({store:v.name})],e.prototype,"uiLocale",void 0),e});var st=y(O());var er=y(O());var se=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=v.getState(),s=e??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let s=v.subscribe(()=>{n=t.get(e),n&&(s(),r(n))})}})}};var Se=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:se.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):se.await()}};var I=class extends Se{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(i,a)=>typeof a!="object"||a==null||Array.isArray(a)?a:Object.fromEntries(Object.entries(a).sort(([o],[u])=>o.localeCompare(u)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new er.CacheRegistry,this.cache=e?s.commonCache:new er.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var et=class extends I{async listMySearches(){let{session:e}=v.getState();return Tt(e,w.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var tt=class extends I{async listMyBookmarks(){let e=v.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var rt=class extends I{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=v.getState().session;return!!e?.sessionAuthenticated}};var nt=class extends I{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=v.getState().session;return!!e?.sessionAuthenticated}};var Ti="ft-user-assets",Ri={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(P).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:s}=e.payload;rr(t,r,[...tr(t,r),s]),Xn(t,r,1,n),Zn(t,s)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;rr(t,r,tr(t,r).map(s=>s.id===n.id?n:s)),Zn(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:s}=e.payload;rr(t,r,tr(t,r).filter(i=>i.id!==s)),Xn(t,r,-1,n)}},es={[P.SEARCHES]:"savedSearches",[P.BOOKMARKS]:"bookmarks",[P.BOOKS]:void 0,[P.COLLECTIONS]:void 0},tr=(t,e)=>{var r;let n=es[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},rr=(t,e,r)=>{let n=es[e];n&&(t[n]=r)},Xn=(t,e,r,n)=>{let s=t.assetCounts.allAsset[e];if(s!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,s+r),e===P.BOOKMARKS&&n)){let i=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},Zn=(t,e)=>{let r=t.assetLabels.map(s=>s.title),n=e.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));t.assetLabels.push(...n)},_=st.FtReduxStore.get({name:Ti,reducers:Ri,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(P).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),nr=class{constructor(e=new rt,r=new nt){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=v.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new tt,this.savedSearchesService=new et,v.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=v.getState();(0,st.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),_.actions.clearAssetCount(),_.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();_.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();_.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&_.getState().assetCounts.allAsset[e]!==r.count&&_.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&_.getState().assetCounts.bookmarkByMap[e]!==r.count&&_.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(_.getState().assetCounts.bookmarkByMap).length!==0;e===P.BOOKMARKS&&r&&_.actions.clearBookmarkCountByMap(),_.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;_.actions.bookmarks(r)}}},_i=new nr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=_i);var sr=class{addCommand(e,r=!1){v.commands.add(e,r)}consumeCommand(e){return v.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new sr;var M=y(O());var ts,be=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Ii=Symbol("clearAfterUnitTest"),it=class extends(0,M.withEventBus)(I){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ts]=()=>{this.defaultMessages={},this.cache=new M.CacheRegistry,this.listeners={}},this.currentUiLocale=v.getState().uiLocale,v.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=v.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,M.deepEqual)(this.defaultMessages[e],s)||(this.defaultMessages[e]=s,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var s;let i=e.toLowerCase(),a=this.resolveContext(i);return new M.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},a).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(s){!(s instanceof M.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var s;return(s=this.listeners[e])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new be({loadedContexts:e})),this.dispatchEvent(new be({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new be({loadedContexts:[e]})),this.dispatchEvent(new be({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,M.delay)(0).then(()=>n()).catch(()=>null)))}};ts=Ii;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends it{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends it{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Ee=window.FluidTopicsI18nService,at=window.FluidTopicsCustomI18nService;var rs=y(O()),ir=class{highlightHtml(e,r,n){(0,rs.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new ir;var ns=y(O());var ar=class{isDate(e){var r,n,s,i;return(i=(s=((n=(r=v.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===e))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1}format(e,r){var n,s,i,a;if(e==null)return"";try{return ns.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:v.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(a=r?.onlyTime)!==null&&a!==void 0?a:!1)}catch(o){throw console.error(`Date ${JSON.stringify(e)} is not valid`,o),o}}};window.FluidTopicsDateService=new ar;var ss=y(O());var De=class{static get(e,r){var n,s,i,a;let o=v.getState(),{lang:u,region:c}=(i=(s=(n=o.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ss.SearchPlaceConverter(o.baseUrl,e??20,(a=o.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed,r??`${u}-${c}`)}};var or=class{urlToSearchRequest(e){return De.get().parse(e)}searchRequestToUrl(e){return De.get().serialize(e)}};window.FluidTopicsUrlService=new or;var K=y(O());var ie=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};ie.eventName="change";var ur=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},is=new ur;var ot=class t extends K.WithEventBus{static build(){return new t(window.history,is,()=>window.location,!1)}constructor(e,r,n,s){var i,a;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(a=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&a!==void 0?a:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,K.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ie(this.currentItem())),0)}installProxies(){let e=r=>(n,s,[i,a,o])=>{let u=r(),c={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof o=="string"?o:(o??this.windowLocation()).href};n.apply(s,[c,a,o]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(ie.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(ie.eventName,e)}currentItem(){return(0,K.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,K.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,K.deepCopy)(r.find(n=>e(n)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,K.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let s=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ot.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var as=y(z());var os=as.css`
|
|
2
|
-
`;var
|
|
1
|
+
"use strict";(()=>{var Hs=Object.create;var br=Object.defineProperty;var $s=Object.getOwnPropertyDescriptor;var Ks=Object.getOwnPropertyNames;var zs=Object.getPrototypeOf,Gs=Object.prototype.hasOwnProperty;var Me=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Ws=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ks(t))!Gs.call(e,s)&&s!==r&&br(e,s,{get:()=>t[s],enumerable:!(n=$s(t,s))||n.enumerable});return e};var f=(e,t,r)=>(r=e!=null?Hs(zs(e)):{},Ws(t||!e||!e.__esModule?br(r,"default",{value:e,enumerable:!0}):r,e));var b=Me((ca,_r)=>{_r.exports=ftGlobals.wcUtils});var Q=Me((ua,xr)=>{xr.exports=ftGlobals.lit});var q=Me((la,Cr)=>{Cr.exports=ftGlobals.litDecorators});var Ds=Me((zl,Ms)=>{Ms.exports=ftGlobals.litRepeat});var Vs=f(b());var Ot=f(Q());var ye=f(b()),gr=f(q());var Mt;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(Mt||(Mt={}));var oe=f(b());var Qs=f(b());var wr;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(wr||(wr={}));var Tr;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Tr||(Tr={}));var Or;(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"})(Or||(Or={}));var Rr;(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"})(Rr||(Rr={}));var Ir;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ir||(Ir={}));var kr;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(kr||(kr={}));var Mr;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Mr||(Mr={}));var Dr;(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"})(Dr||(Dr={}));var Nr;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Nr||(Nr={}));var Lr;(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"})(Lr||(Lr={}));var Pr;(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"})(Pr||(Pr={}));var Ur;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ur||(Ur={}));var Fr;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Fr||(Fr={}));var jr;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(jr||(jr={}));var Vr;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Vr||(Vr={}));var Br;(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"})(Br||(Br={}));var Dt;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Dt||(Dt={}));var qr;(function(e){e.ASC="ASC",e.DESC="DESC"})(qr||(qr={}));var Hr;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Hr||(Hr={}));var Nt;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Nt||(Nt={}));var $r;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})($r||($r={}));var Kr;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Kr||(Kr={}));var zr;(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"})(zr||(zr={}));var Gr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Gr||(Gr={}));var Wr;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Wr||(Wr={}));var Lt;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Lt||(Lt={}));var Qr;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Qr||(Qr={}));var x;(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"})(x||(x={}));var U;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(U||(U={}));var Yr;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Yr||(Yr={}));var Xr;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Xr||(Xr={}));var Jr;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Jr||(Jr={}));var Zr;(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.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Zr||(Zr={}));var en;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(en||(en={}));var tn;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(tn||(tn={}));var rn;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(rn||(rn={}));var nn;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(nn||(nn={}));var sn;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(sn||(sn={}));var an;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(an||(an={}));var on;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(on||(on={}));var cn;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(cn||(cn={}));var Ys={[x.PERSONAL_BOOK_SHARE_USER]:[x.PERSONAL_BOOK_USER],[x.HTML_EXPORT_USER]:[x.PERSONAL_BOOK_USER],[x.PDF_EXPORT_USER]:[x.PERSONAL_BOOK_USER],[x.KHUB_ADMIN]:[x.CONTENT_PUBLISHER],[x.ADMIN]:[x.KHUB_ADMIN,x.USERS_ADMIN,x.PORTAL_ADMIN,x.BEHAVIOR_DATA_USER],[x.GENERATIVE_AI_EXPORT_USER]:[x.GENERATIVE_AI_USER]};function un(e,t){return e===t||(Ys[e]??[]).some(r=>un(r,t))}function Pt(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>un(n,t))}var sr=f(q());var ln=f(q(),1);var Ut=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function dn(e,t){return(0,ln.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Se(e);try{return JSON.parse(r)}catch{return Se(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ee,...t??{}})}function Xs(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!ce(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!ce(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=a=>Object.keys(a).filter(o=>a[o]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let a=i[n];if(!ce(e[a],t[a]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function ce(e,t){try{return Xs(e,t)}catch{return!1}}function Ee(e,t){return!ce(e,t)}function Se(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function De(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var pn=f(q(),1);var Ft=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:Ee,attribute:!1,...t};(0,pn.property)(i)(r,n);let a=r.constructor;a.reduxProperties=new Map(a.reduxProperties),a.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(o=>o[n]),store:t.store})}};var Ne=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var J=f(q(),1);var Le=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let a of n)try{await a()}catch(o){s(o);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var fn=f(Q(),1);var Pe=globalThis,Js=Pe.ShadowRoot&&(Pe.ShadyCSS===void 0||Pe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var hn=(e,t)=>{if(Js)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),s=Pe.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,e.appendChild(n)}};var Ue=class extends fn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return hn(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Ut(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function mn(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var le=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},En,yn=Symbol("constructorPrototype"),gn=Symbol("constructorName"),vn=Symbol("exportpartsDebouncer"),Sn=Symbol("dynamicDependenciesLoaded"),ue=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ue.eventName="exportparts-updated";var H=class extends Ue{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[En]=new Le(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[vn].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.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[gn]=this.constructor.name,this[yn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[gn]&&Object.setPrototypeOf(this,this[yn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[Sn]||(r[Sn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ue.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ue.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 ue)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=mn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,s,i,a,o;let c=p=>p!=null&&p.trim().length>0,u=t.filter(c).map(p=>p.trim());if(u.length===0){this.exportparts=void 0;return}let l=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(i=(s=p.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&i!==void 0?i:[],_=(o=(a=p.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(y=>y.split(":")[1]))!==null&&o!==void 0?o:[],w=[...g,..._].filter(c).map(y=>y.trim());for(let y of w)l.add(y)}if(l.size===0){this.exportparts=void 0;return}let d=[...l.values()].flatMap(p=>u.map(g=>`${p}:${g}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};En=vn;le([(0,J.property)()],H.prototype,"exportpartsPrefix",void 0);le([dn([])],H.prototype,"exportpartsPrefixes",void 0);le([(0,J.property)({reflect:!0})],H.prototype,"exportparts",void 0);le([(0,J.property)()],H.prototype,"customStylesheet",void 0);le([(0,J.property)()],H.prototype,"elementToFocus",void 0);le([(0,J.state)()],H.prototype,"useAdoptedStyleSheets",void 0);function Fe(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var ve=Symbol("internalReduxEventsUnsubscribers"),Y=Symbol("internalStoresUnsubscribers"),Z=Symbol("internalStores"),Zs=De(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(a){super.willUpdate(a),[...this.reduxConstructor.reduxReactiveProperties].some(o=>a.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Z].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Z].values()][0]}getStore(a){return a==null?this.getUnnamedStore():this[Z].get(a)}addStore(a,o){var c;o=(c=o??a.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(o),this[Z].set(o,a),this.subscribeToStore(o,a),this.updateFromStores()}removeStore(a){let o=typeof a=="string"?a:a.name;this.unsubscribeFromStore(o),this[Z].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Z].forEach((a,o)=>this.subscribeToStore(o,a)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((a,o)=>{let c=this.constructor.getPropertyOptions(o);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:o)){let u=this.getStore(a.store);u&&(a.store?this[Y].has(a.store):this[Y].size>0)&&(this[o]=a.selector(u.getState(),this))}})}subscribeToStore(a,o){var c;this[Y].set(a,o.subscribe(()=>this.updateFromStores())),this[ve].set(a,[]),Fe(o)&&o.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((u,l)=>{if(typeof this[l]=="function"&&(!u.store||o.name===u.store)){let d=p=>this[l](p);o.addEventListener(u.eventName,d),this[ve].get(a).push(()=>o.removeEventListener(u.eventName,d))}})),this.onStoreAvailable(a)}unsubscribeFromStores(){this[Y].forEach((a,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(a){var o;this[Y].has(a)&&this[Y].get(a)(),this[Y].delete(a),(o=this[ve].get(a))===null||o===void 0||o.forEach(c=>c()),this[ve].delete(a)}onStoreAvailable(a){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Y,r=Z,n=ve,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),An=class extends Zs(H){};function O(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 ei=typeof Symbol=="function"&&Symbol.observable||"@@observable",bn=ei,jt=()=>Math.random().toString(36).substring(7).split("").join("."),ti={INIT:`@@redux/INIT${jt()}`,REPLACE:`@@redux/REPLACE${jt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${jt()}`},je=ti;function Ve(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Vt(e,t,r){if(typeof e!="function")throw new Error(O(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(O(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(O(1));return r(Vt)(e,t)}let n=e,s=t,i=new Map,a=i,o=0,c=!1;function u(){a===i&&(a=new Map,i.forEach((y,T)=>{a.set(T,y)}))}function l(){if(c)throw new Error(O(3));return s}function d(y){if(typeof y!="function")throw new Error(O(4));if(c)throw new Error(O(5));let T=!0;u();let N=o++;return a.set(N,y),function(){if(T){if(c)throw new Error(O(6));T=!1,u(),a.delete(N),i=null}}}function p(y){if(!Ve(y))throw new Error(O(7));if(typeof y.type>"u")throw new Error(O(8));if(typeof y.type!="string")throw new Error(O(17));if(c)throw new Error(O(9));try{c=!0,s=n(s,y)}finally{c=!1}return(i=a).forEach(N=>{N()}),y}function g(y){if(typeof y!="function")throw new Error(O(10));n=y,p({type:je.REPLACE})}function _(){let y=d;return{subscribe(T){if(typeof T!="object"||T===null)throw new Error(O(11));function N(){let S=T;S.next&&S.next(l())}return N(),{unsubscribe:y(N)}},[bn](){return this}}}return p({type:je.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:g,[bn]:_}}function ri(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:je.INIT})>"u")throw new Error(O(12));if(typeof r(void 0,{type:je.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(O(13))})}function _n(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}let n=Object.keys(r),s,i;try{ri(r)}catch(a){i=a}return function(o={},c){if(i)throw i;let u=!1,l={};for(let d=0;d<n.length;d++){let p=n[d],g=r[p],_=o[p],w=g(_,c);if(typeof w>"u"){let y=c&&c.type;throw new Error(O(14))}l[p]=w,u=u||w!==_}return u=u||n.length!==Object.keys(o).length,u?l:o}}function Ae(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function xn(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(O(15))},a={getState:s.getState,dispatch:(c,...u)=>i(c,...u)},o=e.map(c=>c(a));return i=Ae(...o)(s.dispatch),{...s,dispatch:i}}}function Cn(e){return Ve(e)&&"type"in e&&typeof e.type=="string"}var Nn=Symbol.for("immer-nothing"),wn=Symbol.for("immer-draftable"),I=Symbol.for("immer-state");function j(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var L=Object,pe=L.getPrototypeOf,$e="constructor",Ye="prototype",$t="configurable",Ke="enumerable",qe="writable",be="value",$=e=>!!e&&!!e[I];function P(e){return e?Ln(e)||Je(e)||!!e[wn]||!!e[$e]?.[wn]||Ze(e)||et(e):!1}var ni=L[Ye][$e].toString(),Tn=new WeakMap;function Ln(e){if(!e||!Jt(e))return!1;let t=pe(e);if(t===null||t===L[Ye])return!0;let r=L.hasOwnProperty.call(t,$e)&&t[$e];if(r===Object)return!0;if(!de(r))return!1;let n=Tn.get(r);return n===void 0&&(n=Function.toString.call(r),Tn.set(r,n)),n===ni}function Xe(e,t,r=!0){Ce(e)===0?(r?Reflect.ownKeys(e):L.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Ce(e){let t=e[I];return t?t.type_:Je(e)?1:Ze(e)?2:et(e)?3:0}var Bt=(e,t,r=Ce(e))=>r===2?e.has(t):L[Ye].hasOwnProperty.call(e,t),Kt=(e,t,r=Ce(e))=>r===2?e.get(t):e[t],ze=(e,t,r,n=Ce(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function si(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Je=Array.isArray,Ze=e=>e instanceof Map,et=e=>e instanceof Set,Jt=e=>typeof e=="object",de=e=>typeof e=="function",qt=e=>typeof e=="boolean";function ii(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var K=e=>e.copy_||e.base_;var Zt=e=>e.modified_?e.copy_:e.base_;function zt(e,t){if(Ze(e))return new Map(e);if(et(e))return new Set(e);if(Je(e))return Array[Ye].slice.call(e);let r=Ln(e);if(t===!0||t==="class_only"&&!r){let n=L.getOwnPropertyDescriptors(e);delete n[I];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let a=s[i],o=n[a];o[qe]===!1&&(o[qe]=!0,o[$t]=!0),(o.get||o.set)&&(n[a]={[$t]:!0,[qe]:!0,[Ke]:o[Ke],[be]:e[a]})}return L.create(pe(e),n)}else{let n=pe(e);if(n!==null&&r)return{...e};let s=L.create(n);return L.assign(s,e)}}function er(e,t=!1){return tt(e)||$(e)||!P(e)||(Ce(e)>1&&L.defineProperties(e,{set:Be,add:Be,clear:Be,delete:Be}),L.freeze(e),t&&Xe(e,(r,n)=>{er(n,!0)},!1)),e}function ai(){j(2)}var Be={[be]:ai};function tt(e){return e===null||!Jt(e)?!0:L.isFrozen(e)}var Ge="MapSet",Gt="Patches",On="ArrayMethods",Pn={};function ee(e){let t=Pn[e];return t||j(0,e),t}var Rn=e=>!!Pn[e];var _e,Un=()=>_e,oi=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Rn(Ge)?ee(Ge):void 0,arrayMethodsPlugin_:Rn(On)?ee(On):void 0});function In(e,t){t&&(e.patchPlugin_=ee(Gt),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Wt(e){Qt(e),e.drafts_.forEach(ci),e.drafts_=null}function Qt(e){e===_e&&(_e=e.parent_)}var kn=e=>_e=oi(_e,e);function ci(e){let t=e[I];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Mn(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[I].modified_&&(Wt(t),j(4)),P(e)&&(e=Dn(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[I].base_,e,t)}else e=Dn(t,r);return ui(t,e,!0),Wt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Nn?e:void 0}function Dn(e,t){if(tt(t))return t;let r=t[I];if(!r)return We(t,e.handledSet_,e);if(!rt(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Vn(r,e)}return r.copy_}function ui(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&er(t,r)}function Fn(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var rt=(e,t)=>e.scope_===t,li=[];function jn(e,t,r,n){let s=K(e),i=e.type_;if(n!==void 0&&Kt(s,n,i)===t){ze(s,n,r,i);return}if(!e.draftLocations_){let o=e.draftLocations_=new Map;Xe(s,(c,u)=>{if($(u)){let l=o.get(u)||[];l.push(c),o.set(u,l)}})}let a=e.draftLocations_.get(t)??li;for(let o of a)ze(s,o,r,i)}function di(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!rt(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let a=Zt(i);jn(e,i.draft_??i,a,r),Vn(i,s)})}function Vn(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}Fn(e)}}function pi(e,t,r){let{scope_:n}=e;if($(r)){let s=r[I];rt(s,n)&&s.callbacks_.push(function(){He(e);let a=Zt(s);jn(e,r,a,t)})}else P(r)&&e.callbacks_.push(function(){let i=K(e);e.type_===3?i.has(r)&&We(r,n.handledSet_,n):Kt(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&We(Kt(e.copy_,t,e.type_),n.handledSet_,n)})}function We(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||$(e)||t.has(e)||!P(e)||tt(e)||(t.add(e),Xe(e,(n,s)=>{if($(s)){let i=s[I];if(rt(i,r)){let a=Zt(i);ze(e,n,a,e.type_),Fn(i)}}else P(s)&&We(s,t,r)})),e}function hi(e,t){let r=Je(e),n={type_:r?1:0,scope_:t?t.scope_:Un(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=Qe;r&&(s=[n],i=xe);let{revoke:a,proxy:o}=Proxy.revocable(s,i);return n.draft_=o,n.revoke_=a,[o,n]}var Qe={get(e,t){if(t===I)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=K(e);if(!Bt(s,t,e.type_))return mi(e,s,t);let i=s[t];if(e.finalized_||!P(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&ii(t))return i;if(i===Ht(e.base_,t)||fi(e,t,i)){He(e);let a=e.type_===1?+t:t,o=Xt(e.scope_,i,e,a);return e.copy_[a]=o}return i},has(e,t){return t in K(e)},ownKeys(e){return Reflect.ownKeys(K(e))},set(e,t,r){let n=Bn(K(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=Ht(K(e),t),i=s?.[I];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(si(r,s)&&(r!==void 0||Bt(e.base_,t,e.type_)))return!0;He(e),Yt(e)}return e.copy_[t]===r&&(r!==void 0||Bt(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),pi(e,t,r)),!0},deleteProperty(e,t){return He(e),Ht(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Yt(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=K(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[qe]:!0,[$t]:e.type_!==1||t!=="length",[Ke]:n[Ke],[be]:r[t]}},defineProperty(){j(11)},getPrototypeOf(e){return pe(e.base_)},setPrototypeOf(){j(12)}},xe={};for(let e in Qe){let t=Qe[e];xe[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}xe.deleteProperty=function(e,t){return xe.set.call(this,e,t,void 0)};xe.set=function(e,t,r){return Qe.set.call(this,e[0],t,r,e[0])};function Ht(e,t){let r=e[I];return(r?K(r):e)[t]}function fi(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!P(r)||r[I]?!1:e.baseRefs_.has(r)}function mi(e,t,r){let n=Bn(t,r);return n?be in n?n[be]:n.get?.call(e.draft_):void 0}function Bn(e,t){if(!(t in e))return;let r=pe(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=pe(r)}}function Yt(e){e.modified_||(e.modified_=!0,e.parent_&&Yt(e.parent_))}function He(e){e.copy_||(e.assigned_=new Map,e.copy_=zt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var yi=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(de(t)&&!de(r)){let i=r;r=t;let a=this;return function(c=i,...u){return a.produce(c,l=>r.call(this,l,...u))}}de(r)||j(6),n!==void 0&&!de(n)&&j(7);let s;if(P(t)){let i=kn(this),a=Xt(i,t,void 0),o=!0;try{s=r(a),o=!1}finally{o?Wt(i):Qt(i)}return In(i,n),Mn(s,i)}else if(!t||!Jt(t)){if(s=r(t),s===void 0&&(s=t),s===Nn&&(s=void 0),this.autoFreeze_&&er(s,!0),n){let i=[],a=[];ee(Gt).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:a}),n(i,a)}return s}else j(1,t)},this.produceWithPatches=(t,r)=>{if(de(t))return(a,...o)=>this.produceWithPatches(a,c=>t(c,...o));let n,s;return[this.produce(t,r,(a,o)=>{n=a,s=o}),n,s]},qt(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),qt(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),qt(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){P(e)||j(8),$(e)&&(e=qn(e));let t=kn(this),r=Xt(t,e,void 0);return r[I].isManual_=!0,Qt(t),r}finishDraft(e,t){let r=e&&e[I];(!r||!r.isManual_)&&j(9);let{scope_:n}=r;return In(n,t),Mn(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=ee(Gt).applyPatches_;return $(e)?n(e,t):this.produce(e,s=>n(s,t))}};function Xt(e,t,r,n){let[s,i]=Ze(t)?ee(Ge).proxyMap_(t,r):et(t)?ee(Ge).proxySet_(t,r):hi(t,r);return(r?.scope_??Un()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?di(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:u}=c;i.modified_&&u&&u.generatePatches_(i,[],c)}),s}function qn(e){return $(e)||j(10,e),Hn(e)}function Hn(e){if(!P(e)||tt(e))return e;let t=e[I],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=zt(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=zt(e,!0);return Xe(r,(s,i)=>{ze(r,s,Hn(i))},n),t&&(t.finalized_=!1),r}var gi=new yi,tr=gi.produce;function $n(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var Kn=$n(),zn=$n;var Si=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ae:Ae.apply(null,arguments)},ao=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Ei=e=>e&&typeof e.match=="function";function X(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(z(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Cn(n)&&n.type===e,r}var Xn=class we extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,we.prototype)}static get[Symbol.species](){return we}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new we(...t[0].concat(this)):new we(...t.concat(this))}};function Gn(e){return P(e)?tr(e,()=>{}):e}function nt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function vi(e){return typeof e=="boolean"}var Ai=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},a=new Xn;return r&&(vi(r)?a.push(Kn):a.push(zn(r.extraArgument))),a},bi="RTK_autoBatch";var Wn=e=>t=>{setTimeout(t,e)},_i=(e,t)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(a),r())},i=e(s),a=setTimeout(s,t)},xi=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,a=!1,o=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?_i(window.requestAnimationFrame,100):Wn(10):e.type==="callback"?e.queueNotification:Wn(e.timeout),u=()=>{a=!1,i&&(i=!1,o.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let d=()=>s&&l(),p=n.subscribe(d);return o.add(l),()=>{p(),o.delete(l)}},dispatch(l){try{return s=!l?.meta?.[bi],i=!s,i&&(a||(a=!0,c(u))),n.dispatch(l)}finally{s=!0}}})},Ci=e=>function(r){let{autoBatch:n=!0}=r??{},s=new Xn(e);return n&&s.push(xi(typeof n=="object"?n:void 0)),s};function Jn(e){let t=Ai(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{},c;if(typeof r=="function")c=r;else if(Ve(r))c=_n(r);else throw new Error(z(1));let u;typeof n=="function"?u=n(t):u=t();let l=Ae;s&&(l=Si({trace:!1,...typeof s=="object"&&s}));let d=xn(...u),p=Ci(d),g=typeof o=="function"?o(p):p(),_=l(...g);return Vt(c,a,_)}function Zn(e){let t={},r=[],n,s={addCase(i,a){let o=typeof i=="string"?i:i.type;if(!o)throw new Error(z(28));if(o in t)throw new Error(z(29));return t[o]=a,s},addAsyncThunk(i,a){return a.pending&&(t[i.pending.type]=a.pending),a.rejected&&(t[i.rejected.type]=a.rejected),a.fulfilled&&(t[i.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:i.settled,reducer:a.settled}),s},addMatcher(i,a){return r.push({matcher:i,reducer:a}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function wi(e){return typeof e=="function"}function Ti(e,t){let[r,n,s]=Zn(t),i;if(wi(e))i=()=>Gn(e());else{let o=Gn(e);i=()=>o}function a(o=i(),c){let u=[r[c.type],...n.filter(({matcher:l})=>l(c)).map(({reducer:l})=>l)];return u.filter(l=>!!l).length===0&&(u=[s]),u.reduce((l,d)=>{if(d)if($(l)){let g=d(l,c);return g===void 0?l:g}else{if(P(l))return tr(l,p=>d(p,c));{let p=d(l,c);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},o)}return a.getInitialState=i,a}var Oi=(e,t)=>Ei(e)?e.match(t):e(t);function Ri(...e){return t=>e.some(r=>Oi(r,t))}var Ii="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ki=(e=21)=>{let t="",r=e;for(;r--;)t+=Ii[Math.random()*64|0];return t},Mi=["name","message","stack","code"],rr=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Qn=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Di=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Mi)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Yn="External signal was aborted",Ni=(()=>{function e(t,r,n){let s=X(t+"/fulfilled",(c,u,l,d)=>({payload:c,meta:{...d||{},arg:l,requestId:u,requestStatus:"fulfilled"}})),i=X(t+"/pending",(c,u,l)=>({payload:void 0,meta:{...l||{},arg:u,requestId:c,requestStatus:"pending"}})),a=X(t+"/rejected",(c,u,l,d,p)=>({payload:d,error:(n&&n.serializeError||Di)(c||"Rejected"),meta:{...p||{},arg:l,requestId:u,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function o(c,{signal:u}={}){return(l,d,p)=>{let g=n?.idGenerator?n.idGenerator(c):ki(),_=new AbortController,w,y;function T(m){y=m,_.abort()}u&&(u.aborted?T(Yn):u.addEventListener("abort",()=>T(Yn),{once:!0}));let N=(async function(){let m;try{let E=n?.condition?.(c,{getState:d,extra:p});if(Pi(E)&&(E=await E),E===!1||_.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let B=new Promise((A,C)=>{w=()=>{C({name:"AbortError",message:y||"Aborted"})},_.signal.addEventListener("abort",w,{once:!0})});l(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:p}))),m=await Promise.race([B,Promise.resolve(r(c,{dispatch:l,getState:d,extra:p,requestId:g,signal:_.signal,abort:T,rejectWithValue:((A,C)=>new rr(A,C)),fulfillWithValue:((A,C)=>new Qn(A,C))})).then(A=>{if(A instanceof rr)throw A;return A instanceof Qn?s(A.payload,g,c,A.meta):s(A,g,c)})])}catch(E){m=E instanceof rr?a(null,g,c,E.payload,E.meta):a(E,g,c)}finally{w&&_.signal.removeEventListener("abort",w)}return n&&!n.dispatchConditionRejection&&a.match(m)&&m.meta.condition||l(m),m})();return Object.assign(N,{abort:T,requestId:g,arg:c,unwrap(){return N.then(Li)}})}}return Object.assign(o,{pending:i,rejected:a,fulfilled:s,settled:Ri(a,s),typePrefix:t})}return e.withTypes=()=>e,e})();function Li(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Pi(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var es=Symbol.for("rtk-slice-createasyncthunk"),co={[es]:Ni};function Ui(e,t){return`${e}/${t}`}function Fi({creators:e}={}){let t=e?.asyncThunk?.[es];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(z(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(Vi()):n.reducers)||{},o=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(m,S){let E=typeof m=="string"?m:m.type;if(!E)throw new Error(z(12));if(E in c.sliceCaseReducersByType)throw new Error(z(13));return c.sliceCaseReducersByType[E]=S,u},addMatcher(m,S){return c.sliceMatchers.push({matcher:m,reducer:S}),u},exposeAction(m,S){return c.actionCreators[m]=S,u},exposeCaseReducer(m,S){return c.sliceCaseReducersByName[m]=S,u}};o.forEach(m=>{let S=a[m],E={reducerName:m,type:Ui(s,m),createNotation:typeof n.reducers=="function"};qi(S)?$i(E,S,u,t):Bi(E,S,u)});function l(){let[m={},S=[],E=void 0]=typeof n.extraReducers=="function"?Zn(n.extraReducers):[n.extraReducers],B={...m,...c.sliceCaseReducersByType};return Ti(n.initialState,A=>{for(let C in B)A.addCase(C,B[C]);for(let C of c.sliceMatchers)A.addMatcher(C.matcher,C.reducer);for(let C of S)A.addMatcher(C.matcher,C.reducer);E&&A.addDefaultCase(E)})}let d=m=>m,p=new Map,g=new WeakMap,_;function w(m,S){return _||(_=l()),_(m,S)}function y(){return _||(_=l()),_.getInitialState()}function T(m,S=!1){function E(A){let C=A[m];return typeof C>"u"&&S&&(C=nt(g,E,y)),C}function B(A=d){let C=nt(p,S,()=>new WeakMap);return nt(C,A,()=>{let Ar={};for(let[Bs,qs]of Object.entries(n.selectors??{}))Ar[Bs]=ji(qs,A,()=>nt(g,A,y),S);return Ar})}return{reducerPath:m,getSelectors:B,get selectors(){return B(E)},selectSlice:E}}let N={name:s,reducer:w,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:y,...T(i),injectInto(m,{reducerPath:S,...E}={}){let B=S??i;return m.inject({reducerPath:B,reducer:w},E),{...N,...T(B,!0)}}};return N}}function ji(e,t,r,n){function s(i,...a){let o=t(i);return typeof o>"u"&&n&&(o=r()),e(o,...a)}return s.unwrapped=e,s}var ts=Fi();function Vi(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Bi({type:e,reducerName:t,createNotation:r},n,s){let i,a;if("reducer"in n){if(r&&!Hi(n))throw new Error(z(17));i=n.reducer,a=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?X(e,a):X(e))}function qi(e){return e._reducerDefinitionType==="asyncThunk"}function Hi(e){return e._reducerDefinitionType==="reducerWithPrepare"}function $i({type:e,reducerName:t},r,n,s){if(!s)throw new Error(z(18));let{payloadCreator:i,fulfilled:a,pending:o,rejected:c,settled:u,options:l}=r,d=s(e,i,l);n.exposeAction(t,d),a&&n.addCase(d.fulfilled,a),o&&n.addCase(d.pending,o),c&&n.addCase(d.rejected,c),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:a||st,pending:o||st,rejected:c||st,settled:u||st})}function st(){}var rs="listener",ns="completed",ss="cancelled",uo=`task-${ss}`,lo=`task-${ns}`,po=`${rs}-${ss}`,ho=`${rs}-${ns}`;var{assign:is}=Object;var nr="listenerMiddleware";var Ki=is(X(`${nr}/add`),{withTypes:()=>Ki}),fo=X(`${nr}/removeAll`),zi=is(X(`${nr}/remove`),{withTypes:()=>zi});function z(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Gi=De(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),it=class extends Gi(Object){};window.ftReduxStores||(window.ftReduxStores={});var as=class e extends it{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Fe(i))return i;if(s==null)return;let a=ts({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),o=Jn({reducer:(c,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let l=Se(a.getInitialState());for(let d of u.keeping)l[d]=(c??l)[d];return l}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...u.overwrites};return a.reducer(c,u)}});return window.ftReduxStores[s.name]=new e(a,o,s.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Ne,this.injectInto=(i,a)=>this.reduxSlice.injectInto(i,a),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,o)=>{let c=a,u=i[c];return u?(...l)=>{let d=u(...l.map(s));return this.reduxStore.dispatch(d),d}:l=>{let d=c,p=this.getState()[d];ce(p,l)||this.setState({[d]:s(l)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var at=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let a=typeof t=="string"?new Date(t):t,o=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(a),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return i?c:s?`${o} ${c}`:o}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var ot=f(b()),Wi="ft-app-info",te=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};te.eventName="authentication-change";var Te=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Te.eventName="ui-locale-changed";var Qi={session:(e,t)=>{(0,ot.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>h.dispatchEvent(new te(t.payload)),0))}},h=ot.FtReduxStore.get({name:Wi,reducers:Qi,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var os=f(b()),ct=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},$o=(0,os.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(h)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(o=>o.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?o=>at.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ct([(0,sr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ct([(0,sr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ct([Ft({store:h.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),ct([Ft({store:h.name})],t.prototype,"uiLocale",void 0),t});var ht=f(b());var ir=f(b());var re=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=h.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=h.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var he=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:re.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):re.await()}};var M=class extends he{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,a)=>typeof a!="object"||a==null||Array.isArray(a)?a:Object.fromEntries(Object.entries(a).sort(([o],[c])=>o.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new ir.CacheRegistry,this.cache=t?s.commonCache:new ir.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var ut=class extends M{async listMySearches(){let{session:t}=h.getState();return Pt(t,x.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var lt=class extends M{async listMyBookmarks(){let t=h.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var dt=class extends M{constructor(){super(...arguments),this.CACHE_DURATION=180*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=h.getState().session;return!!t?.sessionAuthenticated}};var pt=class extends M{constructor(){super(...arguments),this.CACHE_DURATION=180*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=h.getState().session;return!!t?.sessionAuthenticated}};var Yi="ft-user-assets",Xi={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(U).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:s}=t.payload;or(e,r,[...ar(e,r),s]),cs(e,r,1,n),us(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;or(e,r,ar(e,r).map(s=>s.id===n.id?n:s)),us(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;or(e,r,ar(e,r).filter(i=>i.id!==s)),cs(e,r,-1,n)}},ls={[U.SEARCHES]:"savedSearches",[U.BOOKMARKS]:"bookmarks",[U.BOOKS]:void 0,[U.COLLECTIONS]:void 0},ar=(e,t)=>{var r;let n=ls[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},or=(e,t,r)=>{let n=ls[t];n&&(e[n]=r)},cs=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===U.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},us=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},k=ht.FtReduxStore.get({name:Yi,reducers:Xi,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(U).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),cr=class{constructor(t=new dt,r=new pt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=h.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new lt,this.savedSearchesService=new ut,h.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=h.getState();(0,ht.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),k.actions.clearAssetCount(),k.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),k.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),k.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();k.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();k.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&k.getState().assetCounts.allAsset[t]!==r.count&&k.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&k.getState().assetCounts.bookmarkByMap[t]!==r.count&&k.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(k.getState().assetCounts.bookmarkByMap).length!==0;t===U.BOOKMARKS&&r&&k.actions.clearBookmarkCountByMap(),k.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;k.actions.bookmarks(r)}}},Ji=new cr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ji);var ur=class{addCommand(t,r=!1){h.commands.add(t,r)}consumeCommand(t){return h.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ur;var F=f(b());var ds,fe=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Zi=Symbol("clearAfterUnitTest"),ft=class extends(0,F.withEventBus)(M){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ds]=()=>{this.defaultMessages={},this.cache=new F.CacheRegistry,this.listeners={}},this.currentUiLocale=h.getState().uiLocale,h.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=h.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,F.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var s;let i=t.toLowerCase(),a=this.resolveContext(i);return new F.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},a).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof F.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new fe({loadedContexts:t})),this.dispatchEvent(new fe({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new fe({loadedContexts:[t]})),this.dispatchEvent(new fe({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,F.delay)(0).then(()=>n()).catch(()=>null)))}};ds=Zi;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ft{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ft{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var me=window.FluidTopicsI18nService,mt=window.FluidTopicsCustomI18nService;var ps=f(b()),lr=class{highlightHtml(t,r,n){(0,ps.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new lr;var hs=f(b());var dr=class{isDate(t){var r,n,s,i;return(i=(s=((n=(r=h.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,a;if(t==null)return"";try{return hs.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:h.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(a=r?.onlyTime)!==null&&a!==void 0?a:!1)}catch(o){throw console.error(`Date ${JSON.stringify(t)} is not valid`,o),o}}};window.FluidTopicsDateService=new dr;var fs=f(b());var Oe=class{static get(t,r){var n,s,i,a;let o=h.getState(),{lang:c,region:u}=(i=(s=(n=o.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new fs.SearchPlaceConverter(o.baseUrl,t??20,(a=o.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed,r??`${c}-${u}`)}};var pr=class{urlToSearchRequest(t){return Oe.get().parse(t)}searchRequestToUrl(t){return Oe.get().serialize(t)}};window.FluidTopicsUrlService=new pr;var G=f(b());var ne=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};ne.eventName="change";var hr=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))}},ms=new hr;var yt=class e extends G.WithEventBus{static build(){return new e(window.history,ms,()=>window.location,!1)}constructor(t,r,n,s){var i,a;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(a=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&a!==void 0?a:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,G.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ne(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,a,o])=>{let c=r(),u={...c===this.currentIndex?this.currentState:void 0,...i,index:c,href:typeof o=="string"?o:(o??this.windowLocation()).href};n.apply(s,[u,a,o]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(ne.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(ne.eventName,t)}currentItem(){return(0,G.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,G.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,G.deepCopy)(r.find(n=>t(n)))}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,G.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=yt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var ys=f(Q());var gs=ys.css`
|
|
2
|
+
`;var Es=f(Q()),D=f(q()),ae=f(b());var se=f(b());function Ss(e,t){let{authenticationRequired:r,session:n}=h.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var gt=class extends he{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var fr=class e extends se.FtStateManager{static build(t){return new e(h,t)}constructor(t,r){super(),this.store=t,this.cache=new se.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new gt,this.cleanSessionDebouncer=new se.Debouncer,this.reloadDebouncer=new se.Debouncer(500),this.apiProvider=r??(()=>re.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(te.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Ss(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Te(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},mr=fr.build();var ie=class extends Event{constructor(t,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var Re=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:s,callbackRef:i}of n){let a=s.deref(),o=i.deref();a===void 0||o===void 0||a.dispatchEvent(new ie(t.context,a,o,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,s=this.pendingContextRequests.get(t.context);s===void 0&&this.pendingContextRequests.set(t.context,s={callbacks:new WeakMap,requests:[]});let i=s.callbacks.get(r);i===void 0&&s.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var R=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},v=class extends ae.FtLitElementRedux{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.authenticationRequired=!1,this.messageContexts=[],this.stateManager=mr,this.contextRoot=new Re}render(){return Es.html`
|
|
3
3
|
<slot></slot>
|
|
4
|
-
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(
|
|
5
|
-
`;var
|
|
4
|
+
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>me.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};v.elementDefinitions={};v.styles=gs;R([(0,D.property)()],v.prototype,"baseUrl",void 0);R([(0,D.property)()],v.prototype,"tenantId",void 0);R([(0,D.property)()],v.prototype,"apiIntegrationIdentifier",void 0);R([(0,D.property)()],v.prototype,"apiIntegrationAppVersion",void 0);R([(0,D.property)()],v.prototype,"uiLocale",void 0);R([(0,ae.jsonProperty)(null)],v.prototype,"availableUiLocales",void 0);R([(0,ae.jsonProperty)(null)],v.prototype,"metadataConfiguration",void 0);R([(0,D.property)({type:Boolean})],v.prototype,"editorMode",void 0);R([(0,D.property)({type:Boolean})],v.prototype,"noCustom",void 0);R([(0,D.property)({type:Boolean})],v.prototype,"openExternalDocumentInNewTab",void 0);R([(0,D.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],v.prototype,"noCustomComponent",void 0);R([(0,D.property)({type:Boolean})],v.prototype,"withManualResources",void 0);R([(0,D.property)({type:Boolean})],v.prototype,"navigatorOnline",void 0);R([(0,D.property)({type:Boolean})],v.prototype,"forcedOffline",void 0);R([(0,D.property)({type:Boolean})],v.prototype,"authenticationRequired",void 0);R([(0,ae.jsonProperty)([])],v.prototype,"messageContexts",void 0);R([(0,ae.jsonProperty)(void 0)],v.prototype,"session",void 0);var As=f(b());var vs={"ft-app-context":v};(0,As.customElements)(vs);var St=class e extends Event{constructor(){super(e.eventName)}};St.eventName="search-context-clear-all-filters";var bs=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Sr=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},_s=Symbol("registerInterval"),yr=Symbol("registerAttempts"),ra=40,na=(0,ye.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var s,i,a;super.willUpdate(n),n.has("neededSearchRequests")&&((s=this.stateManager)===null||s===void 0||s.unregisterComponent(this,(i=n.get("neededSearchRequests"))!==null&&i!==void 0?i:[]),(a=this.stateManager)===null||a===void 0||a.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[yr]=0,this.tryToRegisterToContext(),this[_s]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[yr]>ra?window.clearInterval(this[_s]):(this[yr]++,this.dispatchEvent(new Sr))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return bs([(0,gr.state)()],t.prototype,"stateManager",void 0),bs([(0,gr.state)({hasChanged:ye.hasChanged})],t.prototype,"neededSearchRequests",void 0),t}),Et=class extends na(ye.FtLitElementRedux){};var vt=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?mt:me}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,s)=>{let i=s;return a=>({context:this.name,key:i,custom:this.custom,args:typeof a=="function"?void 0:a,argsProvider:typeof a=="function"?a:void 0})}}),this.messages=new Proxy({},{get:(n,s)=>(...i)=>this.service.resolveMessage(this.name,s,...i)}),this.rawMessages=new Proxy({},{get:(n,s)=>this.service.resolveRawMessage(this.name,s)}),this.keys=new Proxy({},{get:(n,s)=>()=>s}),this.attributes=new Proxy({},{get:(n,s)=>()=>({context:this.name,key:s,message:this.service.resolveRawMessage(this.name,s)})})}};var ge=f(b());var ws=f(q());var Er=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,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},xs=new Er;var sa=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},ia=Symbol("i18nAttributes"),aa=Symbol("i18nListAttributes"),Ts=Symbol("i18nProperties"),At=Symbol("i18nContexts"),Ie=Symbol("i18nUnsubs"),_t=(0,ge.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?mt:me}i18n(i){let{context:a,key:o,message:c}=i,{custom:u,args:l,argsProvider:d}=i;if(a&&o){this.hasI18nContext(a)||this.addI18nContext(a,void 0,u);let p=l??(d?d(this):[]);return this.getI18nService(u).resolveMessage(a,o,...p)}return c}async awaitI18n(i){let{context:a,custom:o}=i;return a&&await this.getI18nService(o).prepareContext(a),this.i18n(i)}customI18n(i,a){if(xs.isI18nKey(i)){let[o,c]=i.split(".");return this.i18n({custom:!0,context:o,key:c,...a})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((a,o,c)=>i.has(o)||typeof a.argsProvider=="function"),this.updateI18nProperties(a=>typeof a.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((a,o,c)=>{var u;return((u=c?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(a=>a.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var a,o;let c=this,u=(l,d,p)=>p?.context&&p.key&&i(l,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...l})}:p;(a=this[ia])===null||a===void 0||a.forEach((l,d)=>c[d]=u(l,d,c[d])),(o=this[aa])===null||o===void 0||o.forEach((l,d)=>{var p;return c[d]=(p=c[d])===null||p===void 0?void 0:p.map(g=>u(l,d,g))})}updateI18nProperties(i){var a;(a=this[Ts])===null||a===void 0||a.forEach((o,c)=>{i(o,c)&&(this[c]=this.i18n(o))})}addI18nMessages(i,a,o){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,a,o)}addI18nContext(i,a,o){let c=(typeof i=="string"?i:i.name).toLowerCase();o=typeof i=="string"?o:i.custom,this[At].set(c,{isCustomContext:o}),this[Ie].has(c)||this[Ie].set(c,this.getI18nService(o).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(o).prepareContext(c,a)}hasI18nContext(i){return this[At].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[At].forEach((i,a)=>this.addI18nContext(a,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ie].forEach(i=>i()),this[Ie].clear()}}return t=At,r=Ie,sa([(0,ws.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Cs=class extends _t(ge.FtLitElement){},bt=class extends _t(ge.FtLitElementRedux){};var Os=f(Q());var Rs=Os.css`
|
|
5
|
+
`;var xt=f(Q()),Ct=f(q()),wt=f(b());var ke=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},V=class extends bt{constructor(){super(),this.editorMode=!1,this.addStore(h)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":xt.nothing:xt.html`
|
|
6
6
|
<span class="ft-i18n">
|
|
7
7
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
8
8
|
</span>
|
|
9
|
-
`}update(
|
|
9
|
+
`}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};V.elementDefinitions={};V.styles=Rs;ke([(0,wt.redux)()],V.prototype,"editorMode",void 0);ke([(0,Ct.property)()],V.prototype,"context",void 0);ke([(0,Ct.property)()],V.prototype,"key",void 0);ke([(0,wt.jsonProperty)([])],V.prototype,"args",void 0);ke([(0,Ct.property)()],V.prototype,"defaultMessage",void 0);var ks=f(b());var Is={"ft-i18n":V};(0,ks.customElements)(Is);var Fs=f(Ds()),It=f(q()),kt=f(b());var Tt=vt.build("designedSearchQuickFilters"),Ns={presetsSelector:"Quick filters",noQuickFilter:"No quick filter selected"};var Ps=f(Q()),vr=f(b()),Ls={textColor:vr.designSystemVariables.colorOnSurface,colorSurface:vr.designSystemVariables.colorSurface},Us=Ps.css`
|
|
10
10
|
.ft-search-quick-filters {
|
|
11
11
|
box-sizing: border-box;
|
|
12
|
-
color: ${
|
|
13
|
-
background-color: ${
|
|
12
|
+
color: ${Ls.textColor};
|
|
13
|
+
background-color: ${Ls.colorSurface};
|
|
14
14
|
}
|
|
15
|
-
`;var
|
|
16
|
-
${this.hasPresets?
|
|
15
|
+
`;var Rt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},W=class extends _t(Et){constructor(){super(),this.presets=[],this.metadataFilters=[],this.addI18nContext(Tt,Ns),this.addStore(h)}get hasPresets(){return this.presets!=null&&this.presets.length>0}willUpdate(t){var r,n,s;if(super.update(t),t.has("selectedPresetId")){let i=((r=this.presets)!==null&&r!==void 0?r:[]).find(a=>a.name===this.selectedPresetId);if(i){(n=this.stateManager)===null||n===void 0||n.clearAllFilters();for(let a of i.filters)(s=this.stateManager)===null||s===void 0||s.setValueFilter(a.key,a.values)}}}render(){var t;return Ot.html`
|
|
16
|
+
${this.hasPresets?Ot.html`
|
|
17
17
|
<ft-select
|
|
18
18
|
class="ft-search-quick-filters--presets"
|
|
19
19
|
part="presets"
|
|
20
|
-
label="${
|
|
20
|
+
label="${Tt.messages.presetsSelector()}"
|
|
21
21
|
outlined
|
|
22
22
|
@change=${r=>this.selectedPresetId=r.detail}>
|
|
23
|
-
${(0,
|
|
23
|
+
${(0,Fs.repeat)((t=this.presets)!==null&&t!==void 0?t:[],r=>r.name,r=>Ot.html`
|
|
24
24
|
<ft-select-option value="${r.name}"
|
|
25
25
|
label="${r.name}"
|
|
26
26
|
?selected=${r.name===this.selectedPresetId}>
|
|
27
27
|
</ft-select-option>
|
|
28
28
|
`)}
|
|
29
29
|
</ft-select>
|
|
30
|
-
`:
|
|
31
|
-
`}};
|
|
30
|
+
`:Tt.messages.noQuickFilter()}
|
|
31
|
+
`}};W.styles=Us;Rt([(0,kt.jsonProperty)([])],W.prototype,"presets",void 0);Rt([(0,It.property)({type:String,reflect:!0})],W.prototype,"selectedPresetId",void 0);Rt([(0,kt.redux)({store:"search",selector:e=>e.request.contentLocale})],W.prototype,"contentLocale",void 0);Rt([(0,It.state)()],W.prototype,"metadataFilters",void 0);var js={"ft-search-quick-filters":W};(0,Vs.customElements)(js);})();
|
|
32
32
|
/*! Bundled license information:
|
|
33
33
|
|
|
34
34
|
@lit/reactive-element/css-tag.js:
|