@fluid-topics/ft-search-context 1.1.102 → 1.1.103

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,8 +1,8 @@
1
- "use strict";(()=>{var cn=Object.create;var Mt=Object.defineProperty;var ln=Object.getOwnPropertyDescriptor;var fn=Object.getOwnPropertyNames;var dn=Object.getPrototypeOf,hn=Object.prototype.hasOwnProperty;var Pe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var pn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fn(e))!hn.call(t,i)&&i!==r&&Mt(t,i,{get:()=>e[i],enumerable:!(n=ln(e,i))||n.enumerable});return t};var x=(t,e,r)=>(r=t!=null?cn(dn(t)):{},pn(e||!t||!t.__esModule?Mt(r,"default",{value:t,enumerable:!0}):r,t));var F=Pe((li,kt)=>{kt.exports=ftGlobals.wcUtils});var le=Pe((fi,Lt)=>{Lt.exports=ftGlobals.lit});var J=Pe((di,Ft)=>{Ft.exports=ftGlobals.litDecorators});var Ht=Pe(Vt=>{(function(t){var e=function(r){var n={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function i(o){return o&&DataView.prototype.isPrototypeOf(o)}if(n.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(o){return o&&a.indexOf(Object.prototype.toString.call(o))>-1};function u(o){if(typeof o!="string"&&(o=String(o)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(o))throw new TypeError("Invalid character in header field name");return o.toLowerCase()}function f(o){return typeof o!="string"&&(o=String(o)),o}function c(o){var d={next:function(){var g=o.shift();return{done:g===void 0,value:g}}};return n.iterable&&(d[Symbol.iterator]=function(){return d}),d}function l(o){this.map={},o instanceof l?o.forEach(function(d,g){this.append(g,d)},this):Array.isArray(o)?o.forEach(function(d){this.append(d[0],d[1])},this):o&&Object.getOwnPropertyNames(o).forEach(function(d){this.append(d,o[d])},this)}l.prototype.append=function(o,d){o=u(o),d=f(d);var g=this.map[o];this.map[o]=g?g+", "+d:d},l.prototype.delete=function(o){delete this.map[u(o)]},l.prototype.get=function(o){return o=u(o),this.has(o)?this.map[o]:null},l.prototype.has=function(o){return this.map.hasOwnProperty(u(o))},l.prototype.set=function(o,d){this.map[u(o)]=f(d)},l.prototype.forEach=function(o,d){for(var g in this.map)this.map.hasOwnProperty(g)&&o.call(d,this.map[g],g,this)},l.prototype.keys=function(){var o=[];return this.forEach(function(d,g){o.push(g)}),c(o)},l.prototype.values=function(){var o=[];return this.forEach(function(d){o.push(d)}),c(o)},l.prototype.entries=function(){var o=[];return this.forEach(function(d,g){o.push([g,d])}),c(o)},n.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);function m(o){if(o.bodyUsed)return Promise.reject(new TypeError("Already read"));o.bodyUsed=!0}function h(o){return new Promise(function(d,g){o.onload=function(){d(o.result)},o.onerror=function(){g(o.error)}})}function v(o){var d=new FileReader,g=h(d);return d.readAsArrayBuffer(o),g}function p(o){var d=new FileReader,g=h(d);return d.readAsText(o),g}function y(o){for(var d=new Uint8Array(o),g=new Array(d.length),P=0;P<d.length;P++)g[P]=String.fromCharCode(d[P]);return g.join("")}function w(o){if(o.slice)return o.slice(0);var d=new Uint8Array(o.byteLength);return d.set(new Uint8Array(o)),d.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(o){this._bodyInit=o,o?typeof o=="string"?this._bodyText=o:n.blob&&Blob.prototype.isPrototypeOf(o)?this._bodyBlob=o:n.formData&&FormData.prototype.isPrototypeOf(o)?this._bodyFormData=o:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(o)?this._bodyText=o.toString():n.arrayBuffer&&n.blob&&i(o)?(this._bodyArrayBuffer=w(o.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(o)||s(o))?this._bodyArrayBuffer=w(o):this._bodyText=o=Object.prototype.toString.call(o):this._bodyText="",this.headers.get("content-type")||(typeof o=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(o)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var o=m(this);if(o)return o;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(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var o=m(this);if(o)return o;if(this._bodyBlob)return p(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(y(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n.formData&&(this.formData=function(){return this.text().then(K)}),this.json=function(){return this.text().then(JSON.parse)},this}var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function R(o){var d=o.toUpperCase();return E.indexOf(d)>-1?d:o}function A(o,d){d=d||{};var g=d.body;if(o instanceof A){if(o.bodyUsed)throw new TypeError("Already read");this.url=o.url,this.credentials=o.credentials,d.headers||(this.headers=new l(o.headers)),this.method=o.method,this.mode=o.mode,this.signal=o.signal,!g&&o._bodyInit!=null&&(g=o._bodyInit,o.bodyUsed=!0)}else this.url=String(o);if(this.credentials=d.credentials||this.credentials||"same-origin",(d.headers||!this.headers)&&(this.headers=new l(d.headers)),this.method=R(d.method||this.method||"GET"),this.mode=d.mode||this.mode||null,this.signal=d.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&g)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(g)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})};function K(o){var d=new FormData;return o.trim().split("&").forEach(function(g){if(g){var P=g.split("="),D=P.shift().replace(/\+/g," "),O=P.join("=").replace(/\+/g," ");d.append(decodeURIComponent(D),decodeURIComponent(O))}}),d}function V(o){var d=new l,g=o.replace(/\r?\n[\t ]+/g," ");return g.split(/\r?\n/).forEach(function(P){var D=P.split(":"),O=D.shift().trim();if(O){var Te=D.join(":").trim();d.append(O,Te)}}),d}S.call(A.prototype);function N(o,d){d||(d={}),this.type="default",this.status=d.status===void 0?200:d.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in d?d.statusText:"OK",this.headers=new l(d.headers),this.url=d.url||"",this._initBody(o)}S.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},N.error=function(){var o=new N(null,{status:0,statusText:""});return o.type="error",o};var Re=[301,302,303,307,308];N.redirect=function(o,d){if(Re.indexOf(d)===-1)throw new RangeError("Invalid status code");return new N(null,{status:d,headers:{location:o}})},r.DOMException=t.DOMException;try{new r.DOMException}catch{r.DOMException=function(d,g){this.message=d,this.name=g;var P=Error(d);this.stack=P.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function Q(o,d){return new Promise(function(g,P){var D=new A(o,d);if(D.signal&&D.signal.aborted)return P(new r.DOMException("Aborted","AbortError"));var O=new XMLHttpRequest;function Te(){O.abort()}O.onload=function(){var ge={status:O.status,statusText:O.statusText,headers:V(O.getAllResponseHeaders()||"")};ge.url="responseURL"in O?O.responseURL:ge.headers.get("X-Request-URL");var Xe="response"in O?O.response:O.responseText;g(new N(Xe,ge))},O.onerror=function(){P(new TypeError("Network request failed"))},O.ontimeout=function(){P(new TypeError("Network request failed"))},O.onabort=function(){P(new r.DOMException("Aborted","AbortError"))},O.open(D.method,D.url,!0),D.credentials==="include"?O.withCredentials=!0:D.credentials==="omit"&&(O.withCredentials=!1),"responseType"in O&&n.blob&&(O.responseType="blob"),D.headers.forEach(function(ge,Xe){O.setRequestHeader(Xe,ge)}),D.signal&&(D.signal.addEventListener("abort",Te),O.onreadystatechange=function(){O.readyState===4&&D.signal.removeEventListener("abort",Te)}),O.send(typeof D._bodyInit>"u"?null:D._bodyInit)})}return Q.polyfill=!0,t.fetch||(t.fetch=Q,t.Headers=l,t.Request=A,t.Response=N),r.Headers=l,r.Request=A,r.Response=N,r.fetch=Q,Object.defineProperty(r,"__esModule",{value:!0}),r}({})})(typeof self<"u"?self:Vt)});var un=x(F());var on=x(le()),Y=x(J()),q=x(F());var Ut=x(le()),hi={},jt=Ut.css`
2
- `;var an=x(F()),sn=x(J());var G=x(F());var Bt=x(F()),yn={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{t.request.paging.perPage=e.payload},setPageNumber:(t,e)=>{t.request.paging.page=e.payload},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.filters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setRequestClusterSortCriterion:(t,e)=>{var r;t.request.clusterSortCriterions=(r=e.payload)!==null&&r!==void 0?r:[]},setResults:(t,e)=>{t.results=e.payload},setFacets:(t,e)=>{t.facets=e.payload},setSpellcheck:(t,e)=>{t.spellcheck=e.payload},setLocales:(t,e)=>{t.locales=e.payload},setPaging:(t,e)=>{t.paging=e.payload},setLiveQuery:(t,e)=>{t.liveQuery=e.payload},setSuggestResults:(t,e)=>{t.suggestResults=e.payload},setRequestPeriodFilter:(t,e)=>{t.request.periodFilter=e.payload}},qt=t=>Bt.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],filters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:""},reducers:yn});var xi=x(Ht(),1);var zt;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(zt||(zt={}));var Kt;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Kt||(Kt={}));var $t;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})($t||($t={}));var Wt;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(Wt||(Wt={}));var Gt;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Gt||(Gt={}));var Qt;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Qt||(Qt={}));var Xt;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Xt||(Xt={}));var Yt;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Yt||(Yt={}));var Jt;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Jt||(Jt={}));var Zt;(function(t){t.ASC="ASC",t.DESC="DESC"})(Zt||(Zt={}));var er;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(er||(er={}));var fe;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(fe||(fe={}));var tr;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(tr||(tr={}));var rr;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(rr||(rr={}));var nr;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(nr||(nr={}));var ir;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(ir||(ir={}));var de;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"})(de||(de={}));var _;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"})(_||(_={}));var ar;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(ar||(ar={}));var Ei={[_.PERSONAL_BOOK_SHARE_USER]:[_.PERSONAL_BOOK_USER],[_.HTML_EXPORT_USER]:[_.PERSONAL_BOOK_USER],[_.PDF_EXPORT_USER]:[_.PERSONAL_BOOK_USER],[_.KHUB_ADMIN]:[_.CONTENT_PUBLISHER],[_.ADMIN]:[_.KHUB_ADMIN,_.USERS_ADMIN,_.PORTAL_ADMIN],[_.DEVELOPER]:[_.BETA_USER,_.DEBUG_USER]};var rn=x(F());var lr=x(le()),j=x(J()),H=x(F());var sr=x(le());var or=sr.css`
3
- `;var Ce=x(F()),mn="ft-app-info",Ye=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},vn={session:(t,e)=>{(0,Ce.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>b.eventBus.dispatchEvent(new Ye(e.payload)),0))}},b=Ce.FtReduxStore.get({name:mn,reducers:vn,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Z=x(F());var Je=x(F());var oe=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=b.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let i=b.subscribe(()=>{n=t.get(e),n&&(i(),r(n))})}})}};var $=class{constructor(e=!0,r){var n;this.overrideApi=r;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Je.CacheRegistry,this.cache=e?i.commonCache:new Je.CacheRegistry}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:oe.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):oe.await()}clearCache(){this.cache.clearAll()}};var ur,gn=Symbol("clearAfterUnitTest"),Ie=class extends ${constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ur]=()=>{this.defaultMessages={},this.cache=new Z.CacheRegistry,this.listeners={}},this.currentUiLocale=b.getState().uiLocale,b.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=b.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),Object.keys(r).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,Z.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}await this.fetchContext(e)}resolveMessage(e,r,...n){var i,a,s;e=e.toLowerCase(),this.fetchContext(e);let u=(a=(i=this.cache.getNow(e))===null||i===void 0?void 0:i.messages)!==null&&a!==void 0?a:{};return new Z.ParametrizedLabelResolver((s=this.defaultMessages[e])!==null&&s!==void 0?s:{},u).resolve(r,...n)}async fetchContext(e){if(!this.cache.has(e))try{await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),await this.notify(e)}catch(r){console.error(r)}}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(r=>(0,Z.delay)(0).then(()=>r()).catch(()=>null)))}};ur=gn;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ie{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ie{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var cr=window.FluidTopicsI18nService,Bi=window.FluidTopicsCustomI18nService;var L=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(s=t[u])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},I=class extends H.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>oe.get(),this.messageContexts=[],this.cache=new H.CacheRegistry,this.cleanSessionDebouncer=new H.Debouncer}render(){return lr.html`
1
+ "use strict";(()=>{var cn=Object.create;var Mt=Object.defineProperty;var ln=Object.getOwnPropertyDescriptor;var fn=Object.getOwnPropertyNames;var dn=Object.getPrototypeOf,hn=Object.prototype.hasOwnProperty;var Pe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var pn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fn(e))!hn.call(t,i)&&i!==r&&Mt(t,i,{get:()=>e[i],enumerable:!(n=ln(e,i))||n.enumerable});return t};var O=(t,e,r)=>(r=t!=null?cn(dn(t)):{},pn(e||!t||!t.__esModule?Mt(r,"default",{value:t,enumerable:!0}):r,t));var F=Pe((li,kt)=>{kt.exports=ftGlobals.wcUtils});var le=Pe((fi,Lt)=>{Lt.exports=ftGlobals.lit});var J=Pe((di,Ft)=>{Ft.exports=ftGlobals.litDecorators});var Ht=Pe(Vt=>{(function(t){var e=function(r){var n={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function i(o){return o&&DataView.prototype.isPrototypeOf(o)}if(n.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(o){return o&&a.indexOf(Object.prototype.toString.call(o))>-1};function u(o){if(typeof o!="string"&&(o=String(o)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(o))throw new TypeError("Invalid character in header field name");return o.toLowerCase()}function f(o){return typeof o!="string"&&(o=String(o)),o}function c(o){var d={next:function(){var g=o.shift();return{done:g===void 0,value:g}}};return n.iterable&&(d[Symbol.iterator]=function(){return d}),d}function l(o){this.map={},o instanceof l?o.forEach(function(d,g){this.append(g,d)},this):Array.isArray(o)?o.forEach(function(d){this.append(d[0],d[1])},this):o&&Object.getOwnPropertyNames(o).forEach(function(d){this.append(d,o[d])},this)}l.prototype.append=function(o,d){o=u(o),d=f(d);var g=this.map[o];this.map[o]=g?g+", "+d:d},l.prototype.delete=function(o){delete this.map[u(o)]},l.prototype.get=function(o){return o=u(o),this.has(o)?this.map[o]:null},l.prototype.has=function(o){return this.map.hasOwnProperty(u(o))},l.prototype.set=function(o,d){this.map[u(o)]=f(d)},l.prototype.forEach=function(o,d){for(var g in this.map)this.map.hasOwnProperty(g)&&o.call(d,this.map[g],g,this)},l.prototype.keys=function(){var o=[];return this.forEach(function(d,g){o.push(g)}),c(o)},l.prototype.values=function(){var o=[];return this.forEach(function(d){o.push(d)}),c(o)},l.prototype.entries=function(){var o=[];return this.forEach(function(d,g){o.push([g,d])}),c(o)},n.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);function m(o){if(o.bodyUsed)return Promise.reject(new TypeError("Already read"));o.bodyUsed=!0}function h(o){return new Promise(function(d,g){o.onload=function(){d(o.result)},o.onerror=function(){g(o.error)}})}function v(o){var d=new FileReader,g=h(d);return d.readAsArrayBuffer(o),g}function p(o){var d=new FileReader,g=h(d);return d.readAsText(o),g}function y(o){for(var d=new Uint8Array(o),g=new Array(d.length),P=0;P<d.length;P++)g[P]=String.fromCharCode(d[P]);return g.join("")}function w(o){if(o.slice)return o.slice(0);var d=new Uint8Array(o.byteLength);return d.set(new Uint8Array(o)),d.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(o){this._bodyInit=o,o?typeof o=="string"?this._bodyText=o:n.blob&&Blob.prototype.isPrototypeOf(o)?this._bodyBlob=o:n.formData&&FormData.prototype.isPrototypeOf(o)?this._bodyFormData=o:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(o)?this._bodyText=o.toString():n.arrayBuffer&&n.blob&&i(o)?(this._bodyArrayBuffer=w(o.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(o)||s(o))?this._bodyArrayBuffer=w(o):this._bodyText=o=Object.prototype.toString.call(o):this._bodyText="",this.headers.get("content-type")||(typeof o=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(o)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var o=m(this);if(o)return o;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(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var o=m(this);if(o)return o;if(this._bodyBlob)return p(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(y(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n.formData&&(this.formData=function(){return this.text().then(K)}),this.json=function(){return this.text().then(JSON.parse)},this}var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function R(o){var d=o.toUpperCase();return E.indexOf(d)>-1?d:o}function A(o,d){d=d||{};var g=d.body;if(o instanceof A){if(o.bodyUsed)throw new TypeError("Already read");this.url=o.url,this.credentials=o.credentials,d.headers||(this.headers=new l(o.headers)),this.method=o.method,this.mode=o.mode,this.signal=o.signal,!g&&o._bodyInit!=null&&(g=o._bodyInit,o.bodyUsed=!0)}else this.url=String(o);if(this.credentials=d.credentials||this.credentials||"same-origin",(d.headers||!this.headers)&&(this.headers=new l(d.headers)),this.method=R(d.method||this.method||"GET"),this.mode=d.mode||this.mode||null,this.signal=d.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&g)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(g)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})};function K(o){var d=new FormData;return o.trim().split("&").forEach(function(g){if(g){var P=g.split("="),D=P.shift().replace(/\+/g," "),x=P.join("=").replace(/\+/g," ");d.append(decodeURIComponent(D),decodeURIComponent(x))}}),d}function V(o){var d=new l,g=o.replace(/\r?\n[\t ]+/g," ");return g.split(/\r?\n/).forEach(function(P){var D=P.split(":"),x=D.shift().trim();if(x){var Te=D.join(":").trim();d.append(x,Te)}}),d}S.call(A.prototype);function N(o,d){d||(d={}),this.type="default",this.status=d.status===void 0?200:d.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in d?d.statusText:"OK",this.headers=new l(d.headers),this.url=d.url||"",this._initBody(o)}S.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},N.error=function(){var o=new N(null,{status:0,statusText:""});return o.type="error",o};var Re=[301,302,303,307,308];N.redirect=function(o,d){if(Re.indexOf(d)===-1)throw new RangeError("Invalid status code");return new N(null,{status:d,headers:{location:o}})},r.DOMException=t.DOMException;try{new r.DOMException}catch{r.DOMException=function(d,g){this.message=d,this.name=g;var P=Error(d);this.stack=P.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function Q(o,d){return new Promise(function(g,P){var D=new A(o,d);if(D.signal&&D.signal.aborted)return P(new r.DOMException("Aborted","AbortError"));var x=new XMLHttpRequest;function Te(){x.abort()}x.onload=function(){var ge={status:x.status,statusText:x.statusText,headers:V(x.getAllResponseHeaders()||"")};ge.url="responseURL"in x?x.responseURL:ge.headers.get("X-Request-URL");var Xe="response"in x?x.response:x.responseText;g(new N(Xe,ge))},x.onerror=function(){P(new TypeError("Network request failed"))},x.ontimeout=function(){P(new TypeError("Network request failed"))},x.onabort=function(){P(new r.DOMException("Aborted","AbortError"))},x.open(D.method,D.url,!0),D.credentials==="include"?x.withCredentials=!0:D.credentials==="omit"&&(x.withCredentials=!1),"responseType"in x&&n.blob&&(x.responseType="blob"),D.headers.forEach(function(ge,Xe){x.setRequestHeader(Xe,ge)}),D.signal&&(D.signal.addEventListener("abort",Te),x.onreadystatechange=function(){x.readyState===4&&D.signal.removeEventListener("abort",Te)}),x.send(typeof D._bodyInit>"u"?null:D._bodyInit)})}return Q.polyfill=!0,t.fetch||(t.fetch=Q,t.Headers=l,t.Request=A,t.Response=N),r.Headers=l,r.Request=A,r.Response=N,r.fetch=Q,Object.defineProperty(r,"__esModule",{value:!0}),r}({})})(typeof self<"u"?self:Vt)});var un=O(F());var on=O(le()),Y=O(J()),q=O(F());var Ut=O(le()),hi={},jt=Ut.css`
2
+ `;var an=O(F()),sn=O(J());var G=O(F());var Bt=O(F()),yn={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{t.request.paging.perPage=e.payload},setPageNumber:(t,e)=>{t.request.paging.page=e.payload},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.filters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setRequestClusterSortCriterion:(t,e)=>{var r;t.request.clusterSortCriterions=(r=e.payload)!==null&&r!==void 0?r:[]},setResults:(t,e)=>{t.results=e.payload},setFacets:(t,e)=>{t.facets=e.payload},setSpellcheck:(t,e)=>{t.spellcheck=e.payload},setLocales:(t,e)=>{t.locales=e.payload},setPaging:(t,e)=>{t.paging=e.payload},setLiveQuery:(t,e)=>{t.liveQuery=e.payload},setSuggestResults:(t,e)=>{t.suggestResults=e.payload},setRequestPeriodFilter:(t,e)=>{t.request.periodFilter=e.payload}},qt=t=>Bt.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],filters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:""},reducers:yn});var Oi=O(Ht(),1);var zt;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(zt||(zt={}));var Kt;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Kt||(Kt={}));var $t;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})($t||($t={}));var Wt;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(Wt||(Wt={}));var Gt;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Gt||(Gt={}));var Qt;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Qt||(Qt={}));var Xt;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Xt||(Xt={}));var Yt;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Yt||(Yt={}));var Jt;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Jt||(Jt={}));var Zt;(function(t){t.ASC="ASC",t.DESC="DESC"})(Zt||(Zt={}));var er;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(er||(er={}));var fe;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(fe||(fe={}));var tr;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(tr||(tr={}));var rr;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(rr||(rr={}));var nr;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(nr||(nr={}));var ir;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(ir||(ir={}));var de;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"})(de||(de={}));var _;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"})(_||(_={}));var ar;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(ar||(ar={}));var Ei={[_.PERSONAL_BOOK_SHARE_USER]:[_.PERSONAL_BOOK_USER],[_.HTML_EXPORT_USER]:[_.PERSONAL_BOOK_USER],[_.PDF_EXPORT_USER]:[_.PERSONAL_BOOK_USER],[_.KHUB_ADMIN]:[_.CONTENT_PUBLISHER],[_.ADMIN]:[_.KHUB_ADMIN,_.USERS_ADMIN,_.PORTAL_ADMIN],[_.DEVELOPER]:[_.BETA_USER,_.DEBUG_USER]};var rn=O(F());var lr=O(le()),j=O(J()),H=O(F());var sr=O(le());var or=sr.css`
3
+ `;var Ce=O(F()),mn="ft-app-info",Ye=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},vn={session:(t,e)=>{(0,Ce.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>b.eventBus.dispatchEvent(new Ye(e.payload)),0))}},b=Ce.FtReduxStore.get({name:mn,reducers:vn,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Z=O(F());var Je=O(F());var oe=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=b.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let i=b.subscribe(()=>{n=t.get(e),n&&(i(),r(n))})}})}};var $=class{constructor(e=!0,r){var n;this.overrideApi=r;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Je.CacheRegistry,this.cache=e?i.commonCache:new Je.CacheRegistry}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:oe.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):oe.await()}clearCache(){this.cache.clearAll()}};var ur,gn=Symbol("clearAfterUnitTest"),Ie=class extends ${constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ur]=()=>{this.defaultMessages={},this.cache=new Z.CacheRegistry,this.listeners={}},this.currentUiLocale=b.getState().uiLocale,b.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=b.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),Object.keys(r).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,Z.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}await this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new Z.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(e){if(!this.cache.has(e))try{await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),await this.notify(e)}catch(r){console.error(r)}}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(r=>(0,Z.delay)(0).then(()=>r()).catch(()=>null)))}};ur=gn;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ie{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ie{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var cr=window.FluidTopicsI18nService,Bi=window.FluidTopicsCustomI18nService;var L=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(s=t[u])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},I=class extends H.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>oe.get(),this.messageContexts=[],this.cache=new H.CacheRegistry,this.cleanSessionDebouncer=new H.Debouncer}render(){return lr.html`
4
4
  <slot></slot>
5
- `}update(e){super.update(e),e.has("baseUrl")&&(b.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&b.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&b.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&b.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&b.actions.noCustom(this.noCustom),e.has("editorMode")&&b.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&b.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&b.actions.session(this.session),e.has("availableUiLocales")&&b.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(r=>cr.addContext(r)),e.has("openExternalDocumentInNewTab")&&b.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&b.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&b.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};I.elementDefinitions={};I.styles=or;L([(0,j.property)()],I.prototype,"baseUrl",void 0);L([(0,j.property)()],I.prototype,"apiIntegrationIdentifier",void 0);L([(0,j.property)()],I.prototype,"uiLocale",void 0);L([(0,H.jsonProperty)(null)],I.prototype,"availableUiLocales",void 0);L([(0,H.jsonProperty)(null)],I.prototype,"metadataConfiguration",void 0);L([(0,j.property)({type:Boolean})],I.prototype,"editorMode",void 0);L([(0,j.property)({type:Boolean})],I.prototype,"noCustom",void 0);L([(0,j.property)({type:Boolean})],I.prototype,"openExternalDocumentInNewTab",void 0);L([(0,j.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],I.prototype,"noCustomComponent",void 0);L([(0,j.property)({type:Boolean})],I.prototype,"withManualResources",void 0);L([(0,j.property)({type:Boolean})],I.prototype,"navigatorOnline",void 0);L([(0,j.property)({type:Boolean})],I.prototype,"forcedOffline",void 0);L([(0,j.property)({type:Object})],I.prototype,"apiProvider",void 0);L([(0,H.jsonProperty)([])],I.prototype,"messageContexts",void 0);L([(0,H.jsonProperty)(void 0)],I.prototype,"session",void 0);var ii=x(J());function bn(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!_e(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!_e(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){var a=i[n];if(!_e(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function _e(t,e){try{return bn(t,e)}catch{return!1}}function Ze(t,e){return!_e(t,e)}var Sn=x(J(),1);var De=class{constructor(){this.queue=[]}add(e,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};var be=x(J(),1);var fr=x(J(),1);function dr(t,e){let r=()=>JSON.parse(JSON.stringify(t));return(0,fr.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Ze,...e??{}})}var Ne=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(u){i(u);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var pr=x(le(),1);var Me=window,En=Me.ShadowRoot&&(Me.ShadyCSS===void 0||Me.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ra=Symbol();var hr=(t,e)=>{En?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{let n=document.createElement("style"),i=Me.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)})};var ke=class extends pr.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return hr(n,e.elementStyles),n}};var Le=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(s=t[u])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},gr,yr=Symbol("constructorPrototype"),mr=Symbol("constructorName"),br=Symbol("exportpartsDebouncer"),vr=Symbol("dynamicDependenciesLoaded"),ee=class extends ke{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[gr]=new Ne(5),this[mr]=this.constructor.name,this[yr]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[mr]&&Object.setPrototypeOf(this,this[yr])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let e=this.constructor;e[vr]||(e[vr]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}applyCustomStylesheet(e){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[br].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var r,n,i,a,s,u;let f=h=>h!=null&&h.trim().length>0,c=e.filter(f).map(h=>h.trim());if(c.length===0){this.removeAttribute("exportparts");return}let l=new Set;for(let h of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(a=(i=h.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],p=(u=(s=h.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(y=>y.split(":")[1]))!==null&&u!==void 0?u:[];new Array(...v,...p).filter(f).map(y=>y.trim()).forEach(y=>l.add(y))}if(l.size===0){this.removeAttribute("exportparts");return}let m=[...l.values()].flatMap(h=>c.map(v=>`${h}:${v}--${h}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};gr=br;Le([(0,be.property)()],ee.prototype,"exportpartsPrefix",void 0);Le([dr([])],ee.prototype,"exportpartsPrefixes",void 0);Le([(0,be.property)()],ee.prototype,"customStylesheet",void 0);Le([(0,be.state)()],ee.prototype,"useAdoptedStyleSheets",void 0);function Se(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Sr,Er,Ar,Fe=Symbol("internalReduxEventsUnsubscribers"),te=Symbol("internalStoresUnsubscribers"),ue=Symbol("internalStores"),Ee=class extends ee{constructor(){super(...arguments),this[Sr]=new Map,this[Er]=new Map,this[Ar]=[]}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(r=>e.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[ue].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ue].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[ue].get(e)}addStore(e,r){var n;r=(n=r??(Se(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this.setupStore(r,e)}removeStore(e){let r=typeof e=="string"?e:e.name;this.unsubscribeFromStore(r),this[ue].delete(r)}setupStore(e,r){this[ue].set(e,r),this.subscribeToStore(e,r),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[ue].forEach((e,r)=>this.subscribeToStore(r,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let i=this.getStore(e.store);i&&(e.store?this[te].has(e.store):this[te].size>0)&&(this[r]=e.selector(i.getState(),this))}})}subscribeToStore(e,r){var n;this[te].set(e,r.subscribe(()=>this.updateFromStores())),Se(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||r.name===i.store)){let s=u=>this[a](u);r.eventBus.addEventListener(i.eventName,s),this[Fe].push(()=>r.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[te].forEach((e,r)=>this.unsubscribeFromStore(r)),this[Fe].forEach(e=>e()),this[Fe]=[]}unsubscribeFromStore(e){this[te].has(e)&&this[te].get(e)(),this[te].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Sr=te,Er=ue,Ar=Fe;Ee.reduxProperties=new Map;Ee.reduxReactiveProperties=new Set;Ee.reduxEventListeners=new Map;function B(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function X(t){return!!t&&!!t[T]}function z(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Cn}(t)||Array.isArray(t)||!!t[Cr]||!!(!((e=t.constructor)===null||e===void 0)&&e[Cr])||ut(t)||ct(t))}function ce(t,e,r){r===void 0&&(r=!1),ye(t)===0?(r?Object.keys:pe)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function ye(t){var e=t[T];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ut(t)?2:ct(t)?3:0}function he(t,e){return ye(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function An(t,e){return ye(t)===2?t.get(e):t[e]}function Ir(t,e,r){var n=ye(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function _r(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ut(t){return Tn&&t instanceof Map}function ct(t){return Pn&&t instanceof Set}function re(t){return t.o||t.t}function lt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Mr(t);delete e[T];for(var r=pe(e),n=0;n<r.length;n++){var i=r[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ft(t,e){return e===void 0&&(e=!1),dt(t)||X(t)||!z(t)||(ye(t)>1&&(t.set=t.add=t.clear=t.delete=wn),Object.freeze(t),e&&ce(t,function(r,n){return ft(n,!0)},!0)),t}function wn(){B(2)}function dt(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function W(t){var e=ot[t];return e||B(18,t),e}function On(t,e){ot[t]||(ot[t]=e)}function it(){return we}function et(t,e){e&&(W("Patches"),t.u=[],t.s=[],t.v=e)}function Ue(t){at(t),t.p.forEach(xn),t.p=null}function at(t){t===we&&(we=t.l)}function wr(t){return we={p:[],l:we,h:t,m:!0,_:0}}function xn(t){var e=t[T];e.i===0||e.i===1?e.j():e.g=!0}function tt(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||W("ES5").S(e,t,n),n?(r[T].P&&(Ue(e),B(4)),z(t)&&(t=je(e,t),e.l||Be(e,t)),e.u&&W("Patches").M(r[T].t,t,e.u,e.s)):t=je(e,r,[]),Ue(e),e.u&&e.v(e.u,e.s),t!==Nr?t:void 0}function je(t,e,r){if(dt(e))return e;var n=e[T];if(!n)return ce(e,function(u,f){return Or(t,n,e,u,f,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Be(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=lt(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),ce(a,function(u,f){return Or(t,n,i,u,f,r,s)}),Be(t,i,!1),r&&t.u&&W("Patches").N(n,r,t.u,t.s)}return n.o}function Or(t,e,r,n,i,a,s){if(X(i)){var u=je(t,i,a&&e&&e.i!==3&&!he(e.R,n)?a.concat(n):void 0);if(Ir(r,n,u),!X(u))return;t.m=!1}else s&&r.add(i);if(z(i)&&!dt(i)){if(!t.h.D&&t._<1)return;je(t,i),e&&e.A.l||Be(t,i)}}function Be(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&ft(e,r)}function rt(t,e){var r=t[T];return(r?re(r):t)[e]}function xr(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function ne(t){t.P||(t.P=!0,t.l&&ne(t.l))}function nt(t){t.o||(t.o=lt(t.t))}function st(t,e,r){var n=ut(e)?W("MapSet").F(e,r):ct(e)?W("MapSet").T(e,r):t.O?function(i,a){var s=Array.isArray(i),u={i:s?1:0,A:a?a.A:it(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},f=u,c=Oe;s&&(f=[u],c=Ae);var l=Proxy.revocable(f,c),m=l.revoke,h=l.proxy;return u.k=h,u.j=m,h}(e,r):W("ES5").J(e,r);return(r?r.A:it()).p.push(n),n}function Rn(t){return X(t)||B(22,t),function e(r){if(!z(r))return r;var n,i=r[T],a=ye(r);if(i){if(!i.P&&(i.i<4||!W("ES5").K(i)))return i.t;i.I=!0,n=Rr(r,a),i.I=!1}else n=Rr(r,a);return ce(n,function(s,u){i&&An(i.t,s)===u||Ir(n,s,e(u))}),a===3?new Set(n):n}(t)}function Rr(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return lt(t)}function Dr(){function t(s,u){var f=a[s];return f?f.enumerable=u:a[s]=f={configurable:!0,enumerable:u,get:function(){var c=this[T];return Oe.get(c,s)},set:function(c){var l=this[T];Oe.set(l,s,c)}},f}function e(s){for(var u=s.length-1;u>=0;u--){var f=s[u][T];if(!f.P)switch(f.i){case 5:n(f)&&ne(f);break;case 4:r(f)&&ne(f)}}}function r(s){for(var u=s.t,f=s.k,c=pe(f),l=c.length-1;l>=0;l--){var m=c[l];if(m!==T){var h=u[m];if(h===void 0&&!he(u,m))return!0;var v=f[m],p=v&&v[T];if(p?p.t!==h:!_r(v,h))return!0}}var y=!!u[T];return c.length!==pe(u).length+(y?0:1)}function n(s){var u=s.k;if(u.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(u,u.length-1);if(f&&!f.get)return!0;for(var c=0;c<u.length;c++)if(!u.hasOwnProperty(c))return!0;return!1}function i(s){s.g&&B(3,JSON.stringify(re(s)))}var a={};On("ES5",{J:function(s,u){var f=Array.isArray(s),c=function(m,h){if(m){for(var v=Array(h.length),p=0;p<h.length;p++)Object.defineProperty(v,""+p,t(p,!0));return v}var y=Mr(h);delete y[T];for(var w=pe(y),S=0;S<w.length;S++){var E=w[S];y[E]=t(E,m||!!y[E].enumerable)}return Object.create(Object.getPrototypeOf(h),y)}(f,s),l={i:f?5:4,A:u?u.A:it(),P:!1,I:!1,R:{},l:u,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,T,{value:l,writable:!0}),c},S:function(s,u,f){f?X(u)&&u[T].A===s&&e(s.p):(s.u&&function c(l){if(l&&typeof l=="object"){var m=l[T];if(m){var h=m.t,v=m.k,p=m.R,y=m.i;if(y===4)ce(v,function(A){A!==T&&(h[A]!==void 0||he(h,A)?p[A]||c(v[A]):(p[A]=!0,ne(m)))}),ce(h,function(A){v[A]!==void 0||he(v,A)||(p[A]=!1,ne(m))});else if(y===5){if(n(m)&&(ne(m),p.length=!0),v.length<h.length)for(var w=v.length;w<h.length;w++)p[w]=!1;else for(var S=h.length;S<v.length;S++)p[S]=!0;for(var E=Math.min(v.length,h.length),R=0;R<E;R++)v.hasOwnProperty(R)||(p[R]=!0),p[R]===void 0&&c(v[R])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var Tr,we,ht=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Tn=typeof Map<"u",Pn=typeof Set<"u",Pr=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Nr=ht?Symbol.for("immer-nothing"):((Tr={})["immer-nothing"]=!0,Tr),Cr=ht?Symbol.for("immer-draftable"):"__$immer_draftable",T=ht?Symbol.for("immer-state"):"__$immer_state";var Cn=""+Object.prototype.constructor,pe=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Mr=Object.getOwnPropertyDescriptors||function(t){var e={};return pe(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},ot={},Oe={get:function(t,e){if(e===T)return t;var r=re(t);if(!he(r,e))return function(i,a,s){var u,f=xr(a,s);return f?"value"in f?f.value:(u=f.get)===null||u===void 0?void 0:u.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!z(n)?n:n===rt(t.t,e)?(nt(t),t.o[e]=st(t.A.h,n,t)):n},has:function(t,e){return e in re(t)},ownKeys:function(t){return Reflect.ownKeys(re(t))},set:function(t,e,r){var n=xr(re(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var i=rt(re(t),e),a=i?.[T];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(_r(r,i)&&(r!==void 0||he(t.t,e)))return!0;nt(t),ne(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return rt(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,nt(t),ne(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=re(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){B(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){B(12)}},Ae={};ce(Oe,function(t,e){Ae[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Ae.deleteProperty=function(t,e){return Ae.set.call(this,t,e,void 0)},Ae.set=function(t,e,r){return Oe.set.call(this,t[0],e,r,t[0])};var In=function(){function t(r){var n=this;this.O=Pr,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var u=a;a=i;var f=n;return function(y){var w=this;y===void 0&&(y=u);for(var S=arguments.length,E=Array(S>1?S-1:0),R=1;R<S;R++)E[R-1]=arguments[R];return f.produce(y,function(A){var K;return(K=a).call.apply(K,[w,A].concat(E))})}}var c;if(typeof a!="function"&&B(6),s!==void 0&&typeof s!="function"&&B(7),z(i)){var l=wr(n),m=st(n,i,void 0),h=!0;try{c=a(m),h=!1}finally{h?Ue(l):at(l)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(y){return et(l,s),tt(y,l)},function(y){throw Ue(l),y}):(et(l,s),tt(c,l))}if(!i||typeof i!="object"){if((c=a(i))===void 0&&(c=i),c===Nr&&(c=void 0),n.D&&ft(c,!0),s){var v=[],p=[];W("Patches").M(i,c,v,p),s(v,p)}return c}B(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(c){for(var l=arguments.length,m=Array(l>1?l-1:0),h=1;h<l;h++)m[h-1]=arguments[h];return n.produceWithPatches(c,function(v){return i.apply(void 0,[v].concat(m))})};var s,u,f=n.produce(i,a,function(c,l){s=c,u=l});return typeof Promise<"u"&&f instanceof Promise?f.then(function(c){return[c,s,u]}):[f,s,u]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){z(r)||B(8),X(r)&&(r=Rn(r));var n=wr(this),i=st(this,r,void 0);return i[T].C=!0,at(n),i},e.finishDraft=function(r,n){var i=r&&r[T],a=i.A;return et(a,n),tt(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Pr&&B(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var s=W("Patches").$;return X(r)?s(r,n):this.produce(r,function(u){return s(u,n)})},t}(),U=new In,_n=U.produce,pa=U.produceWithPatches.bind(U),ya=U.setAutoFreeze.bind(U),ma=U.setUseProxies.bind(U),va=U.applyPatches.bind(U),ga=U.createDraft.bind(U),ba=U.finishDraft.bind(U),qe=_n;function ie(t){"@babel/helpers - typeof";return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ie(t)}function pt(t,e){if(ie(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ie(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yt(t){var e=pt(t,"string");return ie(e)==="symbol"?e:String(e)}function mt(t,e,r){return e=yt(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ve(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?kr(Object(r),!0).forEach(function(n){mt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function M(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Lr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),vt=function(){return Math.random().toString(36).substring(7).split("").join(".")},He={INIT:"@@redux/INIT"+vt(),REPLACE:"@@redux/REPLACE"+vt(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+vt()}};function Dn(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function gt(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(M(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(M(1));return r(gt)(t,e)}if(typeof t!="function")throw new Error(M(2));var i=t,a=e,s=[],u=s,f=!1;function c(){u===s&&(u=s.slice())}function l(){if(f)throw new Error(M(3));return a}function m(y){if(typeof y!="function")throw new Error(M(4));if(f)throw new Error(M(5));var w=!0;return c(),u.push(y),function(){if(w){if(f)throw new Error(M(6));w=!1,c();var E=u.indexOf(y);u.splice(E,1),s=null}}}function h(y){if(!Dn(y))throw new Error(M(7));if(typeof y.type>"u")throw new Error(M(8));if(f)throw new Error(M(9));try{f=!0,a=i(a,y)}finally{f=!1}for(var w=s=u,S=0;S<w.length;S++){var E=w[S];E()}return y}function v(y){if(typeof y!="function")throw new Error(M(10));i=y,h({type:He.REPLACE})}function p(){var y,w=m;return y={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(M(11));function R(){E.next&&E.next(l())}R();var A=w(R);return{unsubscribe:A}}},y[Lr]=function(){return this},y}return h({type:He.INIT}),n={dispatch:h,subscribe:m,getState:l,replaceReducer:v},n[Lr]=p,n}function Nn(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:He.INIT});if(typeof n>"u")throw new Error(M(12));if(typeof r(void 0,{type:He.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(M(13))})}function Fr(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var a=Object.keys(r),s,u;try{Nn(r)}catch(f){u=f}return function(c,l){if(c===void 0&&(c={}),u)throw u;if(0)var m;for(var h=!1,v={},p=0;p<a.length;p++){var y=a[p],w=r[y],S=c[y],E=w(S,l);if(typeof E>"u"){var R=l&&l.type;throw new Error(M(14))}v[y]=E,h=h||E!==S}return h=h||a.length!==Object.keys(c).length,h?v:c}}function me(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Ur(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(M(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},u=e.map(function(f){return f(s)});return a=me.apply(void 0,u)(i.dispatch),Ve(Ve({},i),{},{dispatch:a})}}}function jr(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(u){return typeof u=="function"?u(i,a,t):s(u)}}};return e}var Br=jr();Br.withExtraArgument=jr;var bt=Br;var Kr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mn=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(c){return function(l){return f([c,l])}}function f(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],i=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ve=function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},kn=Object.defineProperty,Ln=Object.defineProperties,Fn=Object.getOwnPropertyDescriptors,qr=Object.getOwnPropertySymbols,Un=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,Vr=function(t,e,r){return e in t?kn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},ae=function(t,e){for(var r in e||(e={}))Un.call(e,r)&&Vr(t,r,e[r]);if(qr)for(var n=0,i=qr(e);n<i.length;n++){var r=i[n];jn.call(e,r)&&Vr(t,r,e[r])}return t},St=function(t,e){return Ln(t,Fn(e))},Bn=function(t,e,r){return new Promise(function(n,i){var a=function(f){try{u(r.next(f))}catch(c){i(c)}},s=function(f){try{u(r.throw(f))}catch(c){i(c)}},u=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(a,s)};u((r=r.apply(t,e)).next())})};var qn=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?me:me.apply(null,arguments)},Fa=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Vn(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var Hn=function(t){Kr(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ve([void 0],r[0].concat(this)))):new(e.bind.apply(e,ve([void 0],r.concat(this))))},e}(Array),zn=function(t){Kr(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ve([void 0],r[0].concat(this)))):new(e.bind.apply(e,ve([void 0],r.concat(this))))},e}(Array);function wt(t){return z(t)?qe(t,function(){}):t}function Kn(t){return typeof t=="boolean"}function $n(){return function(e){return Wn(e)}}function Wn(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,u=new Hn;if(r&&(Kn(r)?u.push(bt):u.push(bt.withExtraArgument(r.extraArgument))),0){if(i)var f;if(s)var c}return u}var Et=!0;function $r(t){var e=$n(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,s=a===void 0?e():a,u=r.devTools,f=u===void 0?!0:u,c=r.preloadedState,l=c===void 0?void 0:c,m=r.enhancers,h=m===void 0?void 0:m,v;if(typeof i=="function")v=i;else if(Vn(i))v=Fr(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 p=s;if(typeof p=="function"&&(p=p(e),!Et&&!Array.isArray(p)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Et&&p.some(function(A){return typeof A!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=Ur.apply(void 0,p),w=me;f&&(w=qn(ae({trace:!Et},typeof f=="object"&&f)));var S=new zn(y),E=S;Array.isArray(h)?E=ve([y],h):typeof h=="function"&&(E=h(S));var R=w.apply(void 0,E);return gt(v,l,R)}function se(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return ae(ae({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}function Wr(t){var e={},r=[],n,i={addCase:function(a,s){var u=typeof a=="string"?a:a.type;if(u in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[u]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,r,n]}function Gn(t){return typeof t=="function"}function Qn(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?Wr(e):[e,r,n],a=i[0],s=i[1],u=i[2],f;if(Gn(t))f=function(){return wt(t())};else{var c=wt(t);f=function(){return c}}function l(m,h){m===void 0&&(m=f());var v=ve([a[h.type]],s.filter(function(p){var y=p.matcher;return y(h)}).map(function(p){var y=p.reducer;return y}));return v.filter(function(p){return!!p}).length===0&&(v=[u]),v.reduce(function(p,y){if(y)if(X(p)){var w=p,S=y(w,h);return S===void 0?p:S}else{if(z(p))return qe(p,function(E){return y(E,h)});var S=y(p,h);if(S===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return p},m)}return l.getInitialState=f,l}function Xn(t,e){return t+"/"+e}function Gr(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:wt(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},u={};i.forEach(function(l){var m=n[l],h=Xn(e,l),v,p;"reducer"in m?(v=m.reducer,p=m.prepare):v=m,a[l]=v,s[h]=v,u[l]=p?se(h,p):se(h)});function f(){var l=typeof t.extraReducers=="function"?Wr(t.extraReducers):[t.extraReducers],m=l[0],h=m===void 0?{}:m,v=l[1],p=v===void 0?[]:v,y=l[2],w=y===void 0?void 0:y,S=ae(ae({},h),s);return Qn(r,function(E){for(var R in S)E.addCase(R,S[R]);for(var A=0,K=p;A<K.length;A++){var V=K[A];E.addMatcher(V.matcher,V.reducer)}w&&E.addDefaultCase(w)})}var c;return{name:e,reducer:function(l,m){return c||(c=f()),c(l,m)},actions:u,caseReducers:a,getInitialState:function(){return c||(c=f()),c.getInitialState()}}}var Yn="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Jn=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Yn[Math.random()*64|0];return e},Zn=["name","message","stack","code"],At=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),Hr=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),ei=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=Zn;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},qa=function(){function t(e,r,n){var i=se(e+"/fulfilled",function(l,m,h,v){return{payload:l,meta:St(ae({},v||{}),{arg:h,requestId:m,requestStatus:"fulfilled"})}}),a=se(e+"/pending",function(l,m,h){return{payload:void 0,meta:St(ae({},h||{}),{arg:m,requestId:l,requestStatus:"pending"})}}),s=se(e+"/rejected",function(l,m,h,v,p){return{payload:v,error:(n&&n.serializeError||ei)(l||"Rejected"),meta:St(ae({},p||{}),{arg:h,requestId:m,rejectedWithValue:!!v,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"})}}),u=!1,f=typeof AbortController<"u"?AbortController:function(){function l(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return l.prototype.abort=function(){},l}();function c(l){return function(m,h,v){var p=n?.idGenerator?n.idGenerator(l):Jn(),y=new f,w,S=!1;function E(A){w=A,y.abort()}var R=function(){return Bn(this,null,function(){var A,K,V,N,Re,Q,o;return Mn(this,function(d){switch(d.label){case 0:return d.trys.push([0,4,,5]),N=(A=n?.condition)==null?void 0:A.call(n,l,{getState:h,extra:v}),ri(N)?[4,N]:[3,2];case 1:N=d.sent(),d.label=2;case 2:if(N===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,Re=new Promise(function(g,P){return y.signal.addEventListener("abort",function(){return P({name:"AbortError",message:w||"Aborted"})})}),m(a(p,l,(K=n?.getPendingMeta)==null?void 0:K.call(n,{requestId:p,arg:l},{getState:h,extra:v}))),[4,Promise.race([Re,Promise.resolve(r(l,{dispatch:m,getState:h,extra:v,requestId:p,signal:y.signal,abort:E,rejectWithValue:function(g,P){return new At(g,P)},fulfillWithValue:function(g,P){return new Hr(g,P)}})).then(function(g){if(g instanceof At)throw g;return g instanceof Hr?i(g.payload,p,l,g.meta):i(g,p,l)})])];case 3:return V=d.sent(),[3,5];case 4:return Q=d.sent(),V=Q instanceof At?s(null,p,l,Q.payload,Q.meta):s(Q,p,l),[3,5];case 5:return o=n&&!n.dispatchConditionRejection&&s.match(V)&&V.meta.condition,o||m(V),[2,V]}})})}();return Object.assign(R,{abort:E,requestId:p,arg:l,unwrap:function(){return R.then(ti)}})}}return Object.assign(c,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function ti(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ri(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Qr="listener",Xr="completed",Yr="cancelled",Va="task-"+Yr,Ha="task-"+Xr,za=Qr+"-"+Yr,Ka=Qr+"-"+Xr;var Ot="listenerMiddleware";var $a=se(Ot+"/add"),Wa=se(Ot+"/removeAll"),Ga=se(Ot+"/remove");var zr,Qa=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(zr||(zr=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},ni=function(t){return function(e){setTimeout(e,t)}},Xa=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ni(10);Dr();window.ftReduxStores||(window.ftReduxStores={});var Jr=class t{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Se(a))return a;if(i==null)return;let s=Gr({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),u=$r({reducer:(f,c)=>c.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...c.overwrites}:s.reducer(f,c)});return window.ftReduxStores[i.name]=new t(s,u)}constructor(e,r){this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new De,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,u=n[s];return u?(...f)=>{let c=u(...f);return this.reduxStore.dispatch(c),c}:f=>{this.setState({[s]:f})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var We=x(F());var ze=class extends ${async listMySearches(){let e=b.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Ke=class extends ${async listMyBookmarks(){let e=b.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var ai="ft-user-assets",$e=We.FtReduxStore.get({name:ai,initialState:{savedSearches:void 0,bookmarks:void 0}}),xt=class{constructor(){this.currentSession=b.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ke,this.savedSearchesService=new ze,b.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=b.getState();(0,We.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),$e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),$e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();$e.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;$e.actions.bookmarks(r)}}},Zr=new xt;var Rt=class{addCommand(e,r=!1){b.commands.add(e,r)}consumeCommand(e){return b.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Rt;var en=x(F()),Tt=class{highlightHtml(e,r,n){(0,en.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new Tt;var tn=x(F());var Pt=class{isDate(e){var r,n,i,a;return(a=(i=((n=(r=b.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(u=>u.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var n,i,a;return tn.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:b.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Pt;(0,rn.customElement)("ft-app-context")(I);var Ge=class extends ${async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0)}};var si=t=>t.request.virtualField===fe.TITLE_ONLY&&t.request.scope===de.DOCUMENTS,Qe=class t extends Event{constructor(){super(t.eventName)}};Qe.eventName="search-context-clear-all-filters";var xe=class t{static build(e,r){return new t(qt(e.trim()||"context"),r)}constructor(e,r){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new G.Debouncer(10),this.searchDebouncer=new G.Debouncer(100),this.suggestDebouncer=new G.Debouncer(300),this.service=r??new Ge}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.setLiveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){let r=this.store.getState().locales,n=this.store.getState().request.contentLocale;if(e!=n){if(r){let i=a=>r.some(s=>s.lang==a);i(e)||(e=i(n)?n:r[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return e}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let r=e.filter(n=>n.values.length>0);this.store.actions.setRequestFilters(r),this.store.actions.setPageNumber(1),r.forEach(n=>{this.facetIds.includes(n.key)||(this.facetIds=[...this.facetIds,n.key])}),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(fe.TITLE_ONLY),this.store.actions.setRequestScope(de.DOCUMENTS)):(this.store.actions.setRequestVirtualField(fe.EVERYWHERE),this.store.actions.setRequestScope(de.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return si(this.store.getState())}get periodFilter(){return this.store.getState().request.periodFilter}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new Qe)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,r){let n=this.facetIds.filter(i=>i!=e);r&&n.push(r),this.facetIds=n,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map(e=>e.id)}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,r){let n=this.store.getState().request.filters,i={key:e,values:r,negative:!1},a=[...n.filter(s=>s.key!==e),i];this.setFilters(a)}setLiveQuery(e){this.store.actions.setLiveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest(e),this.store.actions.setLiveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}setPeriodFilter(e){this.store.actions.setRequestPeriodFilter(e),this.store.actions.setPageNumber(1),this.launchSearch()}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,r;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n=this.store.getState().request;if(this.store.actions.setPaging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.setResults(void 0),this.store.actions.setFacets(void 0),this.store.actions.setSpellcheck(void 0);else{this.cancelableSearch=(0,G.cancelable)(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.setResults(i.results),this.store.actions.setFacets(i.facets),this.store.actions.setSpellcheck(i.spellcheck);else{let a=((r=this.store.getState().results)!==null&&r!==void 0?r:[]).concat(i.results);this.store.actions.setResults(a)}this.store.actions.setPaging(i.paging)}}catch(n){!(n instanceof G.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let r=this.store.getState(),n=r.request,i={input:r.liveQuery,filters:n.filters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=(0,G.cancelable)(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.setSuggestResults(a.suggestions)}catch(r){!(r instanceof G.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(r)}}clear(){this.store.clear()}};var oi=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(s=t[u])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},It=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Ct=Symbol("registerInterval");function ui(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Ct]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Ct]):this.dispatchEvent(new It)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ct,oi([(0,sn.state)()],r.prototype,"stateManager",void 0),r}var nn=class extends ui(an.FtLitElementRedux){};var k=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(s=t[u])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},_t=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},Dt=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},Nt=class extends CustomEvent{constructor(e,r,n){super("ft-search-results-change",{detail:{request:e,paging:r,spellcheck:n}})}},C=class extends q.FtLitElementRedux{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=xe.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=r=>this.handleLoadError(r),this.addStore(this.stateManager.store,"search")}return this._stateManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.addStore(b)}render(){return on.html`
5
+ `}update(e){super.update(e),e.has("baseUrl")&&(b.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&b.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&b.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&b.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&b.actions.noCustom(this.noCustom),e.has("editorMode")&&b.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&b.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&b.actions.session(this.session),e.has("availableUiLocales")&&b.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(r=>cr.addContext(r)),e.has("openExternalDocumentInNewTab")&&b.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&b.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&b.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};I.elementDefinitions={};I.styles=or;L([(0,j.property)()],I.prototype,"baseUrl",void 0);L([(0,j.property)()],I.prototype,"apiIntegrationIdentifier",void 0);L([(0,j.property)()],I.prototype,"uiLocale",void 0);L([(0,H.jsonProperty)(null)],I.prototype,"availableUiLocales",void 0);L([(0,H.jsonProperty)(null)],I.prototype,"metadataConfiguration",void 0);L([(0,j.property)({type:Boolean})],I.prototype,"editorMode",void 0);L([(0,j.property)({type:Boolean})],I.prototype,"noCustom",void 0);L([(0,j.property)({type:Boolean})],I.prototype,"openExternalDocumentInNewTab",void 0);L([(0,j.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],I.prototype,"noCustomComponent",void 0);L([(0,j.property)({type:Boolean})],I.prototype,"withManualResources",void 0);L([(0,j.property)({type:Boolean})],I.prototype,"navigatorOnline",void 0);L([(0,j.property)({type:Boolean})],I.prototype,"forcedOffline",void 0);L([(0,j.property)({type:Object})],I.prototype,"apiProvider",void 0);L([(0,H.jsonProperty)([])],I.prototype,"messageContexts",void 0);L([(0,H.jsonProperty)(void 0)],I.prototype,"session",void 0);var ii=O(J());function bn(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!_e(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!_e(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){var a=i[n];if(!_e(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function _e(t,e){try{return bn(t,e)}catch{return!1}}function Ze(t,e){return!_e(t,e)}var Sn=O(J(),1);var De=class{constructor(){this.queue=[]}add(e,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};var be=O(J(),1);var fr=O(J(),1);function dr(t,e){let r=()=>JSON.parse(JSON.stringify(t));return(0,fr.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Ze,...e??{}})}var Ne=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(u){i(u);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var pr=O(le(),1);var Me=window,En=Me.ShadowRoot&&(Me.ShadyCSS===void 0||Me.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ra=Symbol();var hr=(t,e)=>{En?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{let n=document.createElement("style"),i=Me.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)})};var ke=class extends pr.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return hr(n,e.elementStyles),n}};var Le=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(s=t[u])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},gr,yr=Symbol("constructorPrototype"),mr=Symbol("constructorName"),br=Symbol("exportpartsDebouncer"),vr=Symbol("dynamicDependenciesLoaded"),ee=class extends ke{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[gr]=new Ne(5),this[mr]=this.constructor.name,this[yr]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[mr]&&Object.setPrototypeOf(this,this[yr])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let e=this.constructor;e[vr]||(e[vr]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}applyCustomStylesheet(e){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[br].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var r,n,i,a,s,u;let f=h=>h!=null&&h.trim().length>0,c=e.filter(f).map(h=>h.trim());if(c.length===0){this.removeAttribute("exportparts");return}let l=new Set;for(let h of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(a=(i=h.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],p=(u=(s=h.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(y=>y.split(":")[1]))!==null&&u!==void 0?u:[];new Array(...v,...p).filter(f).map(y=>y.trim()).forEach(y=>l.add(y))}if(l.size===0){this.removeAttribute("exportparts");return}let m=[...l.values()].flatMap(h=>c.map(v=>`${h}:${v}--${h}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};gr=br;Le([(0,be.property)()],ee.prototype,"exportpartsPrefix",void 0);Le([dr([])],ee.prototype,"exportpartsPrefixes",void 0);Le([(0,be.property)()],ee.prototype,"customStylesheet",void 0);Le([(0,be.state)()],ee.prototype,"useAdoptedStyleSheets",void 0);function Se(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Sr,Er,Ar,Fe=Symbol("internalReduxEventsUnsubscribers"),te=Symbol("internalStoresUnsubscribers"),ue=Symbol("internalStores"),Ee=class extends ee{constructor(){super(...arguments),this[Sr]=new Map,this[Er]=new Map,this[Ar]=[]}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(r=>e.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[ue].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ue].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[ue].get(e)}addStore(e,r){var n;r=(n=r??(Se(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this.setupStore(r,e)}removeStore(e){let r=typeof e=="string"?e:e.name;this.unsubscribeFromStore(r),this[ue].delete(r)}setupStore(e,r){this[ue].set(e,r),this.subscribeToStore(e,r),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[ue].forEach((e,r)=>this.subscribeToStore(r,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let i=this.getStore(e.store);i&&(e.store?this[te].has(e.store):this[te].size>0)&&(this[r]=e.selector(i.getState(),this))}})}subscribeToStore(e,r){var n;this[te].set(e,r.subscribe(()=>this.updateFromStores())),Se(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||r.name===i.store)){let s=u=>this[a](u);r.eventBus.addEventListener(i.eventName,s),this[Fe].push(()=>r.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[te].forEach((e,r)=>this.unsubscribeFromStore(r)),this[Fe].forEach(e=>e()),this[Fe]=[]}unsubscribeFromStore(e){this[te].has(e)&&this[te].get(e)(),this[te].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Sr=te,Er=ue,Ar=Fe;Ee.reduxProperties=new Map;Ee.reduxReactiveProperties=new Set;Ee.reduxEventListeners=new Map;function B(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function X(t){return!!t&&!!t[T]}function z(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Cn}(t)||Array.isArray(t)||!!t[Cr]||!!(!((e=t.constructor)===null||e===void 0)&&e[Cr])||ut(t)||ct(t))}function ce(t,e,r){r===void 0&&(r=!1),ye(t)===0?(r?Object.keys:pe)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function ye(t){var e=t[T];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ut(t)?2:ct(t)?3:0}function he(t,e){return ye(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function An(t,e){return ye(t)===2?t.get(e):t[e]}function Ir(t,e,r){var n=ye(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function _r(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ut(t){return Tn&&t instanceof Map}function ct(t){return Pn&&t instanceof Set}function re(t){return t.o||t.t}function lt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Mr(t);delete e[T];for(var r=pe(e),n=0;n<r.length;n++){var i=r[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ft(t,e){return e===void 0&&(e=!1),dt(t)||X(t)||!z(t)||(ye(t)>1&&(t.set=t.add=t.clear=t.delete=wn),Object.freeze(t),e&&ce(t,function(r,n){return ft(n,!0)},!0)),t}function wn(){B(2)}function dt(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function W(t){var e=ot[t];return e||B(18,t),e}function xn(t,e){ot[t]||(ot[t]=e)}function it(){return we}function et(t,e){e&&(W("Patches"),t.u=[],t.s=[],t.v=e)}function Ue(t){at(t),t.p.forEach(On),t.p=null}function at(t){t===we&&(we=t.l)}function wr(t){return we={p:[],l:we,h:t,m:!0,_:0}}function On(t){var e=t[T];e.i===0||e.i===1?e.j():e.g=!0}function tt(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||W("ES5").S(e,t,n),n?(r[T].P&&(Ue(e),B(4)),z(t)&&(t=je(e,t),e.l||Be(e,t)),e.u&&W("Patches").M(r[T].t,t,e.u,e.s)):t=je(e,r,[]),Ue(e),e.u&&e.v(e.u,e.s),t!==Nr?t:void 0}function je(t,e,r){if(dt(e))return e;var n=e[T];if(!n)return ce(e,function(u,f){return xr(t,n,e,u,f,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Be(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=lt(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),ce(a,function(u,f){return xr(t,n,i,u,f,r,s)}),Be(t,i,!1),r&&t.u&&W("Patches").N(n,r,t.u,t.s)}return n.o}function xr(t,e,r,n,i,a,s){if(X(i)){var u=je(t,i,a&&e&&e.i!==3&&!he(e.R,n)?a.concat(n):void 0);if(Ir(r,n,u),!X(u))return;t.m=!1}else s&&r.add(i);if(z(i)&&!dt(i)){if(!t.h.D&&t._<1)return;je(t,i),e&&e.A.l||Be(t,i)}}function Be(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&ft(e,r)}function rt(t,e){var r=t[T];return(r?re(r):t)[e]}function Or(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function ne(t){t.P||(t.P=!0,t.l&&ne(t.l))}function nt(t){t.o||(t.o=lt(t.t))}function st(t,e,r){var n=ut(e)?W("MapSet").F(e,r):ct(e)?W("MapSet").T(e,r):t.O?function(i,a){var s=Array.isArray(i),u={i:s?1:0,A:a?a.A:it(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},f=u,c=xe;s&&(f=[u],c=Ae);var l=Proxy.revocable(f,c),m=l.revoke,h=l.proxy;return u.k=h,u.j=m,h}(e,r):W("ES5").J(e,r);return(r?r.A:it()).p.push(n),n}function Rn(t){return X(t)||B(22,t),function e(r){if(!z(r))return r;var n,i=r[T],a=ye(r);if(i){if(!i.P&&(i.i<4||!W("ES5").K(i)))return i.t;i.I=!0,n=Rr(r,a),i.I=!1}else n=Rr(r,a);return ce(n,function(s,u){i&&An(i.t,s)===u||Ir(n,s,e(u))}),a===3?new Set(n):n}(t)}function Rr(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return lt(t)}function Dr(){function t(s,u){var f=a[s];return f?f.enumerable=u:a[s]=f={configurable:!0,enumerable:u,get:function(){var c=this[T];return xe.get(c,s)},set:function(c){var l=this[T];xe.set(l,s,c)}},f}function e(s){for(var u=s.length-1;u>=0;u--){var f=s[u][T];if(!f.P)switch(f.i){case 5:n(f)&&ne(f);break;case 4:r(f)&&ne(f)}}}function r(s){for(var u=s.t,f=s.k,c=pe(f),l=c.length-1;l>=0;l--){var m=c[l];if(m!==T){var h=u[m];if(h===void 0&&!he(u,m))return!0;var v=f[m],p=v&&v[T];if(p?p.t!==h:!_r(v,h))return!0}}var y=!!u[T];return c.length!==pe(u).length+(y?0:1)}function n(s){var u=s.k;if(u.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(u,u.length-1);if(f&&!f.get)return!0;for(var c=0;c<u.length;c++)if(!u.hasOwnProperty(c))return!0;return!1}function i(s){s.g&&B(3,JSON.stringify(re(s)))}var a={};xn("ES5",{J:function(s,u){var f=Array.isArray(s),c=function(m,h){if(m){for(var v=Array(h.length),p=0;p<h.length;p++)Object.defineProperty(v,""+p,t(p,!0));return v}var y=Mr(h);delete y[T];for(var w=pe(y),S=0;S<w.length;S++){var E=w[S];y[E]=t(E,m||!!y[E].enumerable)}return Object.create(Object.getPrototypeOf(h),y)}(f,s),l={i:f?5:4,A:u?u.A:it(),P:!1,I:!1,R:{},l:u,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,T,{value:l,writable:!0}),c},S:function(s,u,f){f?X(u)&&u[T].A===s&&e(s.p):(s.u&&function c(l){if(l&&typeof l=="object"){var m=l[T];if(m){var h=m.t,v=m.k,p=m.R,y=m.i;if(y===4)ce(v,function(A){A!==T&&(h[A]!==void 0||he(h,A)?p[A]||c(v[A]):(p[A]=!0,ne(m)))}),ce(h,function(A){v[A]!==void 0||he(v,A)||(p[A]=!1,ne(m))});else if(y===5){if(n(m)&&(ne(m),p.length=!0),v.length<h.length)for(var w=v.length;w<h.length;w++)p[w]=!1;else for(var S=h.length;S<v.length;S++)p[S]=!0;for(var E=Math.min(v.length,h.length),R=0;R<E;R++)v.hasOwnProperty(R)||(p[R]=!0),p[R]===void 0&&c(v[R])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var Tr,we,ht=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Tn=typeof Map<"u",Pn=typeof Set<"u",Pr=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Nr=ht?Symbol.for("immer-nothing"):((Tr={})["immer-nothing"]=!0,Tr),Cr=ht?Symbol.for("immer-draftable"):"__$immer_draftable",T=ht?Symbol.for("immer-state"):"__$immer_state";var Cn=""+Object.prototype.constructor,pe=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Mr=Object.getOwnPropertyDescriptors||function(t){var e={};return pe(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},ot={},xe={get:function(t,e){if(e===T)return t;var r=re(t);if(!he(r,e))return function(i,a,s){var u,f=Or(a,s);return f?"value"in f?f.value:(u=f.get)===null||u===void 0?void 0:u.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!z(n)?n:n===rt(t.t,e)?(nt(t),t.o[e]=st(t.A.h,n,t)):n},has:function(t,e){return e in re(t)},ownKeys:function(t){return Reflect.ownKeys(re(t))},set:function(t,e,r){var n=Or(re(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var i=rt(re(t),e),a=i?.[T];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(_r(r,i)&&(r!==void 0||he(t.t,e)))return!0;nt(t),ne(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return rt(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,nt(t),ne(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=re(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){B(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){B(12)}},Ae={};ce(xe,function(t,e){Ae[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Ae.deleteProperty=function(t,e){return Ae.set.call(this,t,e,void 0)},Ae.set=function(t,e,r){return xe.set.call(this,t[0],e,r,t[0])};var In=function(){function t(r){var n=this;this.O=Pr,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var u=a;a=i;var f=n;return function(y){var w=this;y===void 0&&(y=u);for(var S=arguments.length,E=Array(S>1?S-1:0),R=1;R<S;R++)E[R-1]=arguments[R];return f.produce(y,function(A){var K;return(K=a).call.apply(K,[w,A].concat(E))})}}var c;if(typeof a!="function"&&B(6),s!==void 0&&typeof s!="function"&&B(7),z(i)){var l=wr(n),m=st(n,i,void 0),h=!0;try{c=a(m),h=!1}finally{h?Ue(l):at(l)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(y){return et(l,s),tt(y,l)},function(y){throw Ue(l),y}):(et(l,s),tt(c,l))}if(!i||typeof i!="object"){if((c=a(i))===void 0&&(c=i),c===Nr&&(c=void 0),n.D&&ft(c,!0),s){var v=[],p=[];W("Patches").M(i,c,v,p),s(v,p)}return c}B(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(c){for(var l=arguments.length,m=Array(l>1?l-1:0),h=1;h<l;h++)m[h-1]=arguments[h];return n.produceWithPatches(c,function(v){return i.apply(void 0,[v].concat(m))})};var s,u,f=n.produce(i,a,function(c,l){s=c,u=l});return typeof Promise<"u"&&f instanceof Promise?f.then(function(c){return[c,s,u]}):[f,s,u]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){z(r)||B(8),X(r)&&(r=Rn(r));var n=wr(this),i=st(this,r,void 0);return i[T].C=!0,at(n),i},e.finishDraft=function(r,n){var i=r&&r[T],a=i.A;return et(a,n),tt(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Pr&&B(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var s=W("Patches").$;return X(r)?s(r,n):this.produce(r,function(u){return s(u,n)})},t}(),U=new In,_n=U.produce,pa=U.produceWithPatches.bind(U),ya=U.setAutoFreeze.bind(U),ma=U.setUseProxies.bind(U),va=U.applyPatches.bind(U),ga=U.createDraft.bind(U),ba=U.finishDraft.bind(U),qe=_n;function ie(t){"@babel/helpers - typeof";return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ie(t)}function pt(t,e){if(ie(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ie(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yt(t){var e=pt(t,"string");return ie(e)==="symbol"?e:String(e)}function mt(t,e,r){return e=yt(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ve(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?kr(Object(r),!0).forEach(function(n){mt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function M(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Lr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),vt=function(){return Math.random().toString(36).substring(7).split("").join(".")},He={INIT:"@@redux/INIT"+vt(),REPLACE:"@@redux/REPLACE"+vt(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+vt()}};function Dn(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function gt(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(M(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(M(1));return r(gt)(t,e)}if(typeof t!="function")throw new Error(M(2));var i=t,a=e,s=[],u=s,f=!1;function c(){u===s&&(u=s.slice())}function l(){if(f)throw new Error(M(3));return a}function m(y){if(typeof y!="function")throw new Error(M(4));if(f)throw new Error(M(5));var w=!0;return c(),u.push(y),function(){if(w){if(f)throw new Error(M(6));w=!1,c();var E=u.indexOf(y);u.splice(E,1),s=null}}}function h(y){if(!Dn(y))throw new Error(M(7));if(typeof y.type>"u")throw new Error(M(8));if(f)throw new Error(M(9));try{f=!0,a=i(a,y)}finally{f=!1}for(var w=s=u,S=0;S<w.length;S++){var E=w[S];E()}return y}function v(y){if(typeof y!="function")throw new Error(M(10));i=y,h({type:He.REPLACE})}function p(){var y,w=m;return y={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(M(11));function R(){E.next&&E.next(l())}R();var A=w(R);return{unsubscribe:A}}},y[Lr]=function(){return this},y}return h({type:He.INIT}),n={dispatch:h,subscribe:m,getState:l,replaceReducer:v},n[Lr]=p,n}function Nn(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:He.INIT});if(typeof n>"u")throw new Error(M(12));if(typeof r(void 0,{type:He.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(M(13))})}function Fr(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var a=Object.keys(r),s,u;try{Nn(r)}catch(f){u=f}return function(c,l){if(c===void 0&&(c={}),u)throw u;if(0)var m;for(var h=!1,v={},p=0;p<a.length;p++){var y=a[p],w=r[y],S=c[y],E=w(S,l);if(typeof E>"u"){var R=l&&l.type;throw new Error(M(14))}v[y]=E,h=h||E!==S}return h=h||a.length!==Object.keys(c).length,h?v:c}}function me(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Ur(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(M(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},u=e.map(function(f){return f(s)});return a=me.apply(void 0,u)(i.dispatch),Ve(Ve({},i),{},{dispatch:a})}}}function jr(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(u){return typeof u=="function"?u(i,a,t):s(u)}}};return e}var Br=jr();Br.withExtraArgument=jr;var bt=Br;var Kr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mn=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(c){return function(l){return f([c,l])}}function f(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],i=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ve=function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},kn=Object.defineProperty,Ln=Object.defineProperties,Fn=Object.getOwnPropertyDescriptors,qr=Object.getOwnPropertySymbols,Un=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,Vr=function(t,e,r){return e in t?kn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},ae=function(t,e){for(var r in e||(e={}))Un.call(e,r)&&Vr(t,r,e[r]);if(qr)for(var n=0,i=qr(e);n<i.length;n++){var r=i[n];jn.call(e,r)&&Vr(t,r,e[r])}return t},St=function(t,e){return Ln(t,Fn(e))},Bn=function(t,e,r){return new Promise(function(n,i){var a=function(f){try{u(r.next(f))}catch(c){i(c)}},s=function(f){try{u(r.throw(f))}catch(c){i(c)}},u=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(a,s)};u((r=r.apply(t,e)).next())})};var qn=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?me:me.apply(null,arguments)},Fa=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Vn(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var Hn=function(t){Kr(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ve([void 0],r[0].concat(this)))):new(e.bind.apply(e,ve([void 0],r.concat(this))))},e}(Array),zn=function(t){Kr(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ve([void 0],r[0].concat(this)))):new(e.bind.apply(e,ve([void 0],r.concat(this))))},e}(Array);function wt(t){return z(t)?qe(t,function(){}):t}function Kn(t){return typeof t=="boolean"}function $n(){return function(e){return Wn(e)}}function Wn(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,u=new Hn;if(r&&(Kn(r)?u.push(bt):u.push(bt.withExtraArgument(r.extraArgument))),0){if(i)var f;if(s)var c}return u}var Et=!0;function $r(t){var e=$n(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,s=a===void 0?e():a,u=r.devTools,f=u===void 0?!0:u,c=r.preloadedState,l=c===void 0?void 0:c,m=r.enhancers,h=m===void 0?void 0:m,v;if(typeof i=="function")v=i;else if(Vn(i))v=Fr(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 p=s;if(typeof p=="function"&&(p=p(e),!Et&&!Array.isArray(p)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Et&&p.some(function(A){return typeof A!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=Ur.apply(void 0,p),w=me;f&&(w=qn(ae({trace:!Et},typeof f=="object"&&f)));var S=new zn(y),E=S;Array.isArray(h)?E=ve([y],h):typeof h=="function"&&(E=h(S));var R=w.apply(void 0,E);return gt(v,l,R)}function se(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return ae(ae({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}function Wr(t){var e={},r=[],n,i={addCase:function(a,s){var u=typeof a=="string"?a:a.type;if(u in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[u]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,r,n]}function Gn(t){return typeof t=="function"}function Qn(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?Wr(e):[e,r,n],a=i[0],s=i[1],u=i[2],f;if(Gn(t))f=function(){return wt(t())};else{var c=wt(t);f=function(){return c}}function l(m,h){m===void 0&&(m=f());var v=ve([a[h.type]],s.filter(function(p){var y=p.matcher;return y(h)}).map(function(p){var y=p.reducer;return y}));return v.filter(function(p){return!!p}).length===0&&(v=[u]),v.reduce(function(p,y){if(y)if(X(p)){var w=p,S=y(w,h);return S===void 0?p:S}else{if(z(p))return qe(p,function(E){return y(E,h)});var S=y(p,h);if(S===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return p},m)}return l.getInitialState=f,l}function Xn(t,e){return t+"/"+e}function Gr(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:wt(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},u={};i.forEach(function(l){var m=n[l],h=Xn(e,l),v,p;"reducer"in m?(v=m.reducer,p=m.prepare):v=m,a[l]=v,s[h]=v,u[l]=p?se(h,p):se(h)});function f(){var l=typeof t.extraReducers=="function"?Wr(t.extraReducers):[t.extraReducers],m=l[0],h=m===void 0?{}:m,v=l[1],p=v===void 0?[]:v,y=l[2],w=y===void 0?void 0:y,S=ae(ae({},h),s);return Qn(r,function(E){for(var R in S)E.addCase(R,S[R]);for(var A=0,K=p;A<K.length;A++){var V=K[A];E.addMatcher(V.matcher,V.reducer)}w&&E.addDefaultCase(w)})}var c;return{name:e,reducer:function(l,m){return c||(c=f()),c(l,m)},actions:u,caseReducers:a,getInitialState:function(){return c||(c=f()),c.getInitialState()}}}var Yn="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Jn=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Yn[Math.random()*64|0];return e},Zn=["name","message","stack","code"],At=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),Hr=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),ei=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=Zn;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},qa=function(){function t(e,r,n){var i=se(e+"/fulfilled",function(l,m,h,v){return{payload:l,meta:St(ae({},v||{}),{arg:h,requestId:m,requestStatus:"fulfilled"})}}),a=se(e+"/pending",function(l,m,h){return{payload:void 0,meta:St(ae({},h||{}),{arg:m,requestId:l,requestStatus:"pending"})}}),s=se(e+"/rejected",function(l,m,h,v,p){return{payload:v,error:(n&&n.serializeError||ei)(l||"Rejected"),meta:St(ae({},p||{}),{arg:h,requestId:m,rejectedWithValue:!!v,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"})}}),u=!1,f=typeof AbortController<"u"?AbortController:function(){function l(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return l.prototype.abort=function(){},l}();function c(l){return function(m,h,v){var p=n?.idGenerator?n.idGenerator(l):Jn(),y=new f,w,S=!1;function E(A){w=A,y.abort()}var R=function(){return Bn(this,null,function(){var A,K,V,N,Re,Q,o;return Mn(this,function(d){switch(d.label){case 0:return d.trys.push([0,4,,5]),N=(A=n?.condition)==null?void 0:A.call(n,l,{getState:h,extra:v}),ri(N)?[4,N]:[3,2];case 1:N=d.sent(),d.label=2;case 2:if(N===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,Re=new Promise(function(g,P){return y.signal.addEventListener("abort",function(){return P({name:"AbortError",message:w||"Aborted"})})}),m(a(p,l,(K=n?.getPendingMeta)==null?void 0:K.call(n,{requestId:p,arg:l},{getState:h,extra:v}))),[4,Promise.race([Re,Promise.resolve(r(l,{dispatch:m,getState:h,extra:v,requestId:p,signal:y.signal,abort:E,rejectWithValue:function(g,P){return new At(g,P)},fulfillWithValue:function(g,P){return new Hr(g,P)}})).then(function(g){if(g instanceof At)throw g;return g instanceof Hr?i(g.payload,p,l,g.meta):i(g,p,l)})])];case 3:return V=d.sent(),[3,5];case 4:return Q=d.sent(),V=Q instanceof At?s(null,p,l,Q.payload,Q.meta):s(Q,p,l),[3,5];case 5:return o=n&&!n.dispatchConditionRejection&&s.match(V)&&V.meta.condition,o||m(V),[2,V]}})})}();return Object.assign(R,{abort:E,requestId:p,arg:l,unwrap:function(){return R.then(ti)}})}}return Object.assign(c,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function ti(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ri(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Qr="listener",Xr="completed",Yr="cancelled",Va="task-"+Yr,Ha="task-"+Xr,za=Qr+"-"+Yr,Ka=Qr+"-"+Xr;var xt="listenerMiddleware";var $a=se(xt+"/add"),Wa=se(xt+"/removeAll"),Ga=se(xt+"/remove");var zr,Qa=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(zr||(zr=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},ni=function(t){return function(e){setTimeout(e,t)}},Xa=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ni(10);Dr();window.ftReduxStores||(window.ftReduxStores={});var Jr=class t{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Se(a))return a;if(i==null)return;let s=Gr({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),u=$r({reducer:(f,c)=>c.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...c.overwrites}:s.reducer(f,c)});return window.ftReduxStores[i.name]=new t(s,u)}constructor(e,r){this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new De,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,u=n[s];return u?(...f)=>{let c=u(...f);return this.reduxStore.dispatch(c),c}:f=>{this.setState({[s]:f})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var We=O(F());var ze=class extends ${async listMySearches(){let e=b.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Ke=class extends ${async listMyBookmarks(){let e=b.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var ai="ft-user-assets",$e=We.FtReduxStore.get({name:ai,initialState:{savedSearches:void 0,bookmarks:void 0}}),Ot=class{constructor(){this.currentSession=b.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ke,this.savedSearchesService=new ze,b.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=b.getState();(0,We.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),$e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),$e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();$e.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;$e.actions.bookmarks(r)}}},Zr=new Ot;var Rt=class{addCommand(e,r=!1){b.commands.add(e,r)}consumeCommand(e){return b.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Rt;var en=O(F()),Tt=class{highlightHtml(e,r,n){(0,en.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new Tt;var tn=O(F());var Pt=class{isDate(e){var r,n,i,a;return(a=(i=((n=(r=b.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(u=>u.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var n,i,a;return tn.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:b.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Pt;(0,rn.customElement)("ft-app-context")(I);var Ge=class extends ${async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0)}};var si=t=>t.request.virtualField===fe.TITLE_ONLY&&t.request.scope===de.DOCUMENTS,Qe=class t extends Event{constructor(){super(t.eventName)}};Qe.eventName="search-context-clear-all-filters";var Oe=class t{static build(e,r){return new t(qt(e.trim()||"context"),r)}constructor(e,r){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new G.Debouncer(10),this.searchDebouncer=new G.Debouncer(100),this.suggestDebouncer=new G.Debouncer(300),this.service=r??new Ge}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.setLiveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){let r=this.store.getState().locales,n=this.store.getState().request.contentLocale;if(e!=n){if(r){let i=a=>r.some(s=>s.lang==a);i(e)||(e=i(n)?n:r[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return e}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let r=e.filter(n=>n.values.length>0);this.store.actions.setRequestFilters(r),this.store.actions.setPageNumber(1),r.forEach(n=>{this.facetIds.includes(n.key)||(this.facetIds=[...this.facetIds,n.key])}),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(fe.TITLE_ONLY),this.store.actions.setRequestScope(de.DOCUMENTS)):(this.store.actions.setRequestVirtualField(fe.EVERYWHERE),this.store.actions.setRequestScope(de.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return si(this.store.getState())}get periodFilter(){return this.store.getState().request.periodFilter}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new Qe)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,r){let n=this.facetIds.filter(i=>i!=e);r&&n.push(r),this.facetIds=n,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map(e=>e.id)}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,r){let n=this.store.getState().request.filters,i={key:e,values:r,negative:!1},a=[...n.filter(s=>s.key!==e),i];this.setFilters(a)}setLiveQuery(e){this.store.actions.setLiveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest(e),this.store.actions.setLiveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}setPeriodFilter(e){this.store.actions.setRequestPeriodFilter(e),this.store.actions.setPageNumber(1),this.launchSearch()}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,r;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n=this.store.getState().request;if(this.store.actions.setPaging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.setResults(void 0),this.store.actions.setFacets(void 0),this.store.actions.setSpellcheck(void 0);else{this.cancelableSearch=(0,G.cancelable)(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.setResults(i.results),this.store.actions.setFacets(i.facets),this.store.actions.setSpellcheck(i.spellcheck);else{let a=((r=this.store.getState().results)!==null&&r!==void 0?r:[]).concat(i.results);this.store.actions.setResults(a)}this.store.actions.setPaging(i.paging)}}catch(n){!(n instanceof G.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let r=this.store.getState(),n=r.request,i={input:r.liveQuery,filters:n.filters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=(0,G.cancelable)(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.setSuggestResults(a.suggestions)}catch(r){!(r instanceof G.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(r)}}clear(){this.store.clear()}};var oi=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(s=t[u])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},It=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Ct=Symbol("registerInterval");function ui(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Ct]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Ct]):this.dispatchEvent(new It)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ct,oi([(0,sn.state)()],r.prototype,"stateManager",void 0),r}var nn=class extends ui(an.FtLitElementRedux){};var k=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(s=t[u])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},_t=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},Dt=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},Nt=class extends CustomEvent{constructor(e,r,n){super("ft-search-results-change",{detail:{request:e,paging:r,spellcheck:n}})}},C=class extends q.FtLitElementRedux{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=Oe.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=r=>this.handleLoadError(r),this.addStore(this.stateManager.store,"search")}return this._stateManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.addStore(b)}render(){return on.html`
6
6
  <slot @register-ft-search-component=${this.registerComponent}></slot>
7
7
  `}update(e){super.update(e),e.has("query")&&this.query!==void 0&&this.stateManager.setQuery(this.query),e.has("contentLocale")&&this.contentLocale!==void 0&&this.stateManager.setContentLocale(this.contentLocale),e.has("filters")&&this.filters!==void 0&&this.stateManager.setFilters(this.filters),e.has("sort")&&this.sort!==void 0&&this.stateManager.setSort(this.sort),e.has("pageSize")&&this.pageSize!==void 0&&this.stateManager.setPageSize(this.pageSize),e.has("searchInDocumentTitlesOnly")&&this.searchInDocumentTitlesOnly!==void 0&&this.stateManager.setSearchInDocumentTitlesOnly(this.searchInDocumentTitlesOnly),e.has("scope")&&this.scope!==void 0&&this.stateManager.setScope(this.scope),e.has("virtualField")&&this.virtualField!==void 0&&this.stateManager.setVirtualField(this.virtualField),e.has("ignoreEmptyQuery")&&this.ignoreEmptyQuery!==void 0&&this.stateManager.setIgnoreEmptyQuery(this.ignoreEmptyQuery),e.has("openExternalDocumentInNewTab")&&this.openExternalDocumentInNewTab!==void 0&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("periodFilter")&&this.periodFilter&&this.stateManager.setPeriodFilter(this.periodFilter),e.has("session")&&this.session!==void 0&&(this.stateManager.service.clearCache(),this.stateManager.initService())}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.stateManager.setQuery(this.query),this.stateManager.setContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("request")&&this.request&&this.dispatchEvent(new Dt(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new Nt(this.request,this.paging,this.autocorrect))}registerComponent(e){e.stopPropagation();let r=e.composedPath()[0];this.register(r)}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new _t(e))}reloadSavedSearches(){Zr.clearMySearches()}clear(){this.stateManager.clear()}};C.elementDefinitions={};C.styles=jt;k([(0,q.redux)({store:b.name})],C.prototype,"session",void 0);k([(0,Y.property)()],C.prototype,"query",void 0);k([(0,Y.property)()],C.prototype,"contentLocale",void 0);k([(0,Y.property)({type:Number})],C.prototype,"pageSize",void 0);k([(0,Y.property)({type:Boolean})],C.prototype,"searchInDocumentTitlesOnly",void 0);k([(0,q.jsonProperty)(null)],C.prototype,"periodFilter",void 0);k([(0,Y.property)()],C.prototype,"scope",void 0);k([(0,Y.property)()],C.prototype,"virtualField",void 0);k([(0,Y.property)({type:Boolean})],C.prototype,"ignoreEmptyQuery",void 0);k([(0,q.redux)({store:b.name})],C.prototype,"openExternalDocumentInNewTab",void 0);k([(0,q.jsonProperty)([])],C.prototype,"filters",void 0);k([(0,q.jsonProperty)([])],C.prototype,"sort",void 0);k([(0,q.redux)({store:"search"})],C.prototype,"request",void 0);k([(0,q.redux)({store:"search"})],C.prototype,"paging",void 0);k([(0,q.redux)({store:"search",selector:t=>t.spellcheck})],C.prototype,"autocorrect",void 0);k([(0,Y.property)({attribute:!1})],C.prototype,"searchServiceProvider",void 0);(0,un.customElement)("ft-search-context")(C);})();
8
8
  /*! Bundled license information:
@@ -46,9 +46,9 @@ Also for action icons.`,u.colorGray200),contentGlobalSubtle:o.extend("--ft-conte
46
46
  input::-webkit-search-results-decoration {
47
47
  display: none;
48
48
  }
49
- `;var Da={};var qo={};U(qo,{ParametrizedLabelResolver:()=>Vt});var Vt=class{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var n,i;e=this.resolvePluralKey(e,r);let a=(i=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&i!==void 0?i:"";return r.forEach((s,c)=>a=a.replace(new RegExp(`\\{${c}([^}]*)\\}`,"g"),(l,d)=>this.formatValue(s,d))),a}resolvePluralKey(e,r){for(let n of r)if(typeof n=="number"){let i=`${String(e)}[\\=${n}]`;if(i in this.labels||i in this.defaultLabels)return i}return e}formatValue(e,r){return e instanceof Date?this.formatDate(e,r):e??""}formatDate(e,r){let n=i=>r?.includes("date")?e.toLocaleDateString(i):r?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return n(document.documentElement.lang)}catch{return n()}}};var On={};U(On,{FtCommandQueue:()=>Kt,FtLitElementRedux:()=>ue,FtReduxStore:()=>Se,clearAllStores:()=>Cu,isFtReduxStore:()=>Ye,redux:()=>Ie,reduxEventListener:()=>Hl,reduxReactive:()=>Wl});var Wl=()=>(t,e)=>{var r;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(r=n.reduxReactiveProperties)===null||r===void 0||r.add(e)},Ie=t=>{let e=t??{};return(r,n)=>{var i;let a={hasChanged:kt,attribute:!1,...e};_(a)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:c=>c[n],store:e.store})}},Hl=t=>(e,r)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(r,t)};var Kt=class{constructor(){this.queue=[]}add(e,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};function Ye(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Fa,$a,Ba,Tr=Symbol("internalReduxEventsUnsubscribers"),Pe=Symbol("internalStoresUnsubscribers"),Je=Symbol("internalStores"),ue=class extends J{constructor(){super(...arguments),this[Fa]=new Map,this[$a]=new Map,this[Ba]=[]}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(r=>e.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[Je].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Je].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Je].get(e)}addStore(e,r){var n;r=(n=r??(Ye(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this.setupStore(r,e)}removeStore(e){let r=typeof e=="string"?e:e.name;this.unsubscribeFromStore(r),this[Je].delete(r)}setupStore(e,r){this[Je].set(e,r),this.subscribeToStore(e,r),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Je].forEach((e,r)=>this.subscribeToStore(r,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let i=this.getStore(e.store);i&&(e.store?this[Pe].has(e.store):this[Pe].size>0)&&(this[r]=e.selector(i.getState(),this))}})}subscribeToStore(e,r){var n;this[Pe].set(e,r.subscribe(()=>this.updateFromStores())),Ye(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||r.name===i.store)){let s=c=>this[a](c);r.eventBus.addEventListener(i.eventName,s),this[Tr].push(()=>r.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Pe].forEach((e,r)=>this.unsubscribeFromStore(r)),this[Tr].forEach(e=>e()),this[Tr]=[]}unsubscribeFromStore(e){this[Pe].has(e)&&this[Pe].get(e)(),this[Pe].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Fa=Pe,$a=Je,Ba=Tr;ue.reduxProperties=new Map;ue.reduxReactiveProperties=new Set;ue.reduxEventListeners=new Map;function ee(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ve(t){return!!t&&!!t[M]}function ie(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Yl}(t)||Array.isArray(t)||!!t[Ga]||!!(!((e=t.constructor)===null||e===void 0)&&e[Ga])||nn(t)||an(t))}function Xe(t,e,r){r===void 0&&(r=!1),dt(t)===0?(r?Object.keys:ut)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function dt(t){var e=t[M];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:nn(t)?2:an(t)?3:0}function lt(t,e){return dt(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function zl(t,e){return dt(t)===2?t.get(e):t[e]}function Za(t,e,r){var n=dt(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function qa(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function nn(t){return Zl&&t instanceof Map}function an(t){return ql&&t instanceof Set}function _e(t){return t.o||t.t}function sn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Xa(t);delete e[M];for(var r=ut(e),n=0;n<r.length;n++){var i=r[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function cn(t,e){return e===void 0&&(e=!1),ln(t)||ve(t)||!ie(t)||(dt(t)>1&&(t.set=t.add=t.clear=t.delete=jl),Object.freeze(t),e&&Xe(t,function(r,n){return cn(n,!0)},!0)),t}function jl(){ee(2)}function ln(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function de(t){var e=on[t];return e||ee(18,t),e}function Vl(t,e){on[t]||(on[t]=e)}function en(){return Zt}function Yo(t,e){e&&(de("Patches"),t.u=[],t.s=[],t.v=e)}function Lr(t){tn(t),t.p.forEach(Kl),t.p=null}function tn(t){t===Zt&&(Zt=t.l)}function Wa(t){return Zt={p:[],l:Zt,h:t,m:!0,_:0}}function Kl(t){var e=t[M];e.i===0||e.i===1?e.j():e.g=!0}function Jo(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||de("ES5").S(e,t,n),n?(r[M].P&&(Lr(e),ee(4)),ie(t)&&(t=kr(e,t),e.l||Ur(e,t)),e.u&&de("Patches").M(r[M].t,t,e.u,e.s)):t=kr(e,r,[]),Lr(e),e.u&&e.v(e.u,e.s),t!==Ja?t:void 0}function kr(t,e,r){if(ln(e))return e;var n=e[M];if(!n)return Xe(e,function(c,l){return Ha(t,n,e,c,l,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Ur(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=sn(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Xe(a,function(c,l){return Ha(t,n,i,c,l,r,s)}),Ur(t,i,!1),r&&t.u&&de("Patches").N(n,r,t.u,t.s)}return n.o}function Ha(t,e,r,n,i,a,s){if(ve(i)){var c=kr(t,i,a&&e&&e.i!==3&&!lt(e.R,n)?a.concat(n):void 0);if(Za(r,n,c),!ve(c))return;t.m=!1}else s&&r.add(i);if(ie(i)&&!ln(i)){if(!t.h.D&&t._<1)return;kr(t,i),e&&e.A.l||Ur(t,i)}}function Ur(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&cn(e,r)}function Xo(t,e){var r=t[M];return(r?_e(r):t)[e]}function za(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Te(t){t.P||(t.P=!0,t.l&&Te(t.l))}function Qo(t){t.o||(t.o=sn(t.t))}function rn(t,e,r){var n=nn(e)?de("MapSet").F(e,r):an(e)?de("MapSet").T(e,r):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:en(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},l=c,d=qt;s&&(l=[c],d=Gt);var p=Proxy.revocable(l,d),h=p.revoke,g=p.proxy;return c.k=g,c.j=h,g}(e,r):de("ES5").J(e,r);return(r?r.A:en()).p.push(n),n}function Gl(t){return ve(t)||ee(22,t),function e(r){if(!ie(r))return r;var n,i=r[M],a=dt(r);if(i){if(!i.P&&(i.i<4||!de("ES5").K(i)))return i.t;i.I=!0,n=ja(r,a),i.I=!1}else n=ja(r,a);return Xe(n,function(s,c){i&&zl(i.t,s)===c||Za(n,s,e(c))}),a===3?new Set(n):n}(t)}function ja(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return sn(t)}function Ya(){function t(s,c){var l=a[s];return l?l.enumerable=c:a[s]=l={configurable:!0,enumerable:c,get:function(){var d=this[M];return qt.get(d,s)},set:function(d){var p=this[M];qt.set(p,s,d)}},l}function e(s){for(var c=s.length-1;c>=0;c--){var l=s[c][M];if(!l.P)switch(l.i){case 5:n(l)&&Te(l);break;case 4:r(l)&&Te(l)}}}function r(s){for(var c=s.t,l=s.k,d=ut(l),p=d.length-1;p>=0;p--){var h=d[p];if(h!==M){var g=c[h];if(g===void 0&&!lt(c,h))return!0;var y=l[h],b=y&&y[M];if(b?b.t!==g:!qa(y,g))return!0}}var O=!!c[M];return d.length!==ut(c).length+(O?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(c,c.length-1);if(l&&!l.get)return!0;for(var d=0;d<c.length;d++)if(!c.hasOwnProperty(d))return!0;return!1}function i(s){s.g&&ee(3,JSON.stringify(_e(s)))}var a={};Vl("ES5",{J:function(s,c){var l=Array.isArray(s),d=function(h,g){if(h){for(var y=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(y,""+b,t(b,!0));return y}var O=Xa(g);delete O[M];for(var C=ut(O),A=0;A<C.length;A++){var N=C[A];O[N]=t(N,h||!!O[N].enumerable)}return Object.create(Object.getPrototypeOf(g),O)}(l,s),p={i:l?5:4,A:c?c.A:en(),P:!1,I:!1,R:{},l:c,t:s,k:d,o:null,g:!1,C:!1};return Object.defineProperty(d,M,{value:p,writable:!0}),d},S:function(s,c,l){l?ve(c)&&c[M].A===s&&e(s.p):(s.u&&function d(p){if(p&&typeof p=="object"){var h=p[M];if(h){var g=h.t,y=h.k,b=h.R,O=h.i;if(O===4)Xe(y,function(v){v!==M&&(g[v]!==void 0||lt(g,v)?b[v]||d(y[v]):(b[v]=!0,Te(h)))}),Xe(g,function(v){y[v]!==void 0||lt(y,v)||(b[v]=!1,Te(h))});else if(O===5){if(n(h)&&(Te(h),b.length=!0),y.length<g.length)for(var C=y.length;C<g.length;C++)b[C]=!1;else for(var A=g.length;A<y.length;A++)b[A]=!0;for(var N=Math.min(y.length,g.length),S=0;S<N;S++)y.hasOwnProperty(S)||(b[S]=!0),b[S]===void 0&&d(y[S])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var Va,Zt,un=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Zl=typeof Map<"u",ql=typeof Set<"u",Ka=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ja=un?Symbol.for("immer-nothing"):((Va={})["immer-nothing"]=!0,Va),Ga=un?Symbol.for("immer-draftable"):"__$immer_draftable",M=un?Symbol.for("immer-state"):"__$immer_state";var Yl=""+Object.prototype.constructor,ut=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Xa=Object.getOwnPropertyDescriptors||function(t){var e={};return ut(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},on={},qt={get:function(t,e){if(e===M)return t;var r=_e(t);if(!lt(r,e))return function(i,a,s){var c,l=za(a,s);return l?"value"in l?l.value:(c=l.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!ie(n)?n:n===Xo(t.t,e)?(Qo(t),t.o[e]=rn(t.A.h,n,t)):n},has:function(t,e){return e in _e(t)},ownKeys:function(t){return Reflect.ownKeys(_e(t))},set:function(t,e,r){var n=za(_e(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var i=Xo(_e(t),e),a=i?.[M];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(qa(r,i)&&(r!==void 0||lt(t.t,e)))return!0;Qo(t),Te(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Xo(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Qo(t),Te(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=_e(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){ee(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ee(12)}},Gt={};Xe(qt,function(t,e){Gt[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Gt.deleteProperty=function(t,e){return Gt.set.call(this,t,e,void 0)},Gt.set=function(t,e,r){return qt.set.call(this,t[0],e,r,t[0])};var Jl=function(){function t(r){var n=this;this.O=Ka,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var l=n;return function(O){var C=this;O===void 0&&(O=c);for(var A=arguments.length,N=Array(A>1?A-1:0),S=1;S<A;S++)N[S-1]=arguments[S];return l.produce(O,function(v){var w;return(w=a).call.apply(w,[C,v].concat(N))})}}var d;if(typeof a!="function"&&ee(6),s!==void 0&&typeof s!="function"&&ee(7),ie(i)){var p=Wa(n),h=rn(n,i,void 0),g=!0;try{d=a(h),g=!1}finally{g?Lr(p):tn(p)}return typeof Promise<"u"&&d instanceof Promise?d.then(function(O){return Yo(p,s),Jo(O,p)},function(O){throw Lr(p),O}):(Yo(p,s),Jo(d,p))}if(!i||typeof i!="object"){if((d=a(i))===void 0&&(d=i),d===Ja&&(d=void 0),n.D&&cn(d,!0),s){var y=[],b=[];de("Patches").M(i,d,y,b),s(y,b)}return d}ee(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(d){for(var p=arguments.length,h=Array(p>1?p-1:0),g=1;g<p;g++)h[g-1]=arguments[g];return n.produceWithPatches(d,function(y){return i.apply(void 0,[y].concat(h))})};var s,c,l=n.produce(i,a,function(d,p){s=d,c=p});return typeof Promise<"u"&&l instanceof Promise?l.then(function(d){return[d,s,c]}):[l,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){ie(r)||ee(8),ve(r)&&(r=Gl(r));var n=Wa(this),i=rn(this,r,void 0);return i[M].C=!0,tn(n),i},e.finishDraft=function(r,n){var i=r&&r[M],a=i.A;return Yo(a,n),Jo(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Ka&&ee(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var s=de("Patches").$;return ve(r)?s(r,n):this.produce(r,function(c){return s(c,n)})},t}(),X=new Jl,Xl=X.produce,Vm=X.produceWithPatches.bind(X),Km=X.setAutoFreeze.bind(X),Gm=X.setUseProxies.bind(X),Zm=X.applyPatches.bind(X),qm=X.createDraft.bind(X),Ym=X.finishDraft.bind(X),Mr=Xl;function Le(t){"@babel/helpers - typeof";return Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(t)}function dn(t,e){if(Le(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Le(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fn(t){var e=dn(t,"string");return Le(e)==="symbol"?e:String(e)}function pn(t,e,r){return e=fn(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Dr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Qa(Object(r),!0).forEach(function(n){pn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qa(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function V(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var es=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),hn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Fr={INIT:"@@redux/INIT"+hn(),REPLACE:"@@redux/REPLACE"+hn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+hn()}};function Ql(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function mn(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(V(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(V(1));return r(mn)(t,e)}if(typeof t!="function")throw new Error(V(2));var i=t,a=e,s=[],c=s,l=!1;function d(){c===s&&(c=s.slice())}function p(){if(l)throw new Error(V(3));return a}function h(O){if(typeof O!="function")throw new Error(V(4));if(l)throw new Error(V(5));var C=!0;return d(),c.push(O),function(){if(C){if(l)throw new Error(V(6));C=!1,d();var N=c.indexOf(O);c.splice(N,1),s=null}}}function g(O){if(!Ql(O))throw new Error(V(7));if(typeof O.type>"u")throw new Error(V(8));if(l)throw new Error(V(9));try{l=!0,a=i(a,O)}finally{l=!1}for(var C=s=c,A=0;A<C.length;A++){var N=C[A];N()}return O}function y(O){if(typeof O!="function")throw new Error(V(10));i=O,g({type:Fr.REPLACE})}function b(){var O,C=h;return O={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(V(11));function S(){N.next&&N.next(p())}S();var v=C(S);return{unsubscribe:v}}},O[es]=function(){return this},O}return g({type:Fr.INIT}),n={dispatch:g,subscribe:h,getState:p,replaceReducer:y},n[es]=b,n}function eu(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:Fr.INIT});if(typeof n>"u")throw new Error(V(12));if(typeof r(void 0,{type:Fr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(V(13))})}function ts(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var a=Object.keys(r),s,c;try{eu(r)}catch(l){c=l}return function(d,p){if(d===void 0&&(d={}),c)throw c;if(0)var h;for(var g=!1,y={},b=0;b<a.length;b++){var O=a[b],C=r[O],A=d[O],N=C(A,p);if(typeof N>"u"){var S=p&&p.type;throw new Error(V(14))}y[O]=N,g=g||N!==A}return g=g||a.length!==Object.keys(d).length,g?y:d}}function ft(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function rs(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(V(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(l){return l(s)});return a=ft.apply(void 0,c)(i.dispatch),Dr(Dr({},i),{},{dispatch:a})}}}function os(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var ns=os();ns.withExtraArgument=os;var gn=ns;var ls=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),tu=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(d){return function(p){return l([d,p])}}function l(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=d[0]&2?i.return:d[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,d[1])).done)return a;switch(i=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,i=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){r.label=d[1];break}if(d[0]===6&&r.label<a[1]){r.label=a[1],a=d;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(d);break}a[2]&&r.ops.pop(),r.trys.pop();continue}d=e.call(t,r)}catch(p){d=[6,p],i=0}finally{n=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}},pt=function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},ru=Object.defineProperty,ou=Object.defineProperties,nu=Object.getOwnPropertyDescriptors,is=Object.getOwnPropertySymbols,iu=Object.prototype.hasOwnProperty,au=Object.prototype.propertyIsEnumerable,as=function(t,e,r){return e in t?ru(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},ke=function(t,e){for(var r in e||(e={}))iu.call(e,r)&&as(t,r,e[r]);if(is)for(var n=0,i=is(e);n<i.length;n++){var r=i[n];au.call(e,r)&&as(t,r,e[r])}return t},yn=function(t,e){return ou(t,nu(e))},su=function(t,e,r){return new Promise(function(n,i){var a=function(l){try{c(r.next(l))}catch(d){i(d)}},s=function(l){try{c(r.throw(l))}catch(d){i(d)}},c=function(l){return l.done?n(l.value):Promise.resolve(l.value).then(a,s)};c((r=r.apply(t,e)).next())})};var cu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ft:ft.apply(null,arguments)},hg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function lu(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var uu=function(t){ls(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,pt([void 0],r[0].concat(this)))):new(e.bind.apply(e,pt([void 0],r.concat(this))))},e}(Array),du=function(t){ls(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,pt([void 0],r[0].concat(this)))):new(e.bind.apply(e,pt([void 0],r.concat(this))))},e}(Array);function vn(t){return ie(t)?Mr(t,function(){}):t}function fu(t){return typeof t=="boolean"}function pu(){return function(e){return hu(e)}}function hu(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new uu;if(r&&(fu(r)?c.push(gn):c.push(gn.withExtraArgument(r.extraArgument))),0){if(i)var l;if(s)var d}return c}var bn=!0;function us(t){var e=pu(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,s=a===void 0?e():a,c=r.devTools,l=c===void 0?!0:c,d=r.preloadedState,p=d===void 0?void 0:d,h=r.enhancers,g=h===void 0?void 0:h,y;if(typeof i=="function")y=i;else if(lu(i))y=ts(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=s;if(typeof b=="function"&&(b=b(e),!bn&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!bn&&b.some(function(v){return typeof v!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=rs.apply(void 0,b),C=ft;l&&(C=cu(ke({trace:!bn},typeof l=="object"&&l)));var A=new du(O),N=A;Array.isArray(g)?N=pt([O],g):typeof g=="function"&&(N=g(A));var S=C.apply(void 0,N);return mn(y,p,S)}function Ue(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return ke(ke({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}function ds(t){var e={},r=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,r,n]}function mu(t){return typeof t=="function"}function gu(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?ds(e):[e,r,n],a=i[0],s=i[1],c=i[2],l;if(mu(t))l=function(){return vn(t())};else{var d=vn(t);l=function(){return d}}function p(h,g){h===void 0&&(h=l());var y=pt([a[g.type]],s.filter(function(b){var O=b.matcher;return O(g)}).map(function(b){var O=b.reducer;return O}));return y.filter(function(b){return!!b}).length===0&&(y=[c]),y.reduce(function(b,O){if(O)if(ve(b)){var C=b,A=O(C,g);return A===void 0?b:A}else{if(ie(b))return Mr(b,function(N){return O(N,g)});var A=O(b,g);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},h)}return p.getInitialState=l,p}function yu(t,e){return t+"/"+e}function fs(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:vn(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(p){var h=n[p],g=yu(e,p),y,b;"reducer"in h?(y=h.reducer,b=h.prepare):y=h,a[p]=y,s[g]=y,c[p]=b?Ue(g,b):Ue(g)});function l(){var p=typeof t.extraReducers=="function"?ds(t.extraReducers):[t.extraReducers],h=p[0],g=h===void 0?{}:h,y=p[1],b=y===void 0?[]:y,O=p[2],C=O===void 0?void 0:O,A=ke(ke({},g),s);return gu(r,function(N){for(var S in A)N.addCase(S,A[S]);for(var v=0,w=b;v<w.length;v++){var R=w[v];N.addMatcher(R.matcher,R.reducer)}C&&N.addDefaultCase(C)})}var d;return{name:e,reducer:function(p,h){return d||(d=l()),d(p,h)},actions:c,caseReducers:a,getInitialState:function(){return d||(d=l()),d.getInitialState()}}}var bu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=bu[Math.random()*64|0];return e},vu=["name","message","stack","code"],xn=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),ss=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),Su=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=vu;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},bg=function(){function t(e,r,n){var i=Ue(e+"/fulfilled",function(p,h,g,y){return{payload:p,meta:yn(ke({},y||{}),{arg:g,requestId:h,requestStatus:"fulfilled"})}}),a=Ue(e+"/pending",function(p,h,g){return{payload:void 0,meta:yn(ke({},g||{}),{arg:h,requestId:p,requestStatus:"pending"})}}),s=Ue(e+"/rejected",function(p,h,g,y,b){return{payload:y,error:(n&&n.serializeError||Su)(p||"Rejected"),meta:yn(ke({},b||{}),{arg:g,requestId:h,rejectedWithValue:!!y,requestStatus:"rejected",aborted:p?.name==="AbortError",condition:p?.name==="ConditionError"})}}),c=!1,l=typeof AbortController<"u"?AbortController:function(){function p(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return p.prototype.abort=function(){},p}();function d(p){return function(h,g,y){var b=n?.idGenerator?n.idGenerator(p):xu(),O=new l,C,A=!1;function N(v){C=v,O.abort()}var S=function(){return su(this,null,function(){var v,w,R,P,j,L,m;return tu(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),P=(v=n?.condition)==null?void 0:v.call(n,p,{getState:g,extra:y}),wu(P)?[4,P]:[3,2];case 1:P=x.sent(),x.label=2;case 2:if(P===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,j=new Promise(function(E,T){return O.signal.addEventListener("abort",function(){return T({name:"AbortError",message:C||"Aborted"})})}),h(a(b,p,(w=n?.getPendingMeta)==null?void 0:w.call(n,{requestId:b,arg:p},{getState:g,extra:y}))),[4,Promise.race([j,Promise.resolve(r(p,{dispatch:h,getState:g,extra:y,requestId:b,signal:O.signal,abort:N,rejectWithValue:function(E,T){return new xn(E,T)},fulfillWithValue:function(E,T){return new ss(E,T)}})).then(function(E){if(E instanceof xn)throw E;return E instanceof ss?i(E.payload,b,p,E.meta):i(E,b,p)})])];case 3:return R=x.sent(),[3,5];case 4:return L=x.sent(),R=L instanceof xn?s(null,b,p,L.payload,L.meta):s(L,b,p),[3,5];case 5:return m=n&&!n.dispatchConditionRejection&&s.match(R)&&R.meta.condition,m||h(R),[2,R]}})})}();return Object.assign(S,{abort:N,requestId:b,arg:p,unwrap:function(){return S.then(Ou)}})}}return Object.assign(d,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function Ou(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function wu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ps="listener",hs="completed",ms="cancelled",xg="task-"+ms,vg="task-"+hs,Sg=ps+"-"+ms,Og=ps+"-"+hs;var Sn="listenerMiddleware";var wg=Ue(Sn+"/add"),Eg=Ue(Sn+"/removeAll"),Cg=Ue(Sn+"/remove");var cs,Ag=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(cs||(cs=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Eu=function(t){return function(e){setTimeout(e,t)}},Ng=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Eu(10);Ya();window.ftReduxStores||(window.ftReduxStores={});var Se=class t{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Ye(a))return a;if(i==null)return;let s=fs({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),c=us({reducer:(l,d)=>d.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__")?{...l,...d.overwrites}:s.reducer(l,d)});return window.ftReduxStores[i.name]=new t(s,c)}constructor(e,r){this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Kt,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,c=n[s];return c?(...l)=>{let d=c(...l);return this.reduxStore.dispatch(d),d}:l=>{this.setState({[s]:l})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function Cu(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Ye(e)&&e.clear()}var Cn={};U(Cn,{scrollHelper:()=>Au});var wn,$r=new Map,En=class{lock(e,r){if(r){let n=$r.get(r);if(n==null||n===e)return $r.set(r,e),r}}release(e,r){r&&$r.get(r)===e&&$r.delete(r)}findFirstScrollableParent(e){let r,n=i=>{var a;i.stopPropagation();let s,c;for(let l of i.composedPath()){let d=l,p=this.elementCanScroll(d);if(p&&d.clientHeight&&d.clientHeight<d.scrollHeight){s=d;break}else p&&c==null&&(c=d)}r=(a=s??c)!==null&&a!==void 0?a:document.body};return e.addEventListener("find-scrollable-parent",n),e.dispatchEvent(new Event("find-scrollable-parent",{composed:!0})),e.removeEventListener("find-scrollable-parent",n),r}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)}catch{return!1}}getAbsoluteScrollOffset(e,r){let n=0;for(;r&&r.offsetParent!==e.offsetParent;)n+=r.offsetTop,r=r.offsetParent;return n+r.offsetTop-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let i=this.getAbsoluteScrollOffset(n,e),a=i-n.clientHeight+e.clientHeight,s=i,c=xo(0,(s-n.scrollTop)/(s-a),1),l=this.computeTopOffsetRatio(r?.position,c)*(a-s)+s;n.scrollTo({behavior:r?.behavior,top:l})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(wn=window.FluidTopicsScrollHelper)!==null&&wn!==void 0?wn:new En;var Au=window.FluidTopicsScrollHelper;var An={};U(An,{shadowQuerySelector:()=>Nu,shadowQuerySelectorAll:()=>Ru});function Nu(t,e,...r){var n;let i=t.querySelector(e);for(let a of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}function Ru(t,e,...r){let n=[...t.querySelectorAll(e)];for(let i of r)n=n.flatMap(a=>{var s,c;return[...(c=(s=a.shadowRoot)===null||s===void 0?void 0:s.querySelectorAll(i))!==null&&c!==void 0?c:[]]});return n}var Nn={};U(Nn,{serializeRequest:()=>Pu});function Iu(t){return`"${t}"`}function Pu(t,e){var r,n,i,a;let s=new URLSearchParams({"content-lang":(r=e.contentLocale)!==null&&r!==void 0?r:"all"});if(((n=e.query)===null||n===void 0?void 0:n.length)>0&&s.append("query",e.query),e.scope&&e.scope!=="DEFAULT"&&s.append("scope",e.scope.toLowerCase()),e.virtualField&&e.virtualField!=="EVERYWHERE"&&s.append("virtual-field",e.virtualField.toLowerCase()),e.periodFilter){let l=e.periodFilter.period,d=l?`_${l.from}_${l.to}`:"";s.append("period",e.periodFilter.periodType.toLowerCase()+d)}if(((i=e.sort)===null||i===void 0?void 0:i.length)>0&&e.sort[0].key==="ft:lastEdition"&&s.append("sort","last_update"),((a=e.filters)===null||a===void 0?void 0:a.length)>0){let l=e.filters.map(d=>{let p=d.values.map(h=>h.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*")).map(h=>encodeURIComponent(Iu(h))).join("_");return`${d.key}~${p}`}).join("*");s.append("filters",l)}return new URL(`${t.replace(/\/+$/,"")}/search?${s.toString()}`).href}var Rn={};U(Rn,{toFtFormComponent:()=>_u});var Br=Symbol("elementInternals");function _u(t,e){class r extends t{static get formAssociated(){return!0}get form(){return this[Br].form}constructor(...i){super(i),this[Br]=this.attachInternals(),this[Br].role=e}setFormValue(i){this[Br].setFormValue(i)}}return r}var In={};U(In,{DateFormatter:()=>ht});var ht=class{static format(e,r,n,i){return window.moment?window.moment(e).locale(r).format(this.getDateFormat(n,i)):e}static getDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}};var Pn,_n,Tn,Ln,Tu=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((Tn=(_n=(Pn=window.safari)===null||Pn===void 0?void 0:Pn.pushNotification)===null||_n===void 0?void 0:_n.toString())!==null&&Tn!==void 0?Tn:"")==="[object SafariRemoteNotification]",Lu="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(Ln=window.ftGlobals)!==null&&Ln!==void 0?Ln:{lit:so,litDecorators:co,litRepeat:lo,litClassMap:uo,litStyleMap:fo,litUnsafeHTML:po,wcUtils:{...mo,...ho,...yo,...In,...bo,...So,...Co,...Io,...Bo,...Eo,...jo,...Ho,...Ua,...vo,...Go,...Zo,...Da,...qo,...On,...Wo,...Cn,...An,...Nn,...Rn,isSafari:Tu,isTouchScreen:Lu,setVariable:wr}};var my={},gs=W`
49
+ `;var Da={};var qo={};U(qo,{ParametrizedLabelResolver:()=>Vt});var Vt=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var n,i;e=this.resolvePluralKey(e,r);let a=(i=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((n,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,r){for(let n of r)if(typeof n=="number"){let i=`${String(e)}[\\=${n}]`;if(i in this.labels||i in this.defaultLabels)return i}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let n=i=>r?.includes("date")?e.toLocaleDateString(i):r?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return n(document.documentElement.lang)}catch{return n()}}};var On={};U(On,{FtCommandQueue:()=>Kt,FtLitElementRedux:()=>ue,FtReduxStore:()=>Se,clearAllStores:()=>Cu,isFtReduxStore:()=>Ye,redux:()=>Ie,reduxEventListener:()=>Hl,reduxReactive:()=>Wl});var Wl=()=>(t,e)=>{var r;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(r=n.reduxReactiveProperties)===null||r===void 0||r.add(e)},Ie=t=>{let e=t??{};return(r,n)=>{var i;let a={hasChanged:kt,attribute:!1,...e};_(a)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:c=>c[n],store:e.store})}},Hl=t=>(e,r)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(r,t)};var Kt=class{constructor(){this.queue=[]}add(e,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};function Ye(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Fa,$a,Ba,Tr=Symbol("internalReduxEventsUnsubscribers"),Pe=Symbol("internalStoresUnsubscribers"),Je=Symbol("internalStores"),ue=class extends J{constructor(){super(...arguments),this[Fa]=new Map,this[$a]=new Map,this[Ba]=[]}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(r=>e.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[Je].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Je].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Je].get(e)}addStore(e,r){var n;r=(n=r??(Ye(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this.setupStore(r,e)}removeStore(e){let r=typeof e=="string"?e:e.name;this.unsubscribeFromStore(r),this[Je].delete(r)}setupStore(e,r){this[Je].set(e,r),this.subscribeToStore(e,r),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Je].forEach((e,r)=>this.subscribeToStore(r,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let i=this.getStore(e.store);i&&(e.store?this[Pe].has(e.store):this[Pe].size>0)&&(this[r]=e.selector(i.getState(),this))}})}subscribeToStore(e,r){var n;this[Pe].set(e,r.subscribe(()=>this.updateFromStores())),Ye(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||r.name===i.store)){let s=c=>this[a](c);r.eventBus.addEventListener(i.eventName,s),this[Tr].push(()=>r.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Pe].forEach((e,r)=>this.unsubscribeFromStore(r)),this[Tr].forEach(e=>e()),this[Tr]=[]}unsubscribeFromStore(e){this[Pe].has(e)&&this[Pe].get(e)(),this[Pe].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Fa=Pe,$a=Je,Ba=Tr;ue.reduxProperties=new Map;ue.reduxReactiveProperties=new Set;ue.reduxEventListeners=new Map;function ee(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ve(t){return!!t&&!!t[M]}function ie(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Yl}(t)||Array.isArray(t)||!!t[Ga]||!!(!((e=t.constructor)===null||e===void 0)&&e[Ga])||nn(t)||an(t))}function Xe(t,e,r){r===void 0&&(r=!1),dt(t)===0?(r?Object.keys:ut)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function dt(t){var e=t[M];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:nn(t)?2:an(t)?3:0}function lt(t,e){return dt(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function zl(t,e){return dt(t)===2?t.get(e):t[e]}function Za(t,e,r){var n=dt(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function qa(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function nn(t){return Zl&&t instanceof Map}function an(t){return ql&&t instanceof Set}function _e(t){return t.o||t.t}function sn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Xa(t);delete e[M];for(var r=ut(e),n=0;n<r.length;n++){var i=r[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function cn(t,e){return e===void 0&&(e=!1),ln(t)||ve(t)||!ie(t)||(dt(t)>1&&(t.set=t.add=t.clear=t.delete=jl),Object.freeze(t),e&&Xe(t,function(r,n){return cn(n,!0)},!0)),t}function jl(){ee(2)}function ln(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function de(t){var e=on[t];return e||ee(18,t),e}function Vl(t,e){on[t]||(on[t]=e)}function en(){return Zt}function Yo(t,e){e&&(de("Patches"),t.u=[],t.s=[],t.v=e)}function Lr(t){tn(t),t.p.forEach(Kl),t.p=null}function tn(t){t===Zt&&(Zt=t.l)}function Wa(t){return Zt={p:[],l:Zt,h:t,m:!0,_:0}}function Kl(t){var e=t[M];e.i===0||e.i===1?e.j():e.g=!0}function Jo(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||de("ES5").S(e,t,n),n?(r[M].P&&(Lr(e),ee(4)),ie(t)&&(t=kr(e,t),e.l||Ur(e,t)),e.u&&de("Patches").M(r[M].t,t,e.u,e.s)):t=kr(e,r,[]),Lr(e),e.u&&e.v(e.u,e.s),t!==Ja?t:void 0}function kr(t,e,r){if(ln(e))return e;var n=e[M];if(!n)return Xe(e,function(c,l){return Ha(t,n,e,c,l,r)},!0),e;if(n.A!==t)return e;if(!n.P)return Ur(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=sn(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Xe(a,function(c,l){return Ha(t,n,i,c,l,r,s)}),Ur(t,i,!1),r&&t.u&&de("Patches").N(n,r,t.u,t.s)}return n.o}function Ha(t,e,r,n,i,a,s){if(ve(i)){var c=kr(t,i,a&&e&&e.i!==3&&!lt(e.R,n)?a.concat(n):void 0);if(Za(r,n,c),!ve(c))return;t.m=!1}else s&&r.add(i);if(ie(i)&&!ln(i)){if(!t.h.D&&t._<1)return;kr(t,i),e&&e.A.l||Ur(t,i)}}function Ur(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&cn(e,r)}function Xo(t,e){var r=t[M];return(r?_e(r):t)[e]}function za(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Te(t){t.P||(t.P=!0,t.l&&Te(t.l))}function Qo(t){t.o||(t.o=sn(t.t))}function rn(t,e,r){var n=nn(e)?de("MapSet").F(e,r):an(e)?de("MapSet").T(e,r):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:en(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},l=c,d=qt;s&&(l=[c],d=Gt);var p=Proxy.revocable(l,d),h=p.revoke,g=p.proxy;return c.k=g,c.j=h,g}(e,r):de("ES5").J(e,r);return(r?r.A:en()).p.push(n),n}function Gl(t){return ve(t)||ee(22,t),function e(r){if(!ie(r))return r;var n,i=r[M],a=dt(r);if(i){if(!i.P&&(i.i<4||!de("ES5").K(i)))return i.t;i.I=!0,n=ja(r,a),i.I=!1}else n=ja(r,a);return Xe(n,function(s,c){i&&zl(i.t,s)===c||Za(n,s,e(c))}),a===3?new Set(n):n}(t)}function ja(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return sn(t)}function Ya(){function t(s,c){var l=a[s];return l?l.enumerable=c:a[s]=l={configurable:!0,enumerable:c,get:function(){var d=this[M];return qt.get(d,s)},set:function(d){var p=this[M];qt.set(p,s,d)}},l}function e(s){for(var c=s.length-1;c>=0;c--){var l=s[c][M];if(!l.P)switch(l.i){case 5:n(l)&&Te(l);break;case 4:r(l)&&Te(l)}}}function r(s){for(var c=s.t,l=s.k,d=ut(l),p=d.length-1;p>=0;p--){var h=d[p];if(h!==M){var g=c[h];if(g===void 0&&!lt(c,h))return!0;var y=l[h],b=y&&y[M];if(b?b.t!==g:!qa(y,g))return!0}}var O=!!c[M];return d.length!==ut(c).length+(O?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(c,c.length-1);if(l&&!l.get)return!0;for(var d=0;d<c.length;d++)if(!c.hasOwnProperty(d))return!0;return!1}function i(s){s.g&&ee(3,JSON.stringify(_e(s)))}var a={};Vl("ES5",{J:function(s,c){var l=Array.isArray(s),d=function(h,g){if(h){for(var y=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(y,""+b,t(b,!0));return y}var O=Xa(g);delete O[M];for(var C=ut(O),A=0;A<C.length;A++){var N=C[A];O[N]=t(N,h||!!O[N].enumerable)}return Object.create(Object.getPrototypeOf(g),O)}(l,s),p={i:l?5:4,A:c?c.A:en(),P:!1,I:!1,R:{},l:c,t:s,k:d,o:null,g:!1,C:!1};return Object.defineProperty(d,M,{value:p,writable:!0}),d},S:function(s,c,l){l?ve(c)&&c[M].A===s&&e(s.p):(s.u&&function d(p){if(p&&typeof p=="object"){var h=p[M];if(h){var g=h.t,y=h.k,b=h.R,O=h.i;if(O===4)Xe(y,function(v){v!==M&&(g[v]!==void 0||lt(g,v)?b[v]||d(y[v]):(b[v]=!0,Te(h)))}),Xe(g,function(v){y[v]!==void 0||lt(y,v)||(b[v]=!1,Te(h))});else if(O===5){if(n(h)&&(Te(h),b.length=!0),y.length<g.length)for(var C=y.length;C<g.length;C++)b[C]=!1;else for(var A=g.length;A<y.length;A++)b[A]=!0;for(var N=Math.min(y.length,g.length),S=0;S<N;S++)y.hasOwnProperty(S)||(b[S]=!0),b[S]===void 0&&d(y[S])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var Va,Zt,un=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Zl=typeof Map<"u",ql=typeof Set<"u",Ka=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ja=un?Symbol.for("immer-nothing"):((Va={})["immer-nothing"]=!0,Va),Ga=un?Symbol.for("immer-draftable"):"__$immer_draftable",M=un?Symbol.for("immer-state"):"__$immer_state";var Yl=""+Object.prototype.constructor,ut=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Xa=Object.getOwnPropertyDescriptors||function(t){var e={};return ut(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},on={},qt={get:function(t,e){if(e===M)return t;var r=_e(t);if(!lt(r,e))return function(i,a,s){var c,l=za(a,s);return l?"value"in l?l.value:(c=l.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!ie(n)?n:n===Xo(t.t,e)?(Qo(t),t.o[e]=rn(t.A.h,n,t)):n},has:function(t,e){return e in _e(t)},ownKeys:function(t){return Reflect.ownKeys(_e(t))},set:function(t,e,r){var n=za(_e(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var i=Xo(_e(t),e),a=i?.[M];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(qa(r,i)&&(r!==void 0||lt(t.t,e)))return!0;Qo(t),Te(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Xo(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Qo(t),Te(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=_e(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){ee(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ee(12)}},Gt={};Xe(qt,function(t,e){Gt[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Gt.deleteProperty=function(t,e){return Gt.set.call(this,t,e,void 0)},Gt.set=function(t,e,r){return qt.set.call(this,t[0],e,r,t[0])};var Jl=function(){function t(r){var n=this;this.O=Ka,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var l=n;return function(O){var C=this;O===void 0&&(O=c);for(var A=arguments.length,N=Array(A>1?A-1:0),S=1;S<A;S++)N[S-1]=arguments[S];return l.produce(O,function(v){var w;return(w=a).call.apply(w,[C,v].concat(N))})}}var d;if(typeof a!="function"&&ee(6),s!==void 0&&typeof s!="function"&&ee(7),ie(i)){var p=Wa(n),h=rn(n,i,void 0),g=!0;try{d=a(h),g=!1}finally{g?Lr(p):tn(p)}return typeof Promise<"u"&&d instanceof Promise?d.then(function(O){return Yo(p,s),Jo(O,p)},function(O){throw Lr(p),O}):(Yo(p,s),Jo(d,p))}if(!i||typeof i!="object"){if((d=a(i))===void 0&&(d=i),d===Ja&&(d=void 0),n.D&&cn(d,!0),s){var y=[],b=[];de("Patches").M(i,d,y,b),s(y,b)}return d}ee(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(d){for(var p=arguments.length,h=Array(p>1?p-1:0),g=1;g<p;g++)h[g-1]=arguments[g];return n.produceWithPatches(d,function(y){return i.apply(void 0,[y].concat(h))})};var s,c,l=n.produce(i,a,function(d,p){s=d,c=p});return typeof Promise<"u"&&l instanceof Promise?l.then(function(d){return[d,s,c]}):[l,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){ie(r)||ee(8),ve(r)&&(r=Gl(r));var n=Wa(this),i=rn(this,r,void 0);return i[M].C=!0,tn(n),i},e.finishDraft=function(r,n){var i=r&&r[M],a=i.A;return Yo(a,n),Jo(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Ka&&ee(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var s=de("Patches").$;return ve(r)?s(r,n):this.produce(r,function(c){return s(c,n)})},t}(),X=new Jl,Xl=X.produce,Vm=X.produceWithPatches.bind(X),Km=X.setAutoFreeze.bind(X),Gm=X.setUseProxies.bind(X),Zm=X.applyPatches.bind(X),qm=X.createDraft.bind(X),Ym=X.finishDraft.bind(X),Mr=Xl;function Le(t){"@babel/helpers - typeof";return Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(t)}function dn(t,e){if(Le(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Le(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fn(t){var e=dn(t,"string");return Le(e)==="symbol"?e:String(e)}function pn(t,e,r){return e=fn(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Dr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Qa(Object(r),!0).forEach(function(n){pn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qa(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function V(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var es=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),hn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Fr={INIT:"@@redux/INIT"+hn(),REPLACE:"@@redux/REPLACE"+hn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+hn()}};function Ql(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function mn(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(V(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(V(1));return r(mn)(t,e)}if(typeof t!="function")throw new Error(V(2));var i=t,a=e,s=[],c=s,l=!1;function d(){c===s&&(c=s.slice())}function p(){if(l)throw new Error(V(3));return a}function h(O){if(typeof O!="function")throw new Error(V(4));if(l)throw new Error(V(5));var C=!0;return d(),c.push(O),function(){if(C){if(l)throw new Error(V(6));C=!1,d();var N=c.indexOf(O);c.splice(N,1),s=null}}}function g(O){if(!Ql(O))throw new Error(V(7));if(typeof O.type>"u")throw new Error(V(8));if(l)throw new Error(V(9));try{l=!0,a=i(a,O)}finally{l=!1}for(var C=s=c,A=0;A<C.length;A++){var N=C[A];N()}return O}function y(O){if(typeof O!="function")throw new Error(V(10));i=O,g({type:Fr.REPLACE})}function b(){var O,C=h;return O={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(V(11));function S(){N.next&&N.next(p())}S();var v=C(S);return{unsubscribe:v}}},O[es]=function(){return this},O}return g({type:Fr.INIT}),n={dispatch:g,subscribe:h,getState:p,replaceReducer:y},n[es]=b,n}function eu(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:Fr.INIT});if(typeof n>"u")throw new Error(V(12));if(typeof r(void 0,{type:Fr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(V(13))})}function ts(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var a=Object.keys(r),s,c;try{eu(r)}catch(l){c=l}return function(d,p){if(d===void 0&&(d={}),c)throw c;if(0)var h;for(var g=!1,y={},b=0;b<a.length;b++){var O=a[b],C=r[O],A=d[O],N=C(A,p);if(typeof N>"u"){var S=p&&p.type;throw new Error(V(14))}y[O]=N,g=g||N!==A}return g=g||a.length!==Object.keys(d).length,g?y:d}}function ft(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function rs(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(V(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(l){return l(s)});return a=ft.apply(void 0,c)(i.dispatch),Dr(Dr({},i),{},{dispatch:a})}}}function os(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var ns=os();ns.withExtraArgument=os;var gn=ns;var ls=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),tu=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(d){return function(p){return l([d,p])}}function l(d){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=d[0]&2?i.return:d[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,d[1])).done)return a;switch(i=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,i=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){r.label=d[1];break}if(d[0]===6&&r.label<a[1]){r.label=a[1],a=d;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(d);break}a[2]&&r.ops.pop(),r.trys.pop();continue}d=e.call(t,r)}catch(p){d=[6,p],i=0}finally{n=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}},pt=function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},ru=Object.defineProperty,ou=Object.defineProperties,nu=Object.getOwnPropertyDescriptors,is=Object.getOwnPropertySymbols,iu=Object.prototype.hasOwnProperty,au=Object.prototype.propertyIsEnumerable,as=function(t,e,r){return e in t?ru(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},ke=function(t,e){for(var r in e||(e={}))iu.call(e,r)&&as(t,r,e[r]);if(is)for(var n=0,i=is(e);n<i.length;n++){var r=i[n];au.call(e,r)&&as(t,r,e[r])}return t},yn=function(t,e){return ou(t,nu(e))},su=function(t,e,r){return new Promise(function(n,i){var a=function(l){try{c(r.next(l))}catch(d){i(d)}},s=function(l){try{c(r.throw(l))}catch(d){i(d)}},c=function(l){return l.done?n(l.value):Promise.resolve(l.value).then(a,s)};c((r=r.apply(t,e)).next())})};var cu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ft:ft.apply(null,arguments)},hg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function lu(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var uu=function(t){ls(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,pt([void 0],r[0].concat(this)))):new(e.bind.apply(e,pt([void 0],r.concat(this))))},e}(Array),du=function(t){ls(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,pt([void 0],r[0].concat(this)))):new(e.bind.apply(e,pt([void 0],r.concat(this))))},e}(Array);function vn(t){return ie(t)?Mr(t,function(){}):t}function fu(t){return typeof t=="boolean"}function pu(){return function(e){return hu(e)}}function hu(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new uu;if(r&&(fu(r)?c.push(gn):c.push(gn.withExtraArgument(r.extraArgument))),0){if(i)var l;if(s)var d}return c}var bn=!0;function us(t){var e=pu(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,s=a===void 0?e():a,c=r.devTools,l=c===void 0?!0:c,d=r.preloadedState,p=d===void 0?void 0:d,h=r.enhancers,g=h===void 0?void 0:h,y;if(typeof i=="function")y=i;else if(lu(i))y=ts(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=s;if(typeof b=="function"&&(b=b(e),!bn&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!bn&&b.some(function(v){return typeof v!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=rs.apply(void 0,b),C=ft;l&&(C=cu(ke({trace:!bn},typeof l=="object"&&l)));var A=new du(O),N=A;Array.isArray(g)?N=pt([O],g):typeof g=="function"&&(N=g(A));var S=C.apply(void 0,N);return mn(y,p,S)}function Ue(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return ke(ke({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}function ds(t){var e={},r=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,r,n]}function mu(t){return typeof t=="function"}function gu(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?ds(e):[e,r,n],a=i[0],s=i[1],c=i[2],l;if(mu(t))l=function(){return vn(t())};else{var d=vn(t);l=function(){return d}}function p(h,g){h===void 0&&(h=l());var y=pt([a[g.type]],s.filter(function(b){var O=b.matcher;return O(g)}).map(function(b){var O=b.reducer;return O}));return y.filter(function(b){return!!b}).length===0&&(y=[c]),y.reduce(function(b,O){if(O)if(ve(b)){var C=b,A=O(C,g);return A===void 0?b:A}else{if(ie(b))return Mr(b,function(N){return O(N,g)});var A=O(b,g);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},h)}return p.getInitialState=l,p}function yu(t,e){return t+"/"+e}function fs(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:vn(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(p){var h=n[p],g=yu(e,p),y,b;"reducer"in h?(y=h.reducer,b=h.prepare):y=h,a[p]=y,s[g]=y,c[p]=b?Ue(g,b):Ue(g)});function l(){var p=typeof t.extraReducers=="function"?ds(t.extraReducers):[t.extraReducers],h=p[0],g=h===void 0?{}:h,y=p[1],b=y===void 0?[]:y,O=p[2],C=O===void 0?void 0:O,A=ke(ke({},g),s);return gu(r,function(N){for(var S in A)N.addCase(S,A[S]);for(var v=0,w=b;v<w.length;v++){var R=w[v];N.addMatcher(R.matcher,R.reducer)}C&&N.addDefaultCase(C)})}var d;return{name:e,reducer:function(p,h){return d||(d=l()),d(p,h)},actions:c,caseReducers:a,getInitialState:function(){return d||(d=l()),d.getInitialState()}}}var bu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=bu[Math.random()*64|0];return e},vu=["name","message","stack","code"],xn=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),ss=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),Su=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=vu;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},bg=function(){function t(e,r,n){var i=Ue(e+"/fulfilled",function(p,h,g,y){return{payload:p,meta:yn(ke({},y||{}),{arg:g,requestId:h,requestStatus:"fulfilled"})}}),a=Ue(e+"/pending",function(p,h,g){return{payload:void 0,meta:yn(ke({},g||{}),{arg:h,requestId:p,requestStatus:"pending"})}}),s=Ue(e+"/rejected",function(p,h,g,y,b){return{payload:y,error:(n&&n.serializeError||Su)(p||"Rejected"),meta:yn(ke({},b||{}),{arg:g,requestId:h,rejectedWithValue:!!y,requestStatus:"rejected",aborted:p?.name==="AbortError",condition:p?.name==="ConditionError"})}}),c=!1,l=typeof AbortController<"u"?AbortController:function(){function p(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return p.prototype.abort=function(){},p}();function d(p){return function(h,g,y){var b=n?.idGenerator?n.idGenerator(p):xu(),O=new l,C,A=!1;function N(v){C=v,O.abort()}var S=function(){return su(this,null,function(){var v,w,R,P,j,L,m;return tu(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),P=(v=n?.condition)==null?void 0:v.call(n,p,{getState:g,extra:y}),wu(P)?[4,P]:[3,2];case 1:P=x.sent(),x.label=2;case 2:if(P===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,j=new Promise(function(E,T){return O.signal.addEventListener("abort",function(){return T({name:"AbortError",message:C||"Aborted"})})}),h(a(b,p,(w=n?.getPendingMeta)==null?void 0:w.call(n,{requestId:b,arg:p},{getState:g,extra:y}))),[4,Promise.race([j,Promise.resolve(r(p,{dispatch:h,getState:g,extra:y,requestId:b,signal:O.signal,abort:N,rejectWithValue:function(E,T){return new xn(E,T)},fulfillWithValue:function(E,T){return new ss(E,T)}})).then(function(E){if(E instanceof xn)throw E;return E instanceof ss?i(E.payload,b,p,E.meta):i(E,b,p)})])];case 3:return R=x.sent(),[3,5];case 4:return L=x.sent(),R=L instanceof xn?s(null,b,p,L.payload,L.meta):s(L,b,p),[3,5];case 5:return m=n&&!n.dispatchConditionRejection&&s.match(R)&&R.meta.condition,m||h(R),[2,R]}})})}();return Object.assign(S,{abort:N,requestId:b,arg:p,unwrap:function(){return S.then(Ou)}})}}return Object.assign(d,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function Ou(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function wu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ps="listener",hs="completed",ms="cancelled",xg="task-"+ms,vg="task-"+hs,Sg=ps+"-"+ms,Og=ps+"-"+hs;var Sn="listenerMiddleware";var wg=Ue(Sn+"/add"),Eg=Ue(Sn+"/removeAll"),Cg=Ue(Sn+"/remove");var cs,Ag=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(cs||(cs=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Eu=function(t){return function(e){setTimeout(e,t)}},Ng=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Eu(10);Ya();window.ftReduxStores||(window.ftReduxStores={});var Se=class t{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Ye(a))return a;if(i==null)return;let s=fs({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),c=us({reducer:(l,d)=>d.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__")?{...l,...d.overwrites}:s.reducer(l,d)});return window.ftReduxStores[i.name]=new t(s,c)}constructor(e,r){this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Kt,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,c=n[s];return c?(...l)=>{let d=c(...l);return this.reduxStore.dispatch(d),d}:l=>{this.setState({[s]:l})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function Cu(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Ye(e)&&e.clear()}var Cn={};U(Cn,{scrollHelper:()=>Au});var wn,$r=new Map,En=class{lock(e,r){if(r){let n=$r.get(r);if(n==null||n===e)return $r.set(r,e),r}}release(e,r){r&&$r.get(r)===e&&$r.delete(r)}findFirstScrollableParent(e){let r,n=i=>{var a;i.stopPropagation();let s,c;for(let l of i.composedPath()){let d=l,p=this.elementCanScroll(d);if(p&&d.clientHeight&&d.clientHeight<d.scrollHeight){s=d;break}else p&&c==null&&(c=d)}r=(a=s??c)!==null&&a!==void 0?a:document.body};return e.addEventListener("find-scrollable-parent",n),e.dispatchEvent(new Event("find-scrollable-parent",{composed:!0})),e.removeEventListener("find-scrollable-parent",n),r}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)}catch{return!1}}getAbsoluteScrollOffset(e,r){let n=0;for(;r&&r.offsetParent!==e.offsetParent;)n+=r.offsetTop,r=r.offsetParent;return n+r.offsetTop-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let i=this.getAbsoluteScrollOffset(n,e),a=i-n.clientHeight+e.clientHeight,s=i,c=xo(0,(s-n.scrollTop)/(s-a),1),l=this.computeTopOffsetRatio(r?.position,c)*(a-s)+s;n.scrollTo({behavior:r?.behavior,top:l})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(wn=window.FluidTopicsScrollHelper)!==null&&wn!==void 0?wn:new En;var Au=window.FluidTopicsScrollHelper;var An={};U(An,{shadowQuerySelector:()=>Nu,shadowQuerySelectorAll:()=>Ru});function Nu(t,e,...r){var n;let i=t.querySelector(e);for(let a of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}function Ru(t,e,...r){let n=[...t.querySelectorAll(e)];for(let i of r)n=n.flatMap(a=>{var s,c;return[...(c=(s=a.shadowRoot)===null||s===void 0?void 0:s.querySelectorAll(i))!==null&&c!==void 0?c:[]]});return n}var Nn={};U(Nn,{serializeRequest:()=>Pu});function Iu(t){return`"${t}"`}function Pu(t,e){var r,n,i,a;let s=new URLSearchParams({"content-lang":(r=e.contentLocale)!==null&&r!==void 0?r:"all"});if(((n=e.query)===null||n===void 0?void 0:n.length)>0&&s.append("query",e.query),e.scope&&e.scope!=="DEFAULT"&&s.append("scope",e.scope.toLowerCase()),e.virtualField&&e.virtualField!=="EVERYWHERE"&&s.append("virtual-field",e.virtualField.toLowerCase()),e.periodFilter){let l=e.periodFilter.period,d=l?`_${l.from}_${l.to}`:"";s.append("period",e.periodFilter.periodType.toLowerCase()+d)}if(((i=e.sort)===null||i===void 0?void 0:i.length)>0&&e.sort[0].key==="ft:lastEdition"&&s.append("sort","last_update"),((a=e.filters)===null||a===void 0?void 0:a.length)>0){let l=e.filters.map(d=>{let p=d.values.map(h=>h.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*")).map(h=>encodeURIComponent(Iu(h))).join("_");return`${d.key}~${p}`}).join("*");s.append("filters",l)}return new URL(`${t.replace(/\/+$/,"")}/search?${s.toString()}`).href}var Rn={};U(Rn,{toFtFormComponent:()=>_u});var Br=Symbol("elementInternals");function _u(t,e){class r extends t{static get formAssociated(){return!0}get form(){return this[Br].form}constructor(...i){super(i),this[Br]=this.attachInternals(),this[Br].role=e}setFormValue(i){this[Br].setFormValue(i)}}return r}var In={};U(In,{DateFormatter:()=>ht});var ht=class{static format(e,r,n,i){return window.moment?window.moment(e).locale(r).format(this.getDateFormat(n,i)):e}static getDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}};var Pn,_n,Tn,Ln,Tu=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((Tn=(_n=(Pn=window.safari)===null||Pn===void 0?void 0:Pn.pushNotification)===null||_n===void 0?void 0:_n.toString())!==null&&Tn!==void 0?Tn:"")==="[object SafariRemoteNotification]",Lu="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(Ln=window.ftGlobals)!==null&&Ln!==void 0?Ln:{lit:so,litDecorators:co,litRepeat:lo,litClassMap:uo,litStyleMap:fo,litUnsafeHTML:po,wcUtils:{...mo,...ho,...yo,...In,...bo,...So,...Co,...Io,...Bo,...Eo,...jo,...Ho,...Ua,...vo,...Go,...Zo,...Da,...qo,...On,...Wo,...Cn,...An,...Nn,...Rn,isSafari:Tu,isTouchScreen:Lu,setVariable:wr}};var my={},gs=W`
50
50
  `;var ku={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{t.request.paging.perPage=e.payload},setPageNumber:(t,e)=>{t.request.paging.page=e.payload},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.filters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setRequestClusterSortCriterion:(t,e)=>{var r;t.request.clusterSortCriterions=(r=e.payload)!==null&&r!==void 0?r:[]},setResults:(t,e)=>{t.results=e.payload},setFacets:(t,e)=>{t.facets=e.payload},setSpellcheck:(t,e)=>{t.spellcheck=e.payload},setLocales:(t,e)=>{t.locales=e.payload},setPaging:(t,e)=>{t.paging=e.payload},setLiveQuery:(t,e)=>{t.liveQuery=e.payload},setSuggestResults:(t,e)=>{t.suggestResults=e.payload},setRequestPeriodFilter:(t,e)=>{t.request.periodFilter=e.payload}},ys=t=>Se.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],filters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:""},reducers:ku});var Ry=Zs(xs(),1);var vs;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(vs||(vs={}));var Ss;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Ss||(Ss={}));var Os;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Os||(Os={}));var ws;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(ws||(ws={}));var Es;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Es||(Es={}));var Cs;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Cs||(Cs={}));var As;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(As||(As={}));var Ns;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ns||(Ns={}));var Rs;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Rs||(Rs={}));var Is;(function(t){t.ASC="ASC",t.DESC="DESC"})(Is||(Is={}));var Ps;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Ps||(Ps={}));var mt;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(mt||(mt={}));var _s;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(_s||(_s={}));var Ts;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ts||(Ts={}));var Ls;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Ls||(Ls={}));var ks;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(ks||(ks={}));var gt;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"})(gt||(gt={}));var z;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"})(z||(z={}));var Us;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Us||(Us={}));var Ey={[z.PERSONAL_BOOK_SHARE_USER]:[z.PERSONAL_BOOK_USER],[z.HTML_EXPORT_USER]:[z.PERSONAL_BOOK_USER],[z.PDF_EXPORT_USER]:[z.PERSONAL_BOOK_USER],[z.KHUB_ADMIN]:[z.CONTENT_PUBLISHER],[z.ADMIN]:[z.KHUB_ADMIN,z.USERS_ADMIN,z.PORTAL_ADMIN],[z.DEVELOPER]:[z.BETA_USER,z.DEBUG_USER]};var Ms=W`
51
- `;var Uu="ft-app-info",kn=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},Mu={session:(t,e)=>{oe(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>I.eventBus.dispatchEvent(new kn(e.payload)),0))}},I=Se.get({name:Uu,reducers:Mu,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Qe=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=I.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let i=I.subscribe(()=>{n=t.get(e),n&&(i(),r(n))})}})}};var fe=class{constructor(e=!0,r){var n;this.overrideApi=r;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new ce,this.cache=e?i.commonCache:new ce}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Qe.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Qe.await()}clearCache(){this.cache.clearAll()}};var Ds,Du=Symbol("clearAfterUnitTest"),Wr=class extends fe{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ds]=()=>{this.defaultMessages={},this.cache=new ce,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=I.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),Object.keys(r).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};oe(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}await this.fetchContext(e)}resolveMessage(e,r,...n){var i,a,s;e=e.toLowerCase(),this.fetchContext(e);let c=(a=(i=this.cache.getNow(e))===null||i===void 0?void 0:i.messages)!==null&&a!==void 0?a:{};return new Vt((s=this.defaultMessages[e])!==null&&s!==void 0?s:{},c).resolve(r,...n)}async fetchContext(e){if(!this.cache.has(e))try{await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),await this.notify(e)}catch(r){console.error(r)}}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(r=>Or(0).then(()=>r()).catch(()=>null)))}};Ds=Du;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Wr{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Wr{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Fs=window.FluidTopicsI18nService,Gy=window.FluidTopicsCustomI18nService;var G=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},B=class extends J{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Qe.get(),this.messageContexts=[],this.cache=new ce,this.cleanSessionDebouncer=new re}render(){return Tt`
51
+ `;var Uu="ft-app-info",kn=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},Mu={session:(t,e)=>{oe(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>I.eventBus.dispatchEvent(new kn(e.payload)),0))}},I=Se.get({name:Uu,reducers:Mu,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Qe=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=I.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let i=I.subscribe(()=>{n=t.get(e),n&&(i(),r(n))})}})}};var fe=class{constructor(e=!0,r){var n;this.overrideApi=r;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new ce,this.cache=e?i.commonCache:new ce}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Qe.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Qe.await()}clearCache(){this.cache.clearAll()}};var Ds,Du=Symbol("clearAfterUnitTest"),Wr=class extends fe{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ds]=()=>{this.defaultMessages={},this.cache=new ce,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=I.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),Object.keys(r).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};oe(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}await this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new Vt((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(e){if(!this.cache.has(e))try{await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),await this.notify(e)}catch(r){console.error(r)}}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(r=>Or(0).then(()=>r()).catch(()=>null)))}};Ds=Du;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Wr{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Wr{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Fs=window.FluidTopicsI18nService,Gy=window.FluidTopicsCustomI18nService;var G=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},B=class extends J{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Qe.get(),this.messageContexts=[],this.cache=new ce,this.cleanSessionDebouncer=new re}render(){return Tt`
52
52
  <slot></slot>
53
53
  `}update(e){super.update(e),e.has("baseUrl")&&(I.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&I.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&I.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&I.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&I.actions.noCustom(this.noCustom),e.has("editorMode")&&I.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&I.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&I.actions.session(this.session),e.has("availableUiLocales")&&I.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(r=>Fs.addContext(r)),e.has("openExternalDocumentInNewTab")&&I.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&I.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&I.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};B.elementDefinitions={};B.styles=Ms;G([_()],B.prototype,"baseUrl",void 0);G([_()],B.prototype,"apiIntegrationIdentifier",void 0);G([_()],B.prototype,"uiLocale",void 0);G([Q(null)],B.prototype,"availableUiLocales",void 0);G([Q(null)],B.prototype,"metadataConfiguration",void 0);G([_({type:Boolean})],B.prototype,"editorMode",void 0);G([_({type:Boolean})],B.prototype,"noCustom",void 0);G([_({type:Boolean})],B.prototype,"openExternalDocumentInNewTab",void 0);G([_({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],B.prototype,"noCustomComponent",void 0);G([_({type:Boolean})],B.prototype,"withManualResources",void 0);G([_({type:Boolean})],B.prototype,"navigatorOnline",void 0);G([_({type:Boolean})],B.prototype,"forcedOffline",void 0);G([_({type:Object})],B.prototype,"apiProvider",void 0);G([Q([])],B.prototype,"messageContexts",void 0);G([Q(void 0)],B.prototype,"session",void 0);var Hr=class extends fe{async listMySearches(){let e=I.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var zr=class extends fe{async listMyBookmarks(){let e=I.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Fu="ft-user-assets",jr=Se.get({name:Fu,initialState:{savedSearches:void 0,bookmarks:void 0}}),Un=class{constructor(){this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new zr,this.savedSearchesService=new Hr,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=I.getState();oe((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),jr.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),jr.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();jr.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;jr.actions.bookmarks(r)}}},$s=new Un;var Mn=class{addCommand(e,r=!1){I.commands.add(e,r)}consumeCommand(e){return I.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Mn;var Dn=class{highlightHtml(e,r,n){Ko(e,r,n)}};window.FluidTopicsHighlightHtmlService=new Dn;var Fn=class{isDate(e){var r,n,i,a;return(a=(i=((n=(r=I.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var n,i,a;return ht.format(e,(n=r?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Fn;Ut("ft-app-context")(B);var Vr=class extends fe{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0)}};var $u=t=>t.request.virtualField===mt.TITLE_ONLY&&t.request.scope===gt.DOCUMENTS,Kr=class t extends Event{constructor(){super(t.eventName)}};Kr.eventName="search-context-clear-all-filters";var Yt=class t{static build(e,r){return new t(ys(e.trim()||"context"),r)}constructor(e,r){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new re(10),this.searchDebouncer=new re(100),this.suggestDebouncer=new re(300),this.service=r??new Vr}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.setLiveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){let r=this.store.getState().locales,n=this.store.getState().request.contentLocale;if(e!=n){if(r){let i=a=>r.some(s=>s.lang==a);i(e)||(e=i(n)?n:r[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return e}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let r=e.filter(n=>n.values.length>0);this.store.actions.setRequestFilters(r),this.store.actions.setPageNumber(1),r.forEach(n=>{this.facetIds.includes(n.key)||(this.facetIds=[...this.facetIds,n.key])}),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(mt.TITLE_ONLY),this.store.actions.setRequestScope(gt.DOCUMENTS)):(this.store.actions.setRequestVirtualField(mt.EVERYWHERE),this.store.actions.setRequestScope(gt.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return $u(this.store.getState())}get periodFilter(){return this.store.getState().request.periodFilter}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new Kr)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,r){let n=this.facetIds.filter(i=>i!=e);r&&n.push(r),this.facetIds=n,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map(e=>e.id)}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,r){let n=this.store.getState().request.filters,i={key:e,values:r,negative:!1},a=[...n.filter(s=>s.key!==e),i];this.setFilters(a)}setLiveQuery(e){this.store.actions.setLiveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest(e),this.store.actions.setLiveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}setPeriodFilter(e){this.store.actions.setRequestPeriodFilter(e),this.store.actions.setPageNumber(1),this.launchSearch()}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,r;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n=this.store.getState().request;if(this.store.actions.setPaging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.setResults(void 0),this.store.actions.setFacets(void 0),this.store.actions.setSpellcheck(void 0);else{this.cancelableSearch=it(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.setResults(i.results),this.store.actions.setFacets(i.facets),this.store.actions.setSpellcheck(i.spellcheck);else{let a=((r=this.store.getState().results)!==null&&r!==void 0?r:[]).concat(i.results);this.store.actions.setResults(a)}this.store.actions.setPaging(i.paging)}}catch(n){!(n instanceof Ae)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let r=this.store.getState(),n=r.request,i={input:r.liveQuery,filters:n.filters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=it(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.setSuggestResults(a.suggestions)}catch(r){!(r instanceof Ae)&&this.errorHandler&&this.errorHandler(r)}}clear(){this.store.clear()}};var Bu=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Bn=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},$n=Symbol("registerInterval");function Wu(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[$n]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[$n]):this.dispatchEvent(new Bn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=$n,Bu([Lt()],r.prototype,"stateManager",void 0),r}var Bs=class extends Wu(ue){};var K=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Wn=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},Hn=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},zn=class extends CustomEvent{constructor(e,r,n){super("ft-search-results-change",{detail:{request:e,paging:r,spellcheck:n}})}},D=class extends ue{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=Yt.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=r=>this.handleLoadError(r),this.addStore(this.stateManager.store,"search")}return this._stateManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.addStore(I)}render(){return Tt`
54
54
  <slot @register-ft-search-component=${this.registerComponent}></slot>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-context",
3
- "version": "1.1.102",
3
+ "version": "1.1.103",
4
4
  "description": "Context block for integrated search components",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,12 +19,12 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-app-context": "1.1.102",
23
- "@fluid-topics/ft-wc-utils": "1.1.102",
22
+ "@fluid-topics/ft-app-context": "1.1.103",
23
+ "@fluid-topics/ft-wc-utils": "1.1.103",
24
24
  "lit": "3.1.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@fluid-topics/public-api": "1.0.73"
28
28
  },
29
- "gitHead": "40e0b46ecdae82b7b292cbd187edf6fa0a543375"
29
+ "gitHead": "395d0494bf2cf416b65b0bd3e07875131284cfa9"
30
30
  }