@fluid-topics/ft-search-result-abstract 2.0.9 → 2.0.11

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,5 +1,5 @@
1
1
  "use strict";(()=>{var ci=Object.create;var so=Object.defineProperty;var li=Object.getOwnPropertyDescriptor;var di=Object.getOwnPropertyNames;var ui=Object.getPrototypeOf,pi=Object.prototype.hasOwnProperty;var it=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var fi=(r,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of di(t))!pi.call(r,i)&&i!==o&&so(r,i,{get:()=>t[i],enumerable:!(n=li(t,i))||n.enumerable});return r};var A=(r,t,o)=>(o=r!=null?ci(ui(r)):{},fi(t||!r||!r.__esModule?so(o,"default",{value:r,enumerable:!0}):o,r));var D=it((vs,co)=>{co.exports=ftGlobals.wcUtils});var ne=it((Ss,lo)=>{lo.exports=ftGlobals.lit});var te=it((Cs,uo)=>{uo.exports=ftGlobals.litDecorators});var ho=it((le,fo)=>{var xt=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,vt=function(){function r(){this.fetch=!1,this.DOMException=xt.DOMException}return r.prototype=xt,new r}();(function(r){var t=function(o){var n=typeof r<"u"&&r||typeof self<"u"&&self||typeof global<"u"&&global||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function s(f){return f&&DataView.prototype.isPrototypeOf(f)}if(i.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(f){return f&&l.indexOf(Object.prototype.toString.call(f))>-1};function u(f){if(typeof f!="string"&&(f=String(f)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(f)||f==="")throw new TypeError('Invalid character in header field name: "'+f+'"');return f.toLowerCase()}function p(f){return typeof f!="string"&&(f=String(f)),f}function h(f){var g={next:function(){var E=f.shift();return{done:E===void 0,value:E}}};return i.iterable&&(g[Symbol.iterator]=function(){return g}),g}function y(f){this.map={},f instanceof y?f.forEach(function(g,E){this.append(E,g)},this):Array.isArray(f)?f.forEach(function(g){if(g.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+g.length);this.append(g[0],g[1])},this):f&&Object.getOwnPropertyNames(f).forEach(function(g){this.append(g,f[g])},this)}y.prototype.append=function(f,g){f=u(f),g=p(g);var E=this.map[f];this.map[f]=E?E+", "+g:g},y.prototype.delete=function(f){delete this.map[u(f)]},y.prototype.get=function(f){return f=u(f),this.has(f)?this.map[f]:null},y.prototype.has=function(f){return this.map.hasOwnProperty(u(f))},y.prototype.set=function(f,g){this.map[u(f)]=p(g)},y.prototype.forEach=function(f,g){for(var E in this.map)this.map.hasOwnProperty(E)&&f.call(g,this.map[E],E,this)},y.prototype.keys=function(){var f=[];return this.forEach(function(g,E){f.push(E)}),h(f)},y.prototype.values=function(){var f=[];return this.forEach(function(g){f.push(g)}),h(f)},y.prototype.entries=function(){var f=[];return this.forEach(function(g,E){f.push([E,g])}),h(f)},i.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function m(f){if(!f._noBody){if(f.bodyUsed)return Promise.reject(new TypeError("Already read"));f.bodyUsed=!0}}function v(f){return new Promise(function(g,E){f.onload=function(){g(f.result)},f.onerror=function(){E(f.error)}})}function b(f){var g=new FileReader,E=v(g);return g.readAsArrayBuffer(f),E}function S(f){var g=new FileReader,E=v(g),N=/charset=([A-Za-z0-9_-]+)/.exec(f.type),F=N?N[1]:"utf-8";return g.readAsText(f,F),E}function w(f){for(var g=new Uint8Array(f),E=new Array(g.length),N=0;N<g.length;N++)E[N]=String.fromCharCode(g[N]);return E.join("")}function R(f){if(f.slice)return f.slice(0);var g=new Uint8Array(f.byteLength);return g.set(new Uint8Array(f)),g.buffer}function I(){return this.bodyUsed=!1,this._initBody=function(f){this.bodyUsed=this.bodyUsed,this._bodyInit=f,f?typeof f=="string"?this._bodyText=f:i.blob&&Blob.prototype.isPrototypeOf(f)?this._bodyBlob=f:i.formData&&FormData.prototype.isPrototypeOf(f)?this._bodyFormData=f:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(f)?this._bodyText=f.toString():i.arrayBuffer&&i.blob&&s(f)?(this._bodyArrayBuffer=R(f.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(f)||d(f))?this._bodyArrayBuffer=R(f):this._bodyText=f=Object.prototype.toString.call(f):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof f=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(f)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var f=m(this);if(f)return f;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var f=m(this);return f||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(i.blob)return this.blob().then(b);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var f=m(this);if(f)return f;if(this._bodyBlob)return S(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(w(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(X)}),this.json=function(){return this.text().then(JSON.parse)},this}var k=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function _(f){var g=f.toUpperCase();return k.indexOf(g)>-1?g:f}function H(f,g){if(!(this instanceof H))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');g=g||{};var E=g.body;if(f instanceof H){if(f.bodyUsed)throw new TypeError("Already read");this.url=f.url,this.credentials=f.credentials,g.headers||(this.headers=new y(f.headers)),this.method=f.method,this.mode=f.mode,this.signal=f.signal,!E&&f._bodyInit!=null&&(E=f._bodyInit,f.bodyUsed=!0)}else this.url=String(f);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new y(g.headers)),this.method=_(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal||function(){if("AbortController"in n){var T=new AbortController;return T.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&E)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(E),(this.method==="GET"||this.method==="HEAD")&&(g.cache==="no-store"||g.cache==="no-cache")){var N=/([?&])_=[^&]*/;if(N.test(this.url))this.url=this.url.replace(N,"$1_="+new Date().getTime());else{var F=/\?/;this.url+=(F.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}H.prototype.clone=function(){return new H(this,{body:this._bodyInit})};function X(f){var g=new FormData;return f.trim().split("&").forEach(function(E){if(E){var N=E.split("="),F=N.shift().replace(/\+/g," "),T=N.join("=").replace(/\+/g," ");g.append(decodeURIComponent(F),decodeURIComponent(T))}}),g}function be(f){var g=new y,E=f.replace(/\r?\n[\t ]+/g," ");return E.split("\r").map(function(N){return N.indexOf(`
2
- `)===0?N.substr(1,N.length):N}).forEach(function(N){var F=N.split(":"),T=F.shift().trim();if(T){var bt=F.join(":").trim();try{g.append(T,bt)}catch(tr){console.warn("Response "+tr.message)}}}),g}I.call(H.prototype);function j(f,g){if(!(this instanceof j))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=g.statusText===void 0?"":""+g.statusText,this.headers=new y(g.headers),this.url=g.url||"",this._initBody(f)}I.call(j.prototype),j.prototype.clone=function(){return new j(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},j.error=function(){var f=new j(null,{status:200,statusText:""});return f.ok=!1,f.status=0,f.type="error",f};var xe=[301,302,303,307,308];j.redirect=function(f,g){if(xe.indexOf(g)===-1)throw new RangeError("Invalid status code");return new j(null,{status:g,headers:{location:f}})},o.DOMException=n.DOMException;try{new o.DOMException}catch{o.DOMException=function(g,E){this.message=g,this.name=E;var N=Error(g);this.stack=N.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function ke(f,g){return new Promise(function(E,N){var F=new H(f,g);if(F.signal&&F.signal.aborted)return N(new o.DOMException("Aborted","AbortError"));var T=new XMLHttpRequest;function bt(){T.abort()}T.onload=function(){var z={statusText:T.statusText,headers:be(T.getAllResponseHeaders()||"")};F.url.indexOf("file://")===0&&(T.status<200||T.status>599)?z.status=200:z.status=T.status,z.url="responseURL"in T?T.responseURL:z.headers.get("X-Request-URL");var ve="response"in T?T.response:T.responseText;setTimeout(function(){E(new j(ve,z))},0)},T.onerror=function(){setTimeout(function(){N(new TypeError("Network request failed"))},0)},T.ontimeout=function(){setTimeout(function(){N(new TypeError("Network request timed out"))},0)},T.onabort=function(){setTimeout(function(){N(new o.DOMException("Aborted","AbortError"))},0)};function tr(z){try{return z===""&&n.location.href?n.location.href:z}catch{return z}}if(T.open(F.method,tr(F.url),!0),F.credentials==="include"?T.withCredentials=!0:F.credentials==="omit"&&(T.withCredentials=!1),"responseType"in T&&(i.blob?T.responseType="blob":i.arrayBuffer&&(T.responseType="arraybuffer")),g&&typeof g.headers=="object"&&!(g.headers instanceof y||n.Headers&&g.headers instanceof n.Headers)){var io=[];Object.getOwnPropertyNames(g.headers).forEach(function(z){io.push(u(z)),T.setRequestHeader(z,p(g.headers[z]))}),F.headers.forEach(function(z,ve){io.indexOf(ve)===-1&&T.setRequestHeader(ve,z)})}else F.headers.forEach(function(z,ve){T.setRequestHeader(ve,z)});F.signal&&(F.signal.addEventListener("abort",bt),T.onreadystatechange=function(){T.readyState===4&&F.signal.removeEventListener("abort",bt)}),T.send(typeof F._bodyInit>"u"?null:F._bodyInit)})}return ke.polyfill=!0,n.fetch||(n.fetch=ke,n.Headers=y,n.Request=H,n.Response=j),o.Headers=y,o.Request=H,o.Response=j,o.fetch=ke,o}({})})(vt);vt.fetch.ponyfill=!0;delete vt.fetch.polyfill;var Le=xt.fetch?xt:vt;le=Le.fetch;le.default=Le.fetch;le.fetch=Le.fetch;le.Headers=Le.Headers;le.Request=Le.Request;le.Response=Le.Response;fo.exports=le});var ca=it((xu,sa)=>{sa.exports=ftGlobals.litUnsafeHTML});var si=A(D());var ao=A(ne()),ai=A(D());var Yt=A(D());var Ge=A(D()),zr=A(te());var rr;(function(r){r.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(rr||(rr={}));var ft=A(D());var po=A(D());var yi=A(ho(),1);var yo;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(yo||(yo={}));var go;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(go||(go={}));var mo;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(mo||(mo={}));var bo;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(bo||(bo={}));var xo;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(xo||(xo={}));var vo;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(vo||(vo={}));var So;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.CHATBOT__RATE="CHATBOT__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",r.DOCUMENT__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",r.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",r.AI__RATE="AI__RATE",r.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",r.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",r.TOPIC__DISPLAY="TOPIC__DISPLAY",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(So||(So={}));var Co;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(Co||(Co={}));var Oo;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT",r.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",r.LINK_PREVIEW="LINK_PREVIEW",r.UD_VIEWER="UD_VIEWER",r.ASSET_VIEWER="ASSET_VIEWER"})(Oo||(Oo={}));var Eo;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(Eo||(Eo={}));var Ao;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(Ao||(Ao={}));var wo;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(wo||(wo={}));var Ro;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(Ro||(Ro={}));var Io;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(Io||(Io={}));var or;(function(r){r.OPTIONAL="OPTIONAL",r.MANDATORY="MANDATORY"})(or||(or={}));var To;(function(r){r.ASC="ASC",r.DESC="DESC"})(To||(To={}));var _o;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(_o||(_o={}));var nr;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(nr||(nr={}));var No;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(No||(No={}));var ko;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(ko||(ko={}));var Lo;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Lo||(Lo={}));var Po;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Po||(Po={}));var Fo;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.HTML_PACKAGE="HTML_PACKAGE",r.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Fo||(Fo={}));var ar;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ar||(ar={}));var Do;(function(r){r.PLAIN_TEXT="PLAIN_TEXT",r.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",r.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Do||(Do={}));var U;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(U||(U={}));var q;(function(r){r.SEARCHES="SEARCHES",r.BOOKMARKS="BOOKMARKS",r.BOOKS="BOOKS",r.COLLECTIONS="COLLECTIONS"})(q||(q={}));var Uo;(function(r){r.UNAUTHENTICATED="UNAUTHENTICATED",r.USER_INCOMPLETE="USER_INCOMPLETE",r.MFA_REQUIRED="MFA_REQUIRED",r.AUTHENTICATED="AUTHENTICATED"})(Uo||(Uo={}));var Mo;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(Mo||(Mo={}));var Bo;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SUMMARY="SUMMARY",r.SEMANTIC_SEARCH="SEMANTIC_SEARCH",r.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",r.OTHER="OTHER"})(Bo||(Bo={}));var Ho;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SLOW="SLOW",r.OTHER="OTHER"})(Ho||(Ho={}));var zo;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(zo||(zo={}));var Go;(function(r){r.USER="USER",r.ASSISTANT="ASSISTANT"})(Go||(Go={}));var Wo;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(Wo||(Wo={}));var jo;(function(r){r.HTML="HTML",r.MARKDOWN="MARKDOWN"})(jo||(jo={}));var $o;(function(r){r.MAP="MAP",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})($o||($o={}));var hi={[U.PERSONAL_BOOK_SHARE_USER]:[U.PERSONAL_BOOK_USER],[U.HTML_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.PDF_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.KHUB_ADMIN]:[U.CONTENT_PUBLISHER],[U.ADMIN]:[U.KHUB_ADMIN,U.USERS_ADMIN,U.PORTAL_ADMIN,U.BEHAVIOR_DATA_USER],[U.GENERATIVE_AI_EXPORT_USER]:[U.GENERATIVE_AI_USER]};function Vo(r,t){return r===t||(hi[r]??[]).some(o=>Vo(o,t))}function Ko(r,t){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>Vo(n,t))}var _r=A(te());function gi(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;let o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!St(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!St(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let s=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=s(r),o=i.length,o!==s(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!St(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function St(r,t){try{return gi(r,t)}catch{return!1}}function st(r,t){return!St(r,t)}function qo(r){return typeof window.structuredClone=="function"?structuredClone(r):r!=null?JSON.parse(JSON.stringify(r)):r}function Ct(r,t){let o=n=>n[r]===!0;return n=>{if(o(n))return n;let i=t(n);return i[r]=!0,i}}var Zo=A(te(),1);var ir=r=>{let t=r??{};return(o,n)=>{var i;let s={hasChanged:st,attribute:!1,...t};(0,Zo.property)(s)(o,n);let l=o.constructor;l.reduxProperties=new Map(l.reduxProperties),l.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:d=>d[n],store:t.store})}};var Ot=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Se=A(te(),1);var Yo=A(te(),1);function Qo(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,Yo.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:st,...t??{}})}var Et=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,s=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Jo=A(ne(),1);var At=globalThis,mi=At.ShadowRoot&&(At.ShadyCSS===void 0||At.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Zs=Symbol();var Xo=(r,t)=>{if(mi)r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),i=At.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var wt=class extends Jo.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,s])=>t.registry.define(i,s)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Xo(n,t.elementStyles),n}};function en(r,t,...o){var n;let i=r.querySelector(t);for(let s of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var Fe=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},nn,tn=Symbol("constructorPrototype"),rn=Symbol("constructorName"),an=Symbol("exportpartsDebouncer"),on=Symbol("dynamicDependenciesLoaded"),Pe=class r extends CustomEvent{constructor(){super(r.eventName,{bubbles:!0})}};Pe.eventName="exportparts-updated";var re=class extends wt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[nn]=new Et(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[an].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[rn]=this.constructor.name,this[tn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[rn]&&Object.setPrototypeOf(this,this[tn])}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 o=this.constructor;o[on]||(o[on]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Pe.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Pe.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 Pe)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];o=en(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var o,n,i,s,l,d;let u=m=>m!=null&&m.trim().length>0,p=t.filter(u).map(m=>m.trim());if(p.length===0){this.exportparts=void 0;return}let h=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],b=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(w=>w.split(":")[1]))!==null&&d!==void 0?d:[],S=[...v,...b].filter(u).map(w=>w.trim());for(let w of S)h.add(w)}if(h.size===0){this.exportparts=void 0;return}let y=[...h.values()].flatMap(m=>p.map(v=>`${m}:${v}--${m}`));this.exportparts=[...this.part,...y].join(", ")}};nn=an;Fe([(0,Se.property)()],re.prototype,"exportpartsPrefix",void 0);Fe([Qo([])],re.prototype,"exportpartsPrefixes",void 0);Fe([(0,Se.property)({reflect:!0})],re.prototype,"exportparts",void 0);Fe([(0,Se.property)()],re.prototype,"customStylesheet",void 0);Fe([(0,Se.property)()],re.prototype,"elementToFocus",void 0);Fe([(0,Se.state)()],re.prototype,"useAdoptedStyleSheets",void 0);function Rt(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var ct=Symbol("internalReduxEventsUnsubscribers"),de=Symbol("internalStoresUnsubscribers"),Ce=Symbol("internalStores"),bi=Ct(Symbol("withRedux"),function(r){var t,o,n;class i extends r{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(l){super.willUpdate(l),[...this.reduxConstructor.reduxReactiveProperties].some(d=>l.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[Ce].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ce].values()][0]}getStore(l){return l==null?this.getUnnamedStore():this[Ce].get(l)}addStore(l,d){var u;d=(u=d??l.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Ce].set(d,l),this.subscribeToStore(d,l),this.updateFromStores()}removeStore(l){let d=typeof l=="string"?l:l.name;this.unsubscribeFromStore(d),this[Ce].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Ce].forEach((l,d)=>this.subscribeToStore(d,l)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((l,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(l.store);p&&(l.store?this[de].has(l.store):this[de].size>0)&&(this[d]=l.selector(p.getState(),this))}})}subscribeToStore(l,d){var u;this[de].set(l,d.subscribe(()=>this.updateFromStores())),this[ct].set(l,[]),Rt(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||d.name===p.store)){let y=m=>this[h](m);d.addEventListener(p.eventName,y),this[ct].get(l).push(()=>d.removeEventListener(p.eventName,y))}})),this.onStoreAvailable(l)}unsubscribeFromStores(){this[de].forEach((l,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(l){var d;this[de].has(l)&&this[de].get(l)(),this[de].delete(l),(d=this[ct].get(l))===null||d===void 0||d.forEach(u=>u()),this[ct].delete(l)}onStoreAvailable(l){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=de,o=Ce,n=ct,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),sn=class extends bi(re){};function Z(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ae(r){return!!r&&!!r[P]}function J(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===wi}(r)||Array.isArray(r)||!!r[hn]||!!(!((t=r.constructor)===null||t===void 0)&&t[hn])||yr(r)||gr(r))}function Oe(r,t,o){o===void 0&&(o=!1),Me(r)===0?(o?Object.keys:Ue)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Me(r){var t=r[P];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:yr(r)?2:gr(r)?3:0}function De(r,t){return Me(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function xi(r,t){return Me(r)===2?r.get(t):r[t]}function yn(r,t,o){var n=Me(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function gn(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function yr(r){return Ei&&r instanceof Map}function gr(r){return Ai&&r instanceof Set}function ue(r){return r.o||r.t}function mr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=xn(r);delete t[P];for(var o=Ue(t),n=0;n<o.length;n++){var i=o[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function br(r,t){return t===void 0&&(t=!1),xr(r)||ae(r)||!J(r)||(Me(r)>1&&(r.set=r.add=r.clear=r.delete=vi),Object.freeze(r),t&&Oe(r,function(o,n){return br(n,!0)},!0)),r}function vi(){Z(2)}function xr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function oe(r){var t=hr[r];return t||Z(18,r),t}function Si(r,t){hr[r]||(hr[r]=t)}function ur(){return dt}function sr(r,t){t&&(oe("Patches"),r.u=[],r.s=[],r.v=t)}function It(r){pr(r),r.p.forEach(Ci),r.p=null}function pr(r){r===dt&&(dt=r.l)}function cn(r){return dt={p:[],l:dt,h:r,m:!0,_:0}}function Ci(r){var t=r[P];t.i===0||t.i===1?t.j():t.g=!0}function cr(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||oe("ES5").S(t,r,n),n?(o[P].P&&(It(t),Z(4)),J(r)&&(r=Tt(t,r),t.l||_t(t,r)),t.u&&oe("Patches").M(o[P].t,r,t.u,t.s)):r=Tt(t,o,[]),It(t),t.u&&t.v(t.u,t.s),r!==bn?r:void 0}function Tt(r,t,o){if(xr(t))return t;var n=t[P];if(!n)return Oe(t,function(d,u){return ln(r,n,t,d,u,o)},!0),t;if(n.A!==r)return t;if(!n.P)return _t(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=mr(n.k):n.o,s=i,l=!1;n.i===3&&(s=new Set(i),i.clear(),l=!0),Oe(s,function(d,u){return ln(r,n,i,d,u,o,l)}),_t(r,i,!1),o&&r.u&&oe("Patches").N(n,o,r.u,r.s)}return n.o}function ln(r,t,o,n,i,s,l){if(ae(i)){var d=Tt(r,i,s&&t&&t.i!==3&&!De(t.R,n)?s.concat(n):void 0);if(yn(o,n,d),!ae(d))return;r.m=!1}else l&&o.add(i);if(J(i)&&!xr(i)){if(!r.h.D&&r._<1)return;Tt(r,i),t&&t.A.l||_t(r,i)}}function _t(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&br(t,o)}function lr(r,t){var o=r[P];return(o?ue(o):r)[t]}function dn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function pe(r){r.P||(r.P=!0,r.l&&pe(r.l))}function dr(r){r.o||(r.o=mr(r.t))}function fr(r,t,o){var n=yr(t)?oe("MapSet").F(t,o):gr(t)?oe("MapSet").T(t,o):r.O?function(i,s){var l=Array.isArray(i),d={i:l?1:0,A:s?s.A:ur(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},u=d,p=ut;l&&(u=[d],p=lt);var h=Proxy.revocable(u,p),y=h.revoke,m=h.proxy;return d.k=m,d.j=y,m}(t,o):oe("ES5").J(t,o);return(o?o.A:ur()).p.push(n),n}function Oi(r){return ae(r)||Z(22,r),function t(o){if(!J(o))return o;var n,i=o[P],s=Me(o);if(i){if(!i.P&&(i.i<4||!oe("ES5").K(i)))return i.t;i.I=!0,n=un(o,s),i.I=!1}else n=un(o,s);return Oe(n,function(l,d){i&&xi(i.t,l)===d||yn(n,l,t(d))}),s===3?new Set(n):n}(r)}function un(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return mr(r)}function mn(){function r(l,d){var u=s[l];return u?u.enumerable=d:s[l]=u={configurable:!0,enumerable:d,get:function(){var p=this[P];return ut.get(p,l)},set:function(p){var h=this[P];ut.set(h,l,p)}},u}function t(l){for(var d=l.length-1;d>=0;d--){var u=l[d][P];if(!u.P)switch(u.i){case 5:n(u)&&pe(u);break;case 4:o(u)&&pe(u)}}}function o(l){for(var d=l.t,u=l.k,p=Ue(u),h=p.length-1;h>=0;h--){var y=p[h];if(y!==P){var m=d[y];if(m===void 0&&!De(d,y))return!0;var v=u[y],b=v&&v[P];if(b?b.t!==m:!gn(v,m))return!0}}var S=!!d[P];return p.length!==Ue(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function i(l){l.g&&Z(3,JSON.stringify(ue(l)))}var s={};Si("ES5",{J:function(l,d){var u=Array.isArray(l),p=function(y,m){if(y){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=xn(m);delete S[P];for(var w=Ue(S),R=0;R<w.length;R++){var I=w[R];S[I]=r(I,y||!!S[I].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(u,l),h={i:u?5:4,A:d?d.A:ur(),P:!1,I:!1,R:{},l:d,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,P,{value:h,writable:!0}),p},S:function(l,d,u){u?ae(d)&&d[P].A===l&&t(l.p):(l.u&&function p(h){if(h&&typeof h=="object"){var y=h[P];if(y){var m=y.t,v=y.k,b=y.R,S=y.i;if(S===4)Oe(v,function(_){_!==P&&(m[_]!==void 0||De(m,_)?b[_]||p(v[_]):(b[_]=!0,pe(y)))}),Oe(m,function(_){v[_]!==void 0||De(v,_)||(b[_]=!1,pe(y))});else if(S===5){if(n(y)&&(pe(y),b.length=!0),v.length<m.length)for(var w=v.length;w<m.length;w++)b[w]=!1;else for(var R=m.length;R<v.length;R++)b[R]=!0;for(var I=Math.min(v.length,m.length),k=0;k<I;k++)v.hasOwnProperty(k)||(b[k]=!0),b[k]===void 0&&p(v[k])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var pn,dt,vr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Ei=typeof Map<"u",Ai=typeof Set<"u",fn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",bn=vr?Symbol.for("immer-nothing"):((pn={})["immer-nothing"]=!0,pn),hn=vr?Symbol.for("immer-draftable"):"__$immer_draftable",P=vr?Symbol.for("immer-state"):"__$immer_state";var wi=""+Object.prototype.constructor,Ue=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,xn=Object.getOwnPropertyDescriptors||function(r){var t={};return Ue(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},hr={},ut={get:function(r,t){if(t===P)return r;var o=ue(r);if(!De(o,t))return function(i,s,l){var d,u=dn(s,l);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!J(n)?n:n===lr(r.t,t)?(dr(r),r.o[t]=fr(r.A.h,n,r)):n},has:function(r,t){return t in ue(r)},ownKeys:function(r){return Reflect.ownKeys(ue(r))},set:function(r,t,o){var n=dn(ue(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=lr(ue(r),t),s=i?.[P];if(s&&s.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(gn(o,i)&&(o!==void 0||De(r.t,t)))return!0;dr(r),pe(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return lr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,dr(r),pe(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=ue(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Z(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){Z(12)}},lt={};Oe(ut,function(r,t){lt[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),lt.deleteProperty=function(r,t){return lt.set.call(this,r,t,void 0)},lt.set=function(r,t,o){return ut.set.call(this,r[0],t,o,r[0])};var Ri=function(){function r(o){var n=this;this.O=fn,this.D=!0,this.produce=function(i,s,l){if(typeof i=="function"&&typeof s!="function"){var d=s;s=i;var u=n;return function(S){var w=this;S===void 0&&(S=d);for(var R=arguments.length,I=Array(R>1?R-1:0),k=1;k<R;k++)I[k-1]=arguments[k];return u.produce(S,function(_){var H;return(H=s).call.apply(H,[w,_].concat(I))})}}var p;if(typeof s!="function"&&Z(6),l!==void 0&&typeof l!="function"&&Z(7),J(i)){var h=cn(n),y=fr(n,i,void 0),m=!0;try{p=s(y),m=!1}finally{m?It(h):pr(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return sr(h,l),cr(S,h)},function(S){throw It(h),S}):(sr(h,l),cr(p,h))}if(!i||typeof i!="object"){if((p=s(i))===void 0&&(p=i),p===bn&&(p=void 0),n.D&&br(p,!0),l){var v=[],b=[];oe("Patches").M(i,p,v,b),l(v,b)}return p}Z(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(p,function(v){return i.apply(void 0,[v].concat(y))})};var l,d,u=n.produce(i,s,function(p,h){l=p,d=h});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,l,d]}):[u,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){J(o)||Z(8),ae(o)&&(o=Oi(o));var n=cn(this),i=fr(this,o,void 0);return i[P].C=!0,pr(n),i},t.finishDraft=function(o,n){var i=o&&o[P],s=i.A;return sr(s,n),cr(void 0,s)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!fn&&Z(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){o=s.value;break}}i>-1&&(n=n.slice(i+1));var l=oe("Patches").$;return ae(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),V=new Ri,Ii=V.produce,dc=V.produceWithPatches.bind(V),uc=V.setAutoFreeze.bind(V),pc=V.setUseProxies.bind(V),fc=V.applyPatches.bind(V),hc=V.createDraft.bind(V),yc=V.finishDraft.bind(V),Nt=Ii;function Ee(r){"@babel/helpers - typeof";return Ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ee(r)}function vn(r,t){if(Ee(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(Ee(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Sn(r){var t=vn(r,"string");return Ee(t)=="symbol"?t:t+""}function Cn(r,t,o){return(t=Sn(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function On(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Sr(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?On(Object(o),!0).forEach(function(n){Cn(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):On(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function W(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var En=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Cr=function(){return Math.random().toString(36).substring(7).split("").join(".")},kt={INIT:"@@redux/INIT"+Cr(),REPLACE:"@@redux/REPLACE"+Cr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Cr()}};function Ti(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Or(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(W(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(W(1));return o(Or)(r,t)}if(typeof r!="function")throw new Error(W(2));var i=r,s=t,l=[],d=l,u=!1;function p(){d===l&&(d=l.slice())}function h(){if(u)throw new Error(W(3));return s}function y(S){if(typeof S!="function")throw new Error(W(4));if(u)throw new Error(W(5));var w=!0;return p(),d.push(S),function(){if(w){if(u)throw new Error(W(6));w=!1,p();var I=d.indexOf(S);d.splice(I,1),l=null}}}function m(S){if(!Ti(S))throw new Error(W(7));if(typeof S.type>"u")throw new Error(W(8));if(u)throw new Error(W(9));try{u=!0,s=i(s,S)}finally{u=!1}for(var w=l=d,R=0;R<w.length;R++){var I=w[R];I()}return S}function v(S){if(typeof S!="function")throw new Error(W(10));i=S,m({type:kt.REPLACE})}function b(){var S,w=y;return S={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(W(11));function k(){I.next&&I.next(h())}k();var _=w(k);return{unsubscribe:_}}},S[En]=function(){return this},S}return m({type:kt.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:v},n[En]=b,n}function _i(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:kt.INIT});if(typeof n>"u")throw new Error(W(12));if(typeof o(void 0,{type:kt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(W(13))})}function An(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var s=Object.keys(o),l,d;try{_i(o)}catch(u){d=u}return function(p,h){if(p===void 0&&(p={}),d)throw d;if(0)var y;for(var m=!1,v={},b=0;b<s.length;b++){var S=s[b],w=o[S],R=p[S],I=w(R,h);if(typeof I>"u"){var k=h&&h.type;throw new Error(W(14))}v[S]=I,m=m||I!==R}return m=m||s.length!==Object.keys(p).length,m?v:p}}function Be(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function wn(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error(W(15))},l={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=t.map(function(u){return u(l)});return s=Be.apply(void 0,d)(i.dispatch),Sr(Sr({},i),{},{dispatch:s})}}}function Rn(r){var t=function(n){var i=n.dispatch,s=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,s,r):l(d)}}};return t}var In=Rn();In.withExtraArgument=Rn;var Er=In;var Ln=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ni=function(r,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(p){return function(h){return u([p,h])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(s=p[0]&2?i.return:p[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,p[1])).done)return s;switch(i=0,s&&(p=[p[0]&2,s.value]),p[0]){case 0:case 1:s=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]<s[3])){o.label=p[1];break}if(p[0]===6&&o.label<s[1]){o.label=s[1],s=p;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(p);break}s[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(r,o)}catch(h){p=[6,h],i=0}finally{n=s=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},He=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},ki=Object.defineProperty,Li=Object.defineProperties,Pi=Object.getOwnPropertyDescriptors,Tn=Object.getOwnPropertySymbols,Fi=Object.prototype.hasOwnProperty,Di=Object.prototype.propertyIsEnumerable,_n=function(r,t,o){return t in r?ki(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},fe=function(r,t){for(var o in t||(t={}))Fi.call(t,o)&&_n(r,o,t[o]);if(Tn)for(var n=0,i=Tn(t);n<i.length;n++){var o=i[n];Di.call(t,o)&&_n(r,o,t[o])}return r},Ar=function(r,t){return Li(r,Pi(t))},Ui=function(r,t,o){return new Promise(function(n,i){var s=function(u){try{d(o.next(u))}catch(p){i(p)}},l=function(u){try{d(o.throw(u))}catch(p){i(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(s,l)};d((o=o.apply(r,t)).next())})};var Mi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Be:Be.apply(null,arguments)},Lc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function Bi(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var Hi=function(r){Ln(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,He([void 0],o[0].concat(this)))):new(t.bind.apply(t,He([void 0],o.concat(this))))},t}(Array),zi=function(r){Ln(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,He([void 0],o[0].concat(this)))):new(t.bind.apply(t,He([void 0],o.concat(this))))},t}(Array);function Ir(r){return J(r)?Nt(r,function(){}):r}function Gi(r){return typeof r=="boolean"}function Wi(){return function(t){return ji(t)}}function ji(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,s=r.serializableCheck,l=s===void 0?!0:s,d=new Hi;if(o&&(Gi(o)?d.push(Er):d.push(Er.withExtraArgument(o.extraArgument))),0){if(i)var u;if(l)var p}return d}var wr=!0;function Pn(r){var t=Wi(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,s=o.middleware,l=s===void 0?t():s,d=o.devTools,u=d===void 0?!0:d,p=o.preloadedState,h=p===void 0?void 0:p,y=o.enhancers,m=y===void 0?void 0:y,v;if(typeof i=="function")v=i;else if(Bi(i))v=An(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!wr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!wr&&b.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=wn.apply(void 0,b),w=Be;u&&(w=Mi(fe({trace:!wr},typeof u=="object"&&u)));var R=new zi(S),I=R;Array.isArray(m)?I=He([S],m):typeof m=="function"&&(I=m(R));var k=w.apply(void 0,I);return Or(v,h,k)}function he(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return fe(fe({type:r,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function Fn(r){var t={},o=[],n,i={addCase:function(s,l){var d=typeof s=="string"?s:s.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(s,l){return o.push({matcher:s,reducer:l}),i},addDefaultCase:function(s){return n=s,i}};return r(i),[t,o,n]}function $i(r){return typeof r=="function"}function Vi(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?Fn(t):[t,o,n],s=i[0],l=i[1],d=i[2],u;if($i(r))u=function(){return Ir(r())};else{var p=Ir(r);u=function(){return p}}function h(y,m){y===void 0&&(y=u());var v=He([s[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(ae(b)){var w=b,R=S(w,m);return R===void 0?b:R}else{if(J(b))return Nt(b,function(I){return S(I,m)});var R=S(b,m);if(R===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return b},y)}return h.getInitialState=u,h}function Ki(r,t){return r+"/"+t}function Dn(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:Ir(r.initialState),n=r.reducers||{},i=Object.keys(n),s={},l={},d={};i.forEach(function(h){var y=n[h],m=Ki(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,s[h]=v,l[m]=v,d[h]=b?he(m,b):he(m)});function u(){var h=typeof r.extraReducers=="function"?Fn(r.extraReducers):[r.extraReducers],y=h[0],m=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],w=S===void 0?void 0:S,R=fe(fe({},m),l);return Vi(o,function(I){for(var k in R)I.addCase(k,R[k]);for(var _=0,H=b;_<H.length;_++){var X=H[_];I.addMatcher(X.matcher,X.reducer)}w&&I.addDefaultCase(w)})}var p;return{name:t,reducer:function(h,y){return p||(p=u()),p(h,y)},actions:d,caseReducers:s,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var qi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Zi=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=qi[Math.random()*64|0];return t},Yi=["name","message","stack","code"],Rr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Nn=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Qi=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Yi;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},Uc=function(){function r(t,o,n){var i=he(t+"/fulfilled",function(h,y,m,v){return{payload:h,meta:Ar(fe({},v||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),s=he(t+"/pending",function(h,y,m){return{payload:void 0,meta:Ar(fe({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=he(t+"/rejected",function(h,y,m,v,b){return{payload:v,error:(n&&n.serializeError||Qi)(h||"Rejected"),meta:Ar(fe({},b||{}),{arg:m,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(y,m,v){var b=n?.idGenerator?n.idGenerator(h):Zi(),S=new u,w,R=!1;function I(_){w=_,S.abort()}var k=function(){return Ui(this,null,function(){var _,H,X,be,j,xe,ke;return Ni(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),be=(_=n?.condition)==null?void 0:_.call(n,h,{getState:m,extra:v}),Ji(be)?[4,be]:[3,2];case 1:be=f.sent(),f.label=2;case 2:if(be===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,j=new Promise(function(g,E){return S.signal.addEventListener("abort",function(){return E({name:"AbortError",message:w||"Aborted"})})}),y(s(b,h,(H=n?.getPendingMeta)==null?void 0:H.call(n,{requestId:b,arg:h},{getState:m,extra:v}))),[4,Promise.race([j,Promise.resolve(o(h,{dispatch:y,getState:m,extra:v,requestId:b,signal:S.signal,abort:I,rejectWithValue:function(g,E){return new Rr(g,E)},fulfillWithValue:function(g,E){return new Nn(g,E)}})).then(function(g){if(g instanceof Rr)throw g;return g instanceof Nn?i(g.payload,b,h,g.meta):i(g,b,h)})])];case 3:return X=f.sent(),[3,5];case 4:return xe=f.sent(),X=xe instanceof Rr?l(null,b,h,xe.payload,xe.meta):l(xe,b,h),[3,5];case 5:return ke=n&&!n.dispatchConditionRejection&&l.match(X)&&X.meta.condition,ke||y(X),[2,X]}})})}();return Object.assign(k,{abort:I,requestId:b,arg:h,unwrap:function(){return k.then(Xi)}})}}return Object.assign(p,{pending:s,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function Xi(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Ji(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Un="listener",Mn="completed",Bn="cancelled",Mc="task-"+Bn,Bc="task-"+Mn,Hc=Un+"-"+Bn,zc=Un+"-"+Mn;var Tr="listenerMiddleware";var Gc=he(Tr+"/add"),Wc=he(Tr+"/removeAll"),jc=he(Tr+"/remove");var kn,$c=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(kn||(kn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},es=function(r){return function(t){setTimeout(t,r)}},Vc=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:es(10);mn();var ts=Ct(Symbol("withEventBus"),function(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),Lt=class extends ts(Object){};window.ftReduxStores||(window.ftReduxStores={});var Hn=class r extends Lt{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Rt(s))return s;if(i==null)return;let l=Dn({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=Pn({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=qo(l.getInitialState());for(let y of p.keeping)h[y]=(u??h)[y];return h}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return l.reducer(u,p)}});return window.ftReduxStores[i.name]=new r(l,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Ot;let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,d)=>{let u=l,p=s[u];return p?(...h)=>{let y=p(...h.map(i));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[u]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Pt=class{static format(t,o,n,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,i)):this.getIntlDateTime(t,o,n,i)}static getMomentDateFormat(t,o){return t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s);if(!i)return l;let d=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return`${l} ${d}`}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var Ft=A(D()),rs="ft-app-info",Ae=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};Ae.eventName="authentication-change";var os={session:(r,t)=>{(0,Ft.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>C.dispatchEvent(new Ae(t.payload)),0))}},C=Ft.FtReduxStore.get({name:rs,reducers:os,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var zn=A(D()),Dt=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},vl=(0,zn.applyMixinOnce)(Symbol("withDateFormat"),function(r){class t extends r{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(C)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(d=>d.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?d=>Pt.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Dt([(0,_r.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Dt([(0,_r.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Dt([ir({store:C.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Dt([ir({store:C.name})],t.prototype,"uiLocale",void 0),t});var Gt=A(D());var Nr=A(D());var we=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=C.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=C.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var Ut=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:we.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):we.await()}};var $=class extends Ut{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(s,l)=>typeof l!="object"||l==null||Array.isArray(l)?l:Object.fromEntries(Object.entries(l).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Nr.CacheRegistry,this.cache=t?i.commonCache:new Nr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Mt=class extends ${async listMySearches(){let{session:t}=C.getState();return Ko(t,U.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Bt=class extends ${async listMyBookmarks(){let t=C.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Ht=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=C.getState().session;return!!t?.sessionAuthenticated}};var zt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=C.getState().session;return!!t?.sessionAuthenticated}};var ns="ft-user-assets",as={setAssetCount:(r,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;r.assetCounts.allAsset[o]=n},clearAssetCount:r=>{Object.values(q).forEach(t=>{r.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(r,t)=>{let o=t.payload.mapId;r.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}},addAsset:(r,t)=>{let{assetType:o,mapId:n,asset:i}=t.payload;Lr(r,o,[...kr(r,o),i]),Gn(r,o,1,n),Wn(r,i)},editAsset:(r,t)=>{let{assetType:o,asset:n}=t.payload;Lr(r,o,kr(r,o).map(i=>i.id===n.id?n:i)),Wn(r,n)},removeAsset:(r,t)=>{let{assetType:o,mapId:n,assetId:i}=t.payload;Lr(r,o,kr(r,o).filter(s=>s.id!==i)),Gn(r,o,-1,n)}},jn={[q.SEARCHES]:"savedSearches",[q.BOOKMARKS]:"bookmarks",[q.BOOKS]:void 0,[q.COLLECTIONS]:void 0},kr=(r,t)=>{var o;let n=jn[t];return n?(o=r[n])!==null&&o!==void 0?o:[]:[]},Lr=(r,t,o)=>{let n=jn[t];n&&(r[n]=o)},Gn=(r,t,o,n)=>{let i=r.assetCounts.allAsset[t];if(i!==void 0&&(r.assetCounts.allAsset[t]=Math.max(0,i+o),t===q.BOOKMARKS&&n)){let s=r.assetCounts.bookmarkByMap[n];r.assetCounts.bookmarkByMap[n]=Math.max(0,s+o)}},Wn=(r,t)=>{let o=r.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));r.assetLabels.push(...n)},K=Gt.FtReduxStore.get({name:ns,reducers:as,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(q).map(r=>[r,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Pr=class{constructor(t=new Ht,o=new zt){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=C.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bt,this.savedSearchesService=new Mt,C.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=C.getState();(0,Gt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),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 o=await this.assetCountsService.getUserAssetCount(t);o&&K.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&K.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(K.getState().assetCounts.bookmarkByMap).length!==0;t===q.BOOKMARKS&&o&&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 o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;K.actions.bookmarks(o)}}},is=new Pr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=is);var Fr=class{addCommand(t,o=!1){C.commands.add(t,o)}consumeCommand(t){return C.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Fr;var Y=A(D());var $n,ze=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},ss=Symbol("clearAfterUnitTest"),Wt=class extends(0,Y.withEventBus)($){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[$n]=()=>{this.defaultMessages={},this.cache=new Y.CacheRegistry,this.listeners={}},this.currentUiLocale=C.getState().uiLocale,C.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=C.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Y.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let s=t.toLowerCase(),l=this.resolveContext(s);return new Y.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof Y.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new ze({loadedContexts:t})),this.dispatchEvent(new ze({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new ze({loadedContexts:[t]})),this.dispatchEvent(new ze({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Y.delay)(0).then(()=>n()).catch(()=>null)))}};$n=ss;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Wt{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Wt{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var Vn=window.FluidTopicsI18nService,td=window.FluidTopicsCustomI18nService;var Kn=A(D()),Dr=class{highlightHtml(t,o,n){(0,Kn.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Dr;var qn=A(D());var Ur=class{isDate(t){var o,n,i,s;return(s=(i=((n=(o=C.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s;if(t==null)return"";try{return qn.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:C.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new Ur;var Zn=A(D());var pt=class{static get(t,o){var n,i;let s=C.getState(),{lang:l,region:d}=(i=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Zn.SearchPlaceConverter(s.baseUrl,t??20,s.searchInAllLanguagesAllowed,o??`${l}-${d}`)}};var Mr=class{urlToSearchRequest(t){return pt.get().parse(t)}searchRequestToUrl(t){return pt.get().serialize(t)}};window.FluidTopicsUrlService=new Mr;var ye=A(D());var Re=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};Re.eventName="change";var Br=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},Yn=new Br;var jt=class r extends ye.WithEventBus{static build(){return new r(window.history,Yn,()=>window.location,!1)}constructor(t,o,n,i){var s,l;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(l=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&l!==void 0?l:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&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,ye.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Re(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[s,l,d])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[p,l,d]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Re.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Re.eventName,t)}currentItem(){return(0,ye.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,ye.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,ye.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=jt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});var Qn=A(ne());var Xn=Qn.css`
2
+ `)===0?N.substr(1,N.length):N}).forEach(function(N){var F=N.split(":"),T=F.shift().trim();if(T){var bt=F.join(":").trim();try{g.append(T,bt)}catch(tr){console.warn("Response "+tr.message)}}}),g}I.call(H.prototype);function j(f,g){if(!(this instanceof j))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=g.statusText===void 0?"":""+g.statusText,this.headers=new y(g.headers),this.url=g.url||"",this._initBody(f)}I.call(j.prototype),j.prototype.clone=function(){return new j(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},j.error=function(){var f=new j(null,{status:200,statusText:""});return f.ok=!1,f.status=0,f.type="error",f};var xe=[301,302,303,307,308];j.redirect=function(f,g){if(xe.indexOf(g)===-1)throw new RangeError("Invalid status code");return new j(null,{status:g,headers:{location:f}})},o.DOMException=n.DOMException;try{new o.DOMException}catch{o.DOMException=function(g,E){this.message=g,this.name=E;var N=Error(g);this.stack=N.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function ke(f,g){return new Promise(function(E,N){var F=new H(f,g);if(F.signal&&F.signal.aborted)return N(new o.DOMException("Aborted","AbortError"));var T=new XMLHttpRequest;function bt(){T.abort()}T.onload=function(){var z={statusText:T.statusText,headers:be(T.getAllResponseHeaders()||"")};F.url.indexOf("file://")===0&&(T.status<200||T.status>599)?z.status=200:z.status=T.status,z.url="responseURL"in T?T.responseURL:z.headers.get("X-Request-URL");var ve="response"in T?T.response:T.responseText;setTimeout(function(){E(new j(ve,z))},0)},T.onerror=function(){setTimeout(function(){N(new TypeError("Network request failed"))},0)},T.ontimeout=function(){setTimeout(function(){N(new TypeError("Network request timed out"))},0)},T.onabort=function(){setTimeout(function(){N(new o.DOMException("Aborted","AbortError"))},0)};function tr(z){try{return z===""&&n.location.href?n.location.href:z}catch{return z}}if(T.open(F.method,tr(F.url),!0),F.credentials==="include"?T.withCredentials=!0:F.credentials==="omit"&&(T.withCredentials=!1),"responseType"in T&&(i.blob?T.responseType="blob":i.arrayBuffer&&(T.responseType="arraybuffer")),g&&typeof g.headers=="object"&&!(g.headers instanceof y||n.Headers&&g.headers instanceof n.Headers)){var io=[];Object.getOwnPropertyNames(g.headers).forEach(function(z){io.push(u(z)),T.setRequestHeader(z,p(g.headers[z]))}),F.headers.forEach(function(z,ve){io.indexOf(ve)===-1&&T.setRequestHeader(ve,z)})}else F.headers.forEach(function(z,ve){T.setRequestHeader(ve,z)});F.signal&&(F.signal.addEventListener("abort",bt),T.onreadystatechange=function(){T.readyState===4&&F.signal.removeEventListener("abort",bt)}),T.send(typeof F._bodyInit>"u"?null:F._bodyInit)})}return ke.polyfill=!0,n.fetch||(n.fetch=ke,n.Headers=y,n.Request=H,n.Response=j),o.Headers=y,o.Request=H,o.Response=j,o.fetch=ke,o}({})})(vt);vt.fetch.ponyfill=!0;delete vt.fetch.polyfill;var Le=xt.fetch?xt:vt;le=Le.fetch;le.default=Le.fetch;le.fetch=Le.fetch;le.Headers=Le.Headers;le.Request=Le.Request;le.Response=Le.Response;fo.exports=le});var ca=it((xu,sa)=>{sa.exports=ftGlobals.litUnsafeHTML});var si=A(D());var ao=A(ne()),ai=A(D());var Yt=A(D());var Ge=A(D()),zr=A(te());var rr;(function(r){r.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(rr||(rr={}));var ft=A(D());var po=A(D());var yi=A(ho(),1);var yo;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(yo||(yo={}));var go;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(go||(go={}));var mo;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(mo||(mo={}));var bo;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(bo||(bo={}));var xo;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(xo||(xo={}));var vo;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(vo||(vo={}));var So;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.CHATBOT__RATE="CHATBOT__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",r.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",r.AI__RATE="AI__RATE",r.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",r.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(So||(So={}));var Co;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(Co||(Co={}));var Oo;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT",r.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",r.LINK_PREVIEW="LINK_PREVIEW",r.UD_VIEWER="UD_VIEWER",r.ASSET_VIEWER="ASSET_VIEWER"})(Oo||(Oo={}));var Eo;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(Eo||(Eo={}));var Ao;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(Ao||(Ao={}));var wo;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(wo||(wo={}));var Ro;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(Ro||(Ro={}));var Io;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(Io||(Io={}));var or;(function(r){r.OPTIONAL="OPTIONAL",r.MANDATORY="MANDATORY"})(or||(or={}));var To;(function(r){r.ASC="ASC",r.DESC="DESC"})(To||(To={}));var _o;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(_o||(_o={}));var nr;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(nr||(nr={}));var No;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(No||(No={}));var ko;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(ko||(ko={}));var Lo;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Lo||(Lo={}));var Po;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Po||(Po={}));var Fo;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.HTML_PACKAGE="HTML_PACKAGE",r.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Fo||(Fo={}));var ar;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ar||(ar={}));var Do;(function(r){r.PLAIN_TEXT="PLAIN_TEXT",r.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",r.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Do||(Do={}));var U;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(U||(U={}));var q;(function(r){r.SEARCHES="SEARCHES",r.BOOKMARKS="BOOKMARKS",r.BOOKS="BOOKS",r.COLLECTIONS="COLLECTIONS"})(q||(q={}));var Uo;(function(r){r.UNAUTHENTICATED="UNAUTHENTICATED",r.USER_INCOMPLETE="USER_INCOMPLETE",r.MFA_REQUIRED="MFA_REQUIRED",r.AUTHENTICATED="AUTHENTICATED"})(Uo||(Uo={}));var Mo;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(Mo||(Mo={}));var Bo;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SUMMARY="SUMMARY",r.SEMANTIC_SEARCH="SEMANTIC_SEARCH",r.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",r.OTHER="OTHER"})(Bo||(Bo={}));var Ho;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SLOW="SLOW",r.OTHER="OTHER"})(Ho||(Ho={}));var zo;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(zo||(zo={}));var Go;(function(r){r.USER="USER",r.ASSISTANT="ASSISTANT"})(Go||(Go={}));var Wo;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(Wo||(Wo={}));var jo;(function(r){r.HTML="HTML",r.MARKDOWN="MARKDOWN"})(jo||(jo={}));var $o;(function(r){r.MAP="MAP",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})($o||($o={}));var hi={[U.PERSONAL_BOOK_SHARE_USER]:[U.PERSONAL_BOOK_USER],[U.HTML_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.PDF_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.KHUB_ADMIN]:[U.CONTENT_PUBLISHER],[U.ADMIN]:[U.KHUB_ADMIN,U.USERS_ADMIN,U.PORTAL_ADMIN,U.BEHAVIOR_DATA_USER],[U.GENERATIVE_AI_EXPORT_USER]:[U.GENERATIVE_AI_USER]};function Vo(r,t){return r===t||(hi[r]??[]).some(o=>Vo(o,t))}function Ko(r,t){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>Vo(n,t))}var _r=A(te());function gi(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;let o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!St(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!St(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let s=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=s(r),o=i.length,o!==s(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!St(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function St(r,t){try{return gi(r,t)}catch{return!1}}function st(r,t){return!St(r,t)}function qo(r){return typeof window.structuredClone=="function"?structuredClone(r):r!=null?JSON.parse(JSON.stringify(r)):r}function Ct(r,t){let o=n=>n[r]===!0;return n=>{if(o(n))return n;let i=t(n);return i[r]=!0,i}}var Zo=A(te(),1);var ir=r=>{let t=r??{};return(o,n)=>{var i;let s={hasChanged:st,attribute:!1,...t};(0,Zo.property)(s)(o,n);let l=o.constructor;l.reduxProperties=new Map(l.reduxProperties),l.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:d=>d[n],store:t.store})}};var Ot=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Se=A(te(),1);var Yo=A(te(),1);function Qo(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,Yo.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:st,...t??{}})}var Et=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,s=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Jo=A(ne(),1);var At=globalThis,mi=At.ShadowRoot&&(At.ShadyCSS===void 0||At.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Zs=Symbol();var Xo=(r,t)=>{if(mi)r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),i=At.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var wt=class extends Jo.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,s])=>t.registry.define(i,s)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Xo(n,t.elementStyles),n}};function en(r,t,...o){var n;let i=r.querySelector(t);for(let s of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var Fe=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},nn,tn=Symbol("constructorPrototype"),rn=Symbol("constructorName"),an=Symbol("exportpartsDebouncer"),on=Symbol("dynamicDependenciesLoaded"),Pe=class r extends CustomEvent{constructor(){super(r.eventName,{bubbles:!0})}};Pe.eventName="exportparts-updated";var re=class extends wt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[nn]=new Et(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[an].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[rn]=this.constructor.name,this[tn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[rn]&&Object.setPrototypeOf(this,this[tn])}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 o=this.constructor;o[on]||(o[on]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Pe.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Pe.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 Pe)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];o=en(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var o,n,i,s,l,d;let u=m=>m!=null&&m.trim().length>0,p=t.filter(u).map(m=>m.trim());if(p.length===0){this.exportparts=void 0;return}let h=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],b=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(w=>w.split(":")[1]))!==null&&d!==void 0?d:[],S=[...v,...b].filter(u).map(w=>w.trim());for(let w of S)h.add(w)}if(h.size===0){this.exportparts=void 0;return}let y=[...h.values()].flatMap(m=>p.map(v=>`${m}:${v}--${m}`));this.exportparts=[...this.part,...y].join(", ")}};nn=an;Fe([(0,Se.property)()],re.prototype,"exportpartsPrefix",void 0);Fe([Qo([])],re.prototype,"exportpartsPrefixes",void 0);Fe([(0,Se.property)({reflect:!0})],re.prototype,"exportparts",void 0);Fe([(0,Se.property)()],re.prototype,"customStylesheet",void 0);Fe([(0,Se.property)()],re.prototype,"elementToFocus",void 0);Fe([(0,Se.state)()],re.prototype,"useAdoptedStyleSheets",void 0);function Rt(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var ct=Symbol("internalReduxEventsUnsubscribers"),de=Symbol("internalStoresUnsubscribers"),Ce=Symbol("internalStores"),bi=Ct(Symbol("withRedux"),function(r){var t,o,n;class i extends r{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(l){super.willUpdate(l),[...this.reduxConstructor.reduxReactiveProperties].some(d=>l.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[Ce].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ce].values()][0]}getStore(l){return l==null?this.getUnnamedStore():this[Ce].get(l)}addStore(l,d){var u;d=(u=d??l.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Ce].set(d,l),this.subscribeToStore(d,l),this.updateFromStores()}removeStore(l){let d=typeof l=="string"?l:l.name;this.unsubscribeFromStore(d),this[Ce].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Ce].forEach((l,d)=>this.subscribeToStore(d,l)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((l,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(l.store);p&&(l.store?this[de].has(l.store):this[de].size>0)&&(this[d]=l.selector(p.getState(),this))}})}subscribeToStore(l,d){var u;this[de].set(l,d.subscribe(()=>this.updateFromStores())),this[ct].set(l,[]),Rt(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||d.name===p.store)){let y=m=>this[h](m);d.addEventListener(p.eventName,y),this[ct].get(l).push(()=>d.removeEventListener(p.eventName,y))}})),this.onStoreAvailable(l)}unsubscribeFromStores(){this[de].forEach((l,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(l){var d;this[de].has(l)&&this[de].get(l)(),this[de].delete(l),(d=this[ct].get(l))===null||d===void 0||d.forEach(u=>u()),this[ct].delete(l)}onStoreAvailable(l){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=de,o=Ce,n=ct,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),sn=class extends bi(re){};function Z(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ae(r){return!!r&&!!r[P]}function J(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===wi}(r)||Array.isArray(r)||!!r[hn]||!!(!((t=r.constructor)===null||t===void 0)&&t[hn])||yr(r)||gr(r))}function Oe(r,t,o){o===void 0&&(o=!1),Me(r)===0?(o?Object.keys:Ue)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Me(r){var t=r[P];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:yr(r)?2:gr(r)?3:0}function De(r,t){return Me(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function xi(r,t){return Me(r)===2?r.get(t):r[t]}function yn(r,t,o){var n=Me(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function gn(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function yr(r){return Ei&&r instanceof Map}function gr(r){return Ai&&r instanceof Set}function ue(r){return r.o||r.t}function mr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=xn(r);delete t[P];for(var o=Ue(t),n=0;n<o.length;n++){var i=o[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function br(r,t){return t===void 0&&(t=!1),xr(r)||ae(r)||!J(r)||(Me(r)>1&&(r.set=r.add=r.clear=r.delete=vi),Object.freeze(r),t&&Oe(r,function(o,n){return br(n,!0)},!0)),r}function vi(){Z(2)}function xr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function oe(r){var t=hr[r];return t||Z(18,r),t}function Si(r,t){hr[r]||(hr[r]=t)}function ur(){return dt}function sr(r,t){t&&(oe("Patches"),r.u=[],r.s=[],r.v=t)}function It(r){pr(r),r.p.forEach(Ci),r.p=null}function pr(r){r===dt&&(dt=r.l)}function cn(r){return dt={p:[],l:dt,h:r,m:!0,_:0}}function Ci(r){var t=r[P];t.i===0||t.i===1?t.j():t.g=!0}function cr(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||oe("ES5").S(t,r,n),n?(o[P].P&&(It(t),Z(4)),J(r)&&(r=Tt(t,r),t.l||_t(t,r)),t.u&&oe("Patches").M(o[P].t,r,t.u,t.s)):r=Tt(t,o,[]),It(t),t.u&&t.v(t.u,t.s),r!==bn?r:void 0}function Tt(r,t,o){if(xr(t))return t;var n=t[P];if(!n)return Oe(t,function(d,u){return ln(r,n,t,d,u,o)},!0),t;if(n.A!==r)return t;if(!n.P)return _t(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=mr(n.k):n.o,s=i,l=!1;n.i===3&&(s=new Set(i),i.clear(),l=!0),Oe(s,function(d,u){return ln(r,n,i,d,u,o,l)}),_t(r,i,!1),o&&r.u&&oe("Patches").N(n,o,r.u,r.s)}return n.o}function ln(r,t,o,n,i,s,l){if(ae(i)){var d=Tt(r,i,s&&t&&t.i!==3&&!De(t.R,n)?s.concat(n):void 0);if(yn(o,n,d),!ae(d))return;r.m=!1}else l&&o.add(i);if(J(i)&&!xr(i)){if(!r.h.D&&r._<1)return;Tt(r,i),t&&t.A.l||_t(r,i)}}function _t(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&br(t,o)}function lr(r,t){var o=r[P];return(o?ue(o):r)[t]}function dn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function pe(r){r.P||(r.P=!0,r.l&&pe(r.l))}function dr(r){r.o||(r.o=mr(r.t))}function fr(r,t,o){var n=yr(t)?oe("MapSet").F(t,o):gr(t)?oe("MapSet").T(t,o):r.O?function(i,s){var l=Array.isArray(i),d={i:l?1:0,A:s?s.A:ur(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},u=d,p=ut;l&&(u=[d],p=lt);var h=Proxy.revocable(u,p),y=h.revoke,m=h.proxy;return d.k=m,d.j=y,m}(t,o):oe("ES5").J(t,o);return(o?o.A:ur()).p.push(n),n}function Oi(r){return ae(r)||Z(22,r),function t(o){if(!J(o))return o;var n,i=o[P],s=Me(o);if(i){if(!i.P&&(i.i<4||!oe("ES5").K(i)))return i.t;i.I=!0,n=un(o,s),i.I=!1}else n=un(o,s);return Oe(n,function(l,d){i&&xi(i.t,l)===d||yn(n,l,t(d))}),s===3?new Set(n):n}(r)}function un(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return mr(r)}function mn(){function r(l,d){var u=s[l];return u?u.enumerable=d:s[l]=u={configurable:!0,enumerable:d,get:function(){var p=this[P];return ut.get(p,l)},set:function(p){var h=this[P];ut.set(h,l,p)}},u}function t(l){for(var d=l.length-1;d>=0;d--){var u=l[d][P];if(!u.P)switch(u.i){case 5:n(u)&&pe(u);break;case 4:o(u)&&pe(u)}}}function o(l){for(var d=l.t,u=l.k,p=Ue(u),h=p.length-1;h>=0;h--){var y=p[h];if(y!==P){var m=d[y];if(m===void 0&&!De(d,y))return!0;var v=u[y],b=v&&v[P];if(b?b.t!==m:!gn(v,m))return!0}}var S=!!d[P];return p.length!==Ue(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function i(l){l.g&&Z(3,JSON.stringify(ue(l)))}var s={};Si("ES5",{J:function(l,d){var u=Array.isArray(l),p=function(y,m){if(y){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=xn(m);delete S[P];for(var w=Ue(S),R=0;R<w.length;R++){var I=w[R];S[I]=r(I,y||!!S[I].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(u,l),h={i:u?5:4,A:d?d.A:ur(),P:!1,I:!1,R:{},l:d,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,P,{value:h,writable:!0}),p},S:function(l,d,u){u?ae(d)&&d[P].A===l&&t(l.p):(l.u&&function p(h){if(h&&typeof h=="object"){var y=h[P];if(y){var m=y.t,v=y.k,b=y.R,S=y.i;if(S===4)Oe(v,function(_){_!==P&&(m[_]!==void 0||De(m,_)?b[_]||p(v[_]):(b[_]=!0,pe(y)))}),Oe(m,function(_){v[_]!==void 0||De(v,_)||(b[_]=!1,pe(y))});else if(S===5){if(n(y)&&(pe(y),b.length=!0),v.length<m.length)for(var w=v.length;w<m.length;w++)b[w]=!1;else for(var R=m.length;R<v.length;R++)b[R]=!0;for(var I=Math.min(v.length,m.length),k=0;k<I;k++)v.hasOwnProperty(k)||(b[k]=!0),b[k]===void 0&&p(v[k])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var pn,dt,vr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Ei=typeof Map<"u",Ai=typeof Set<"u",fn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",bn=vr?Symbol.for("immer-nothing"):((pn={})["immer-nothing"]=!0,pn),hn=vr?Symbol.for("immer-draftable"):"__$immer_draftable",P=vr?Symbol.for("immer-state"):"__$immer_state";var wi=""+Object.prototype.constructor,Ue=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,xn=Object.getOwnPropertyDescriptors||function(r){var t={};return Ue(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},hr={},ut={get:function(r,t){if(t===P)return r;var o=ue(r);if(!De(o,t))return function(i,s,l){var d,u=dn(s,l);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!J(n)?n:n===lr(r.t,t)?(dr(r),r.o[t]=fr(r.A.h,n,r)):n},has:function(r,t){return t in ue(r)},ownKeys:function(r){return Reflect.ownKeys(ue(r))},set:function(r,t,o){var n=dn(ue(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=lr(ue(r),t),s=i?.[P];if(s&&s.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(gn(o,i)&&(o!==void 0||De(r.t,t)))return!0;dr(r),pe(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return lr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,dr(r),pe(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=ue(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Z(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){Z(12)}},lt={};Oe(ut,function(r,t){lt[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),lt.deleteProperty=function(r,t){return lt.set.call(this,r,t,void 0)},lt.set=function(r,t,o){return ut.set.call(this,r[0],t,o,r[0])};var Ri=function(){function r(o){var n=this;this.O=fn,this.D=!0,this.produce=function(i,s,l){if(typeof i=="function"&&typeof s!="function"){var d=s;s=i;var u=n;return function(S){var w=this;S===void 0&&(S=d);for(var R=arguments.length,I=Array(R>1?R-1:0),k=1;k<R;k++)I[k-1]=arguments[k];return u.produce(S,function(_){var H;return(H=s).call.apply(H,[w,_].concat(I))})}}var p;if(typeof s!="function"&&Z(6),l!==void 0&&typeof l!="function"&&Z(7),J(i)){var h=cn(n),y=fr(n,i,void 0),m=!0;try{p=s(y),m=!1}finally{m?It(h):pr(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return sr(h,l),cr(S,h)},function(S){throw It(h),S}):(sr(h,l),cr(p,h))}if(!i||typeof i!="object"){if((p=s(i))===void 0&&(p=i),p===bn&&(p=void 0),n.D&&br(p,!0),l){var v=[],b=[];oe("Patches").M(i,p,v,b),l(v,b)}return p}Z(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(p,function(v){return i.apply(void 0,[v].concat(y))})};var l,d,u=n.produce(i,s,function(p,h){l=p,d=h});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,l,d]}):[u,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){J(o)||Z(8),ae(o)&&(o=Oi(o));var n=cn(this),i=fr(this,o,void 0);return i[P].C=!0,pr(n),i},t.finishDraft=function(o,n){var i=o&&o[P],s=i.A;return sr(s,n),cr(void 0,s)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!fn&&Z(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){o=s.value;break}}i>-1&&(n=n.slice(i+1));var l=oe("Patches").$;return ae(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),V=new Ri,Ii=V.produce,dc=V.produceWithPatches.bind(V),uc=V.setAutoFreeze.bind(V),pc=V.setUseProxies.bind(V),fc=V.applyPatches.bind(V),hc=V.createDraft.bind(V),yc=V.finishDraft.bind(V),Nt=Ii;function Ee(r){"@babel/helpers - typeof";return Ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ee(r)}function vn(r,t){if(Ee(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(Ee(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Sn(r){var t=vn(r,"string");return Ee(t)=="symbol"?t:t+""}function Cn(r,t,o){return(t=Sn(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function On(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Sr(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?On(Object(o),!0).forEach(function(n){Cn(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):On(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function W(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var En=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Cr=function(){return Math.random().toString(36).substring(7).split("").join(".")},kt={INIT:"@@redux/INIT"+Cr(),REPLACE:"@@redux/REPLACE"+Cr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Cr()}};function Ti(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Or(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(W(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(W(1));return o(Or)(r,t)}if(typeof r!="function")throw new Error(W(2));var i=r,s=t,l=[],d=l,u=!1;function p(){d===l&&(d=l.slice())}function h(){if(u)throw new Error(W(3));return s}function y(S){if(typeof S!="function")throw new Error(W(4));if(u)throw new Error(W(5));var w=!0;return p(),d.push(S),function(){if(w){if(u)throw new Error(W(6));w=!1,p();var I=d.indexOf(S);d.splice(I,1),l=null}}}function m(S){if(!Ti(S))throw new Error(W(7));if(typeof S.type>"u")throw new Error(W(8));if(u)throw new Error(W(9));try{u=!0,s=i(s,S)}finally{u=!1}for(var w=l=d,R=0;R<w.length;R++){var I=w[R];I()}return S}function v(S){if(typeof S!="function")throw new Error(W(10));i=S,m({type:kt.REPLACE})}function b(){var S,w=y;return S={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(W(11));function k(){I.next&&I.next(h())}k();var _=w(k);return{unsubscribe:_}}},S[En]=function(){return this},S}return m({type:kt.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:v},n[En]=b,n}function _i(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:kt.INIT});if(typeof n>"u")throw new Error(W(12));if(typeof o(void 0,{type:kt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(W(13))})}function An(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var s=Object.keys(o),l,d;try{_i(o)}catch(u){d=u}return function(p,h){if(p===void 0&&(p={}),d)throw d;if(0)var y;for(var m=!1,v={},b=0;b<s.length;b++){var S=s[b],w=o[S],R=p[S],I=w(R,h);if(typeof I>"u"){var k=h&&h.type;throw new Error(W(14))}v[S]=I,m=m||I!==R}return m=m||s.length!==Object.keys(p).length,m?v:p}}function Be(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function wn(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error(W(15))},l={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=t.map(function(u){return u(l)});return s=Be.apply(void 0,d)(i.dispatch),Sr(Sr({},i),{},{dispatch:s})}}}function Rn(r){var t=function(n){var i=n.dispatch,s=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,s,r):l(d)}}};return t}var In=Rn();In.withExtraArgument=Rn;var Er=In;var Ln=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ni=function(r,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(p){return function(h){return u([p,h])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(s=p[0]&2?i.return:p[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,p[1])).done)return s;switch(i=0,s&&(p=[p[0]&2,s.value]),p[0]){case 0:case 1:s=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]<s[3])){o.label=p[1];break}if(p[0]===6&&o.label<s[1]){o.label=s[1],s=p;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(p);break}s[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(r,o)}catch(h){p=[6,h],i=0}finally{n=s=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},He=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},ki=Object.defineProperty,Li=Object.defineProperties,Pi=Object.getOwnPropertyDescriptors,Tn=Object.getOwnPropertySymbols,Fi=Object.prototype.hasOwnProperty,Di=Object.prototype.propertyIsEnumerable,_n=function(r,t,o){return t in r?ki(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},fe=function(r,t){for(var o in t||(t={}))Fi.call(t,o)&&_n(r,o,t[o]);if(Tn)for(var n=0,i=Tn(t);n<i.length;n++){var o=i[n];Di.call(t,o)&&_n(r,o,t[o])}return r},Ar=function(r,t){return Li(r,Pi(t))},Ui=function(r,t,o){return new Promise(function(n,i){var s=function(u){try{d(o.next(u))}catch(p){i(p)}},l=function(u){try{d(o.throw(u))}catch(p){i(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(s,l)};d((o=o.apply(r,t)).next())})};var Mi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Be:Be.apply(null,arguments)},Lc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function Bi(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var Hi=function(r){Ln(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,He([void 0],o[0].concat(this)))):new(t.bind.apply(t,He([void 0],o.concat(this))))},t}(Array),zi=function(r){Ln(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,He([void 0],o[0].concat(this)))):new(t.bind.apply(t,He([void 0],o.concat(this))))},t}(Array);function Ir(r){return J(r)?Nt(r,function(){}):r}function Gi(r){return typeof r=="boolean"}function Wi(){return function(t){return ji(t)}}function ji(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,s=r.serializableCheck,l=s===void 0?!0:s,d=new Hi;if(o&&(Gi(o)?d.push(Er):d.push(Er.withExtraArgument(o.extraArgument))),0){if(i)var u;if(l)var p}return d}var wr=!0;function Pn(r){var t=Wi(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,s=o.middleware,l=s===void 0?t():s,d=o.devTools,u=d===void 0?!0:d,p=o.preloadedState,h=p===void 0?void 0:p,y=o.enhancers,m=y===void 0?void 0:y,v;if(typeof i=="function")v=i;else if(Bi(i))v=An(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!wr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!wr&&b.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=wn.apply(void 0,b),w=Be;u&&(w=Mi(fe({trace:!wr},typeof u=="object"&&u)));var R=new zi(S),I=R;Array.isArray(m)?I=He([S],m):typeof m=="function"&&(I=m(R));var k=w.apply(void 0,I);return Or(v,h,k)}function he(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return fe(fe({type:r,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function Fn(r){var t={},o=[],n,i={addCase:function(s,l){var d=typeof s=="string"?s:s.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(s,l){return o.push({matcher:s,reducer:l}),i},addDefaultCase:function(s){return n=s,i}};return r(i),[t,o,n]}function $i(r){return typeof r=="function"}function Vi(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?Fn(t):[t,o,n],s=i[0],l=i[1],d=i[2],u;if($i(r))u=function(){return Ir(r())};else{var p=Ir(r);u=function(){return p}}function h(y,m){y===void 0&&(y=u());var v=He([s[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(ae(b)){var w=b,R=S(w,m);return R===void 0?b:R}else{if(J(b))return Nt(b,function(I){return S(I,m)});var R=S(b,m);if(R===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return b},y)}return h.getInitialState=u,h}function Ki(r,t){return r+"/"+t}function Dn(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:Ir(r.initialState),n=r.reducers||{},i=Object.keys(n),s={},l={},d={};i.forEach(function(h){var y=n[h],m=Ki(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,s[h]=v,l[m]=v,d[h]=b?he(m,b):he(m)});function u(){var h=typeof r.extraReducers=="function"?Fn(r.extraReducers):[r.extraReducers],y=h[0],m=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],w=S===void 0?void 0:S,R=fe(fe({},m),l);return Vi(o,function(I){for(var k in R)I.addCase(k,R[k]);for(var _=0,H=b;_<H.length;_++){var X=H[_];I.addMatcher(X.matcher,X.reducer)}w&&I.addDefaultCase(w)})}var p;return{name:t,reducer:function(h,y){return p||(p=u()),p(h,y)},actions:d,caseReducers:s,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var qi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Zi=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=qi[Math.random()*64|0];return t},Yi=["name","message","stack","code"],Rr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Nn=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Qi=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Yi;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},Uc=function(){function r(t,o,n){var i=he(t+"/fulfilled",function(h,y,m,v){return{payload:h,meta:Ar(fe({},v||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),s=he(t+"/pending",function(h,y,m){return{payload:void 0,meta:Ar(fe({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=he(t+"/rejected",function(h,y,m,v,b){return{payload:v,error:(n&&n.serializeError||Qi)(h||"Rejected"),meta:Ar(fe({},b||{}),{arg:m,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(y,m,v){var b=n?.idGenerator?n.idGenerator(h):Zi(),S=new u,w,R=!1;function I(_){w=_,S.abort()}var k=function(){return Ui(this,null,function(){var _,H,X,be,j,xe,ke;return Ni(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),be=(_=n?.condition)==null?void 0:_.call(n,h,{getState:m,extra:v}),Ji(be)?[4,be]:[3,2];case 1:be=f.sent(),f.label=2;case 2:if(be===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,j=new Promise(function(g,E){return S.signal.addEventListener("abort",function(){return E({name:"AbortError",message:w||"Aborted"})})}),y(s(b,h,(H=n?.getPendingMeta)==null?void 0:H.call(n,{requestId:b,arg:h},{getState:m,extra:v}))),[4,Promise.race([j,Promise.resolve(o(h,{dispatch:y,getState:m,extra:v,requestId:b,signal:S.signal,abort:I,rejectWithValue:function(g,E){return new Rr(g,E)},fulfillWithValue:function(g,E){return new Nn(g,E)}})).then(function(g){if(g instanceof Rr)throw g;return g instanceof Nn?i(g.payload,b,h,g.meta):i(g,b,h)})])];case 3:return X=f.sent(),[3,5];case 4:return xe=f.sent(),X=xe instanceof Rr?l(null,b,h,xe.payload,xe.meta):l(xe,b,h),[3,5];case 5:return ke=n&&!n.dispatchConditionRejection&&l.match(X)&&X.meta.condition,ke||y(X),[2,X]}})})}();return Object.assign(k,{abort:I,requestId:b,arg:h,unwrap:function(){return k.then(Xi)}})}}return Object.assign(p,{pending:s,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function Xi(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Ji(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Un="listener",Mn="completed",Bn="cancelled",Mc="task-"+Bn,Bc="task-"+Mn,Hc=Un+"-"+Bn,zc=Un+"-"+Mn;var Tr="listenerMiddleware";var Gc=he(Tr+"/add"),Wc=he(Tr+"/removeAll"),jc=he(Tr+"/remove");var kn,$c=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(kn||(kn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},es=function(r){return function(t){setTimeout(t,r)}},Vc=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:es(10);mn();var ts=Ct(Symbol("withEventBus"),function(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),Lt=class extends ts(Object){};window.ftReduxStores||(window.ftReduxStores={});var Hn=class r extends Lt{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Rt(s))return s;if(i==null)return;let l=Dn({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=Pn({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=qo(l.getInitialState());for(let y of p.keeping)h[y]=(u??h)[y];return h}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return l.reducer(u,p)}});return window.ftReduxStores[i.name]=new r(l,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Ot;let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,d)=>{let u=l,p=s[u];return p?(...h)=>{let y=p(...h.map(i));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[u]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Pt=class{static format(t,o,n,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,i)):this.getIntlDateTime(t,o,n,i)}static getMomentDateFormat(t,o){return t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s);if(!i)return l;let d=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return`${l} ${d}`}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var Ft=A(D()),rs="ft-app-info",Ae=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};Ae.eventName="authentication-change";var os={session:(r,t)=>{(0,Ft.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>C.dispatchEvent(new Ae(t.payload)),0))}},C=Ft.FtReduxStore.get({name:rs,reducers:os,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var zn=A(D()),Dt=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},vl=(0,zn.applyMixinOnce)(Symbol("withDateFormat"),function(r){class t extends r{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(C)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(d=>d.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?d=>Pt.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Dt([(0,_r.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Dt([(0,_r.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Dt([ir({store:C.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Dt([ir({store:C.name})],t.prototype,"uiLocale",void 0),t});var Gt=A(D());var Nr=A(D());var we=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=C.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=C.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var Ut=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:we.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):we.await()}};var $=class extends Ut{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(s,l)=>typeof l!="object"||l==null||Array.isArray(l)?l:Object.fromEntries(Object.entries(l).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Nr.CacheRegistry,this.cache=t?i.commonCache:new Nr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Mt=class extends ${async listMySearches(){let{session:t}=C.getState();return Ko(t,U.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Bt=class extends ${async listMyBookmarks(){let t=C.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Ht=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=C.getState().session;return!!t?.sessionAuthenticated}};var zt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=C.getState().session;return!!t?.sessionAuthenticated}};var ns="ft-user-assets",as={setAssetCount:(r,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;r.assetCounts.allAsset[o]=n},clearAssetCount:r=>{Object.values(q).forEach(t=>{r.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(r,t)=>{let o=t.payload.mapId;r.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}},addAsset:(r,t)=>{let{assetType:o,mapId:n,asset:i}=t.payload;Lr(r,o,[...kr(r,o),i]),Gn(r,o,1,n),Wn(r,i)},editAsset:(r,t)=>{let{assetType:o,asset:n}=t.payload;Lr(r,o,kr(r,o).map(i=>i.id===n.id?n:i)),Wn(r,n)},removeAsset:(r,t)=>{let{assetType:o,mapId:n,assetId:i}=t.payload;Lr(r,o,kr(r,o).filter(s=>s.id!==i)),Gn(r,o,-1,n)}},jn={[q.SEARCHES]:"savedSearches",[q.BOOKMARKS]:"bookmarks",[q.BOOKS]:void 0,[q.COLLECTIONS]:void 0},kr=(r,t)=>{var o;let n=jn[t];return n?(o=r[n])!==null&&o!==void 0?o:[]:[]},Lr=(r,t,o)=>{let n=jn[t];n&&(r[n]=o)},Gn=(r,t,o,n)=>{let i=r.assetCounts.allAsset[t];if(i!==void 0&&(r.assetCounts.allAsset[t]=Math.max(0,i+o),t===q.BOOKMARKS&&n)){let s=r.assetCounts.bookmarkByMap[n];r.assetCounts.bookmarkByMap[n]=Math.max(0,s+o)}},Wn=(r,t)=>{let o=r.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));r.assetLabels.push(...n)},K=Gt.FtReduxStore.get({name:ns,reducers:as,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(q).map(r=>[r,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Pr=class{constructor(t=new Ht,o=new zt){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=C.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bt,this.savedSearchesService=new Mt,C.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=C.getState();(0,Gt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),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 o=await this.assetCountsService.getUserAssetCount(t);o&&K.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&K.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(K.getState().assetCounts.bookmarkByMap).length!==0;t===q.BOOKMARKS&&o&&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 o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;K.actions.bookmarks(o)}}},is=new Pr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=is);var Fr=class{addCommand(t,o=!1){C.commands.add(t,o)}consumeCommand(t){return C.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Fr;var Y=A(D());var $n,ze=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},ss=Symbol("clearAfterUnitTest"),Wt=class extends(0,Y.withEventBus)($){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[$n]=()=>{this.defaultMessages={},this.cache=new Y.CacheRegistry,this.listeners={}},this.currentUiLocale=C.getState().uiLocale,C.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=C.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Y.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let s=t.toLowerCase(),l=this.resolveContext(s);return new Y.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof Y.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new ze({loadedContexts:t})),this.dispatchEvent(new ze({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new ze({loadedContexts:[t]})),this.dispatchEvent(new ze({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Y.delay)(0).then(()=>n()).catch(()=>null)))}};$n=ss;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Wt{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Wt{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var Vn=window.FluidTopicsI18nService,td=window.FluidTopicsCustomI18nService;var Kn=A(D()),Dr=class{highlightHtml(t,o,n){(0,Kn.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Dr;var qn=A(D());var Ur=class{isDate(t){var o,n,i,s;return(s=(i=((n=(o=C.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s;if(t==null)return"";try{return qn.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:C.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new Ur;var Zn=A(D());var pt=class{static get(t,o){var n,i;let s=C.getState(),{lang:l,region:d}=(i=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Zn.SearchPlaceConverter(s.baseUrl,t??20,s.searchInAllLanguagesAllowed,o??`${l}-${d}`)}};var Mr=class{urlToSearchRequest(t){return pt.get().parse(t)}searchRequestToUrl(t){return pt.get().serialize(t)}};window.FluidTopicsUrlService=new Mr;var ye=A(D());var Re=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};Re.eventName="change";var Br=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},Yn=new Br;var jt=class r extends ye.WithEventBus{static build(){return new r(window.history,Yn,()=>window.location,!1)}constructor(t,o,n,i){var s,l;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(l=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&l!==void 0?l:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&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,ye.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Re(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[s,l,d])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[p,l,d]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Re.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Re.eventName,t)}currentItem(){return(0,ye.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,ye.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,ye.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=jt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});var Qn=A(ne());var Xn=Qn.css`
3
3
  `;var ea=A(ne()),G=A(te()),ee=A(D());function Jn(r,t){let{authenticationRequired:o,session:n}=C.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):r()}var M=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},L=class extends ee.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>we.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new ee.CacheRegistry,this.cleanSessionDebouncer=new ee.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return ea.html`
4
4
  <slot></slot>
5
5
  `}connectedCallback(){super.connectedCallback(),C.addEventListener(Ae.eventName,this.reloadConfiguration)}disconnectedCallback(){C.addEventListener(Ae.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var o,n,i,s,l,d,u;super.update(t),t.has("baseUrl")&&(C.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&C.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&C.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&C.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&C.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&C.actions.noCustom(this.noCustom),t.has("editorMode")&&C.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&C.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&C.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>Vn.addContext(p)),t.has("openExternalDocumentInNewTab")&&C.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&C.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&C.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(C.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),C.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),C.actions.searchInAllLanguagesAllowed((l=(s=this.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),t.has("authenticationRequired")&&C.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&C.actions.availableContentLocales((u=(d=this.availableContentLocales)===null||d===void 0?void 0:d.contentLocales)!==null&&u!==void 0?u:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Jn(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};L.elementDefinitions={};L.styles=Xn;M([(0,G.property)()],L.prototype,"baseUrl",void 0);M([(0,G.property)()],L.prototype,"apiIntegrationIdentifier",void 0);M([(0,G.property)()],L.prototype,"apiIntegrationAppVersion",void 0);M([(0,G.property)()],L.prototype,"uiLocale",void 0);M([(0,ee.jsonProperty)(null)],L.prototype,"availableUiLocales",void 0);M([(0,ee.jsonProperty)(null)],L.prototype,"metadataConfiguration",void 0);M([(0,G.property)({type:Boolean})],L.prototype,"editorMode",void 0);M([(0,G.property)({type:Boolean})],L.prototype,"noCustom",void 0);M([(0,G.property)({type:Boolean})],L.prototype,"openExternalDocumentInNewTab",void 0);M([(0,G.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],L.prototype,"noCustomComponent",void 0);M([(0,G.property)({type:Boolean})],L.prototype,"withManualResources",void 0);M([(0,G.property)({type:Boolean})],L.prototype,"navigatorOnline",void 0);M([(0,G.property)({type:Boolean})],L.prototype,"forcedOffline",void 0);M([(0,G.property)({type:Object})],L.prototype,"apiProvider",void 0);M([(0,G.property)({type:Boolean})],L.prototype,"authenticationRequired",void 0);M([(0,ee.jsonProperty)([])],L.prototype,"messageContexts",void 0);M([(0,ee.jsonProperty)(void 0)],L.prototype,"session",void 0);M([(0,G.state)()],L.prototype,"localesConfiguration",void 0);M([(0,G.state)()],L.prototype,"availableContentLocales",void 0);var ta=A(D());(0,ta.customElement)("ft-app-context")(L);var $t=class r extends Event{constructor(){super(r.eventName)}};$t.eventName="search-context-clear-all-filters";var ra=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Gr=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},oa=Symbol("registerInterval"),Hr=Symbol("registerAttempts"),cs=40,ls=(0,Ge.applyMixinOnce)(Symbol("toFtSearchComponent"),function(r){class t extends r{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var i,s,l;super.willUpdate(n),n.has("neededSearchRequests")&&((i=this.stateManager)===null||i===void 0||i.unregisterComponent(this,(s=n.get("neededSearchRequests"))!==null&&s!==void 0?s:[]),(l=this.stateManager)===null||l===void 0||l.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[Hr]=0,this.tryToRegisterToContext(),this[oa]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Hr]>cs?window.clearInterval(this[oa]):(this[Hr]++,this.dispatchEvent(new Gr))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return ra([(0,zr.state)()],t.prototype,"stateManager",void 0),ra([(0,zr.state)({hasChanged:Ge.hasChanged})],t.prototype,"neededSearchRequests",void 0),t}),Vt=class extends ls(Ge.FtLitElementRedux){};var qt=A(te()),Kt=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},jr=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},Wr=Symbol("registerInterval"),ds=(0,Yt.applyMixinOnce)(Symbol("toFtSearchResultComponent"),function(r){var t;class o extends r{constructor(){super(...arguments),this[t]=0}setResultStateManager(i){this.resultStateManager=i}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Wr]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[Wr]):this.dispatchEvent(new jr)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return t=Wr,Kt([(0,qt.property)({attribute:!1})],o.prototype,"cluster",void 0),Kt([(0,qt.property)({attribute:!1})],o.prototype,"result",void 0),Kt([(0,Yt.numberProperty)()],o.prototype,"rank",void 0),Kt([(0,qt.property)({attribute:!1,type:Boolean})],o.prototype,"openResultInNewTab",void 0),o}),Zt=class extends ds(Vt){};var na=A(ne()),aa=A(D()),us={highlightBackgroundColor:aa.FtCssVariableFactory.create("--ft-sra-highlight-background-color","","COLOR","transparent")},ia=na.css`