@fluid-topics/ft-search-period-filter 1.1.69 → 1.1.70

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.
@@ -1525,21 +1525,21 @@ const ao=Symbol.for(""),lo=t=>{if(t?.r===ao)return t?._$litStatic$},so=t=>({_$li
1525
1525
  `,or=e.css`
1526
1526
  `,er=o.FtReduxStore.get({name:"ft-app-info",reducers:{},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}});class ir{static get(t){const{baseUrl:o,apiIntegrationIdentifier:e}=er.getState(),i=null!=t?t:e;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise((o=>{let e=ir.get(t);if(e)o(e);else{const i=er.subscribe((()=>{e=ir.get(t),e&&(i(),o(e))}))}}))}}class rr{constructor(t=!0,e){var i;this.overrideApi=e;let r=this.constructor;r.commonCache=null!==(i=r.commonCache)&&void 0!==i?i:new o.CacheRegistry,this.cache=t?r.commonCache:new o.CacheRegistry}get api(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:ir.get()}get awaitApi(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:ir.await()}clearCache(){this.cache.clearAll()}}var nr;const ar=Symbol("clearAfterUnitTest");class lr extends rr{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[nr]=()=>{this.defaultMessages={},this.cache=new o.CacheRegistry,this.listeners={}},this.currentUiLocale=er.getState().uiLocale,er.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=er.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const r={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};o.deepEqual(this.defaultMessages[t],r)||(this.defaultMessages[t]=r,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var r,n,a;t=t.toLowerCase(),this.fetchContext(t);const l=null!==(n=null===(r=this.cache.getNow(t))||void 0===r?void 0:r.messages)&&void 0!==n?n:{};return new o.ParametrizedLabelResolver(null!==(a=this.defaultMessages[t])&&void 0!==a?a:{},l).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,o){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(o),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>o.delay(0).then((()=>t())).catch((()=>null)))))}}nr=ar,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new class extends lr{constructor(){super((async(t,o)=>(await this.awaitApi).getFluidTopicsMessageContext(t,o)))}}),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new class extends lr{constructor(){super((async(t,o)=>(await this.awaitApi).getCustomMessageContext(t,o)))}});const sr=window.FluidTopicsI18nService,cr=window.FluidTopicsCustomI18nService;var fr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class pr extends o.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=()=>ir.get(),this.messageContexts=[],this.cache=new o.CacheRegistry,this.cleanSessionDebouncer=new o.Debouncer}render(){return e.html`
1527
1527
  <slot></slot>
1528
- `}update(t){super.update(t),t.has("baseUrl")&&(er.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&er.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&er.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&er.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&er.actions.noCustom(this.noCustom),t.has("editorMode")&&er.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&er.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&er.actions.session(this.session),t.has("availableUiLocales")&&er.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>sr.addContext(t))),t.has("openExternalDocumentInNewTab")&&er.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&er.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&er.actions.forcedOffline(this.forcedOffline),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}pr.elementDefinitions={},pr.styles=or,fr([i.property()],pr.prototype,"baseUrl",void 0),fr([i.property()],pr.prototype,"apiIntegrationIdentifier",void 0),fr([i.property()],pr.prototype,"uiLocale",void 0),fr([o.jsonProperty(null)],pr.prototype,"availableUiLocales",void 0),fr([o.jsonProperty(null)],pr.prototype,"metadataConfiguration",void 0),fr([i.property({type:Boolean})],pr.prototype,"editorMode",void 0),fr([i.property({type:Boolean})],pr.prototype,"noCustom",void 0),fr([i.property({type:Boolean})],pr.prototype,"openExternalDocumentInNewTab",void 0),fr([i.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],pr.prototype,"noCustomComponent",void 0),fr([i.property({type:Boolean})],pr.prototype,"withManualResources",void 0),fr([i.property({type:Boolean})],pr.prototype,"navigatorOnline",void 0),fr([i.property({type:Boolean})],pr.prototype,"forcedOffline",void 0),fr([i.property({type:Object})],pr.prototype,"apiProvider",void 0),fr([o.jsonProperty([])],pr.prototype,"messageContexts",void 0),fr([o.jsonProperty(void 0)],pr.prototype,"session",void 0);class dr extends rr{async listMySearches(){let t=er.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-searches",(async()=>(await this.awaitApi).listMySearches(t.profile.userId)),3e5):[]}}class hr extends rr{async listMyBookmarks(){let t=er.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-bookmarks",(async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId)),3e5):[]}}const ur=o.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=er.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new hr,this.savedSearchesService=new dr,er.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=er.getState();o.deepEqual(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ur.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ur.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();const t=await this.savedSearchesService.listMySearches();ur.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const o=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;ur.actions.bookmarks(o)}}};window.FluidTopicsAppInfoStoreService=new class{addCommand(t,o=!1){er.commands.add(t,o)}consumeCommand(t){return er.commands.consume(t)}};window.FluidTopicsHighlightHtmlService=new class{highlightHtml(t,e){o.highlightHtml(t,e)}},o.customElement("ft-app-context")(pr);var gr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};const yr=Symbol("i18nAttributes"),br=Symbol("i18nProperties"),mr=Symbol("i18nUnsubs");function xr(t){var o;class e extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?cr:sr}i18n(t,o,...e){var i;if("string"==typeof t)return this.i18nService.resolveMessage(t,o,...e);const r=null!==(i=t.args)&&void 0!==i?i:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var o,e;null===(o=this[yr])||void 0===o||o.forEach(((o,e)=>{var i;const r=this.getI18nAttributeValue(e);(null===(i=null==r?void 0:r.context)||void 0===i?void 0:i.toLowerCase())===t.toLowerCase()&&this.updateI18nAttributeMessage(e,r,o)})),null===(e=this[br])||void 0===e||e.forEach(((o,e)=>{o.context.toLowerCase()===t.toLowerCase()&&(this[e]=this.i18n(o))})),setTimeout((()=>this.requestUpdate()),0)}updateI18nAttributeMessage(t,o,e){this[t]={...o,message:this.i18n({context:o.context,key:o.key,...e})}}update(t){var o,e;super.update(t),null===(o=this[yr])||void 0===o||o.forEach(((o,e)=>{const i=this.getI18nAttributeValue(e);(null==i?void 0:i.context)&&i.key&&(t.has(e)||null!=o.argsProvider)&&(t.has(e)&&this.addI18nContext(i.context),this.updateI18nAttributeMessage(e,i,o))})),null===(e=this[br])||void 0===e||e.forEach(((t,o)=>{null!=t.argsProvider&&(this[o]=this.i18n(t))}))}getI18nAttributeValue(t){return this[t]}connectedCallback(){var t,o,e,i;super.connectedCallback(),new Set([...null!==(o=null===(t=this[br])||void 0===t?void 0:t.values())&&void 0!==o?o:[],...[...null!==(i=null===(e=this[yr])||void 0===e?void 0:e.keys())&&void 0!==i?i:[]].map((t=>this.getI18nAttributeValue(t)))].map((t=>null==t?void 0:t.context))).forEach((t=>t&&this.addI18nMessages(t)))}addI18nMessages(t,o){t=t.toLowerCase(),this[mr].has(t)||this[mr].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=o?o:{})}addI18nContext(t,o){this.addI18nMessages("string"==typeof t?t:t.name,o)}disconnectedCallback(){super.disconnectedCallback(),this[mr].forEach((t=>t())),this[mr].clear()}}return o=mr,gr([i.property({type:Boolean})],e.prototype,"useCustomMessageContexts",void 0),e}class vr extends(xr(o.FtLitElement)){}class Or extends(xr(o.FtLitElementRedux)){}var wr,Sr,Nr,$r,Cr,Er,Ir,kr,Rr,Ur,Lr,Wr,zr,Ar,Zr,Kr,Dr,Br,Fr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Tr extends Or{constructor(){super(),this.editorMode=!1,this.addStore(er)}render(){return this.key&&this.context?e.html`
1528
+ `}update(t){super.update(t),t.has("baseUrl")&&(er.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&er.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&er.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&er.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&er.actions.noCustom(this.noCustom),t.has("editorMode")&&er.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&er.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&er.actions.session(this.session),t.has("availableUiLocales")&&er.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>sr.addContext(t))),t.has("openExternalDocumentInNewTab")&&er.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&er.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&er.actions.forcedOffline(this.forcedOffline),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}pr.elementDefinitions={},pr.styles=or,fr([i.property()],pr.prototype,"baseUrl",void 0),fr([i.property()],pr.prototype,"apiIntegrationIdentifier",void 0),fr([i.property()],pr.prototype,"uiLocale",void 0),fr([o.jsonProperty(null)],pr.prototype,"availableUiLocales",void 0),fr([o.jsonProperty(null)],pr.prototype,"metadataConfiguration",void 0),fr([i.property({type:Boolean})],pr.prototype,"editorMode",void 0),fr([i.property({type:Boolean})],pr.prototype,"noCustom",void 0),fr([i.property({type:Boolean})],pr.prototype,"openExternalDocumentInNewTab",void 0),fr([i.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],pr.prototype,"noCustomComponent",void 0),fr([i.property({type:Boolean})],pr.prototype,"withManualResources",void 0),fr([i.property({type:Boolean})],pr.prototype,"navigatorOnline",void 0),fr([i.property({type:Boolean})],pr.prototype,"forcedOffline",void 0),fr([i.property({type:Object})],pr.prototype,"apiProvider",void 0),fr([o.jsonProperty([])],pr.prototype,"messageContexts",void 0),fr([o.jsonProperty(void 0)],pr.prototype,"session",void 0);class dr extends rr{async listMySearches(){let t=er.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-searches",(async()=>(await this.awaitApi).listMySearches(t.profile.userId)),3e5):[]}}class hr extends rr{async listMyBookmarks(){let t=er.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-bookmarks",(async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId)),3e5):[]}}const ur=o.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=er.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new hr,this.savedSearchesService=new dr,er.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=er.getState();o.deepEqual(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ur.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ur.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();const t=await this.savedSearchesService.listMySearches();ur.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const o=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;ur.actions.bookmarks(o)}}};window.FluidTopicsAppInfoStoreService=new class{addCommand(t,o=!1){er.commands.add(t,o)}consumeCommand(t){return er.commands.consume(t)}};window.FluidTopicsHighlightHtmlService=new class{highlightHtml(t,e){o.highlightHtml(t,e)}},o.customElement("ft-app-context")(pr);var gr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};const yr=Symbol("i18nAttributes"),br=Symbol("i18nProperties"),mr=Symbol("i18nUnsubs");function xr(t){var o;class e extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?cr:sr}i18n(t,o,...e){var i;if("string"==typeof t)return this.i18nService.resolveMessage(t,o,...e);const r=null!==(i=t.args)&&void 0!==i?i:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var o,e;null===(o=this[yr])||void 0===o||o.forEach(((o,e)=>{var i;const r=this.getI18nAttributeValue(e);(null===(i=null==r?void 0:r.context)||void 0===i?void 0:i.toLowerCase())===t.toLowerCase()&&this.updateI18nAttributeMessage(e,r,o)})),null===(e=this[br])||void 0===e||e.forEach(((o,e)=>{o.context.toLowerCase()===t.toLowerCase()&&(this[e]=this.i18n(o))})),setTimeout((()=>this.requestUpdate()),0)}updateI18nAttributeMessage(t,o,e){this[t]={...o,message:this.i18n({context:o.context,key:o.key,...e})}}update(t){var o,e;super.update(t),null===(o=this[yr])||void 0===o||o.forEach(((o,e)=>{const i=this.getI18nAttributeValue(e);(null==i?void 0:i.context)&&i.key&&(t.has(e)||null!=o.argsProvider)&&(t.has(e)&&this.addI18nContext(i.context),this.updateI18nAttributeMessage(e,i,o))})),null===(e=this[br])||void 0===e||e.forEach(((t,o)=>{null!=t.argsProvider&&(this[o]=this.i18n(t))}))}getI18nAttributeValue(t){return this[t]}connectedCallback(){var t,o,e,i;super.connectedCallback(),new Set([...null!==(o=null===(t=this[br])||void 0===t?void 0:t.values())&&void 0!==o?o:[],...[...null!==(i=null===(e=this[yr])||void 0===e?void 0:e.keys())&&void 0!==i?i:[]].map((t=>this.getI18nAttributeValue(t)))].map((t=>null==t?void 0:t.context))).forEach((t=>t&&this.addI18nMessages(t)))}addI18nMessages(t,o){t=t.toLowerCase(),this[mr].has(t)||this[mr].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=o?o:{})}addI18nContext(t,o){this.addI18nMessages("string"==typeof t?t:t.name,o)}disconnectedCallback(){super.disconnectedCallback(),this[mr].forEach((t=>t())),this[mr].clear()}}return o=mr,gr([i.property({type:Boolean})],e.prototype,"useCustomMessageContexts",void 0),e}class vr extends(xr(o.FtLitElement)){}class Or extends(xr(o.FtLitElementRedux)){}var wr,Sr,Nr,$r,Cr,Er,Ir,kr,Rr,Ur,Lr,Wr,zr,Ar,Zr,Kr,Dr,Br,Fr,Tr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Hr extends Or{constructor(){super(),this.editorMode=!1,this.addStore(er)}render(){return this.key&&this.context?e.html`
1529
1529
  <span class="ft-i18n">
1530
1530
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
1531
1531
  </span>
1532
- `:this.editorMode?"Select a context and a label key.":e.nothing}update(t){var o;super.update(t),["context","key","defaultMessage"].some((o=>t.has(o)))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(o=this.defaultMessage)&&void 0!==o?o:""})}}Tr.elementDefinitions={},Tr.styles=tr,Fr([o.redux()],Tr.prototype,"editorMode",void 0),Fr([i.property()],Tr.prototype,"context",void 0),Fr([i.property()],Tr.prototype,"key",void 0),Fr([o.jsonProperty([])],Tr.prototype,"args",void 0),Fr([i.property()],Tr.prototype,"defaultMessage",void 0);class Hr{static build(t){return new Hr(t)}static fromGwt(t){return new Hr(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,o)=>{const e=o;return t=>({context:this.name,key:e,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,o)=>(...t)=>sr.resolveMessage(this.name,o,...t)})}}o.customElement("ft-i18n")(Tr),function(t){!function(o){var e={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(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=ArrayBuffer.isView||function(t){return t&&i.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function l(t){var o={next:function(){var o=t.shift();return{done:void 0===o,value:o}}};return e.iterable&&(o[Symbol.iterator]=function(){return o}),o}function s(t){this.map={},t instanceof s?t.forEach((function(t,o){this.append(o,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(o){this.append(o,t[o])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(o,e){t.onload=function(){o(t.result)},t.onerror=function(){e(t.error)}}))}function p(t){var o=new FileReader,e=f(o);return o.readAsArrayBuffer(t),e}function d(t){if(t.slice)return t.slice(0);var o=new Uint8Array(t.byteLength);return o.set(new Uint8Array(t)),o.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(t){var o;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:e.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:e.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():e.arrayBuffer&&e.blob&&((o=t)&&DataView.prototype.isPrototypeOf(o))?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):e.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||r(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=c(this);if(t)return t;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?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var t,o,e,i=c(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,o=new FileReader,e=f(o),o.readAsText(t),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var o=new Uint8Array(t),e=new Array(o.length),i=0;i<o.length;i++)e[i]=String.fromCharCode(o[i]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}s.prototype.append=function(t,o){t=n(t),o=a(o);var e=this.map[t];this.map[t]=e?e+", "+o:o},s.prototype.delete=function(t){delete this.map[n(t)]},s.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},s.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},s.prototype.set=function(t,o){this.map[n(t)]=a(o)},s.prototype.forEach=function(t,o){for(var e in this.map)this.map.hasOwnProperty(e)&&t.call(o,this.map[e],e,this)},s.prototype.keys=function(){var t=[];return this.forEach((function(o,e){t.push(e)})),l(t)},s.prototype.values=function(){var t=[];return this.forEach((function(o){t.push(o)})),l(t)},s.prototype.entries=function(){var t=[];return this.forEach((function(o,e){t.push([e,o])})),l(t)},e.iterable&&(s.prototype[Symbol.iterator]=s.prototype.entries);var u=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(t,o){var e,i,r=(o=o||{}).body;if(t instanceof g){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,o.headers||(this.headers=new s(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=o.credentials||this.credentials||"same-origin",!o.headers&&this.headers||(this.headers=new s(o.headers)),this.method=(e=o.method||this.method||"GET",i=e.toUpperCase(),u.indexOf(i)>-1?i:e),this.mode=o.mode||this.mode||null,this.signal=o.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function y(t){var o=new FormData;return t.trim().split("&").forEach((function(t){if(t){var e=t.split("="),i=e.shift().replace(/\+/g," "),r=e.join("=").replace(/\+/g," ");o.append(decodeURIComponent(i),decodeURIComponent(r))}})),o}function b(t,o){o||(o={}),this.type="default",this.status=void 0===o.status?200:o.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in o?o.statusText:"OK",this.headers=new s(o.headers),this.url=o.url||"",this._initBody(t)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},h.call(g.prototype),h.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];b.redirect=function(t,o){if(-1===m.indexOf(o))throw new RangeError("Invalid status code");return new b(null,{status:o,headers:{location:t}})},o.DOMException=t.DOMException;try{new o.DOMException}catch(t){o.DOMException=function(t,o){this.message=t,this.name=o;var e=Error(t);this.stack=e.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function x(t,i){return new Promise((function(r,n){var a=new g(t,i);if(a.signal&&a.signal.aborted)return n(new o.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function c(){l.abort()}l.onload=function(){var t,o,e={status:l.status,statusText:l.statusText,headers:(t=l.getAllResponseHeaders()||"",o=new s,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var e=t.split(":"),i=e.shift().trim();if(i){var r=e.join(":").trim();o.append(i,r)}})),o)};e.url="responseURL"in l?l.responseURL:e.headers.get("X-Request-URL");var i="response"in l?l.response:l.responseText;r(new b(i,e))},l.onerror=function(){n(new TypeError("Network request failed"))},l.ontimeout=function(){n(new TypeError("Network request failed"))},l.onabort=function(){n(new o.DOMException("Aborted","AbortError"))},l.open(a.method,a.url,!0),"include"===a.credentials?l.withCredentials=!0:"omit"===a.credentials&&(l.withCredentials=!1),"responseType"in l&&e.blob&&(l.responseType="blob"),a.headers.forEach((function(t,o){l.setRequestHeader(o,t)})),a.signal&&(a.signal.addEventListener("abort",c),l.onreadystatechange=function(){4===l.readyState&&a.signal.removeEventListener("abort",c)}),l.send(void 0===a._bodyInit?null:a._bodyInit)}))}x.polyfill=!0,t.fetch||(t.fetch=x,t.Headers=s,t.Request=g,t.Response=b),o.Headers=s,o.Request=g,o.Response=b,o.fetch=x,Object.defineProperty(o,"t",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(wr||(wr={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(Sr||(Sr={})),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"}(Nr||(Nr={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}($r||($r={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(Cr||(Cr={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(Er||(Er={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(Ir||(Ir={})),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"}(kr||(kr={})),function(t){t.ASC="ASC",t.DESC="DESC"}(Rr||(Rr={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(Ur||(Ur={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(Lr||(Lr={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Wr||(Wr={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(zr||(zr={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Ar||(Ar={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(Zr||(Zr={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(Kr||(Kr={})),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"}(Dr||(Dr={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(Br||(Br={})),Dr.PERSONAL_BOOK_SHARE_USER,Dr.PERSONAL_BOOK_USER,Dr.HTML_EXPORT_USER,Dr.PERSONAL_BOOK_USER,Dr.PDF_EXPORT_USER,Dr.PERSONAL_BOOK_USER,Dr.KHUB_ADMIN,Dr.CONTENT_PUBLISHER,Dr.ADMIN,Dr.KHUB_ADMIN,Dr.USERS_ADMIN,Dr.PORTAL_ADMIN,Dr.DEVELOPER,Dr.BETA_USER,Dr.DEBUG_USER;class Pr extends Event{constructor(){super(Pr.eventName)}}Pr.eventName="search-context-clear-all-filters";var Mr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class _r extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const jr=Symbol("registerInterval");class Gr extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[jr]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[jr]):this.dispatchEvent(new _r)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=jr,Mr([i.state()],e.prototype,"stateManager",void 0),e}(o.FtLitElementRedux)){}const Vr=Hr.build("designedSearchPeriodFilter"),Yr={label:"Last update",anyTime:"Any time",LAST_WEEK:"Less than a week",LAST_MONTH:"Less than a month",LAST_QUARTER:"Less than a quarter",LAST_YEAR:"Less than a year",CUSTOM:"Custom period",customPeriod:"From {0} to {1}",period:"Period: {0}"};var qr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Xr extends(xr(Gr)){constructor(){super(),this.addI18nContext(Vr,Yr)}render(){var t,o,i,r;return e.html`<div part="container">
1532
+ `:this.editorMode?"Select a context and a label key.":e.nothing}update(t){var o;super.update(t),["context","key","defaultMessage"].some((o=>t.has(o)))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(o=this.defaultMessage)&&void 0!==o?o:""})}}Hr.elementDefinitions={},Hr.styles=tr,Tr([o.redux()],Hr.prototype,"editorMode",void 0),Tr([i.property()],Hr.prototype,"context",void 0),Tr([i.property()],Hr.prototype,"key",void 0),Tr([o.jsonProperty([])],Hr.prototype,"args",void 0),Tr([i.property()],Hr.prototype,"defaultMessage",void 0);class Pr{static build(t){return new Pr(t)}static fromGwt(t){return new Pr(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,o)=>{const e=o;return t=>({context:this.name,key:e,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,o)=>(...t)=>sr.resolveMessage(this.name,o,...t)})}}o.customElement("ft-i18n")(Hr),function(t){!function(o){var e={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(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=ArrayBuffer.isView||function(t){return t&&i.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function l(t){var o={next:function(){var o=t.shift();return{done:void 0===o,value:o}}};return e.iterable&&(o[Symbol.iterator]=function(){return o}),o}function s(t){this.map={},t instanceof s?t.forEach((function(t,o){this.append(o,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(o){this.append(o,t[o])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(o,e){t.onload=function(){o(t.result)},t.onerror=function(){e(t.error)}}))}function p(t){var o=new FileReader,e=f(o);return o.readAsArrayBuffer(t),e}function d(t){if(t.slice)return t.slice(0);var o=new Uint8Array(t.byteLength);return o.set(new Uint8Array(t)),o.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(t){var o;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:e.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:e.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():e.arrayBuffer&&e.blob&&((o=t)&&DataView.prototype.isPrototypeOf(o))?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):e.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||r(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=c(this);if(t)return t;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?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var t,o,e,i=c(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,o=new FileReader,e=f(o),o.readAsText(t),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var o=new Uint8Array(t),e=new Array(o.length),i=0;i<o.length;i++)e[i]=String.fromCharCode(o[i]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}s.prototype.append=function(t,o){t=n(t),o=a(o);var e=this.map[t];this.map[t]=e?e+", "+o:o},s.prototype.delete=function(t){delete this.map[n(t)]},s.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},s.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},s.prototype.set=function(t,o){this.map[n(t)]=a(o)},s.prototype.forEach=function(t,o){for(var e in this.map)this.map.hasOwnProperty(e)&&t.call(o,this.map[e],e,this)},s.prototype.keys=function(){var t=[];return this.forEach((function(o,e){t.push(e)})),l(t)},s.prototype.values=function(){var t=[];return this.forEach((function(o){t.push(o)})),l(t)},s.prototype.entries=function(){var t=[];return this.forEach((function(o,e){t.push([e,o])})),l(t)},e.iterable&&(s.prototype[Symbol.iterator]=s.prototype.entries);var u=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(t,o){var e,i,r=(o=o||{}).body;if(t instanceof g){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,o.headers||(this.headers=new s(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=o.credentials||this.credentials||"same-origin",!o.headers&&this.headers||(this.headers=new s(o.headers)),this.method=(e=o.method||this.method||"GET",i=e.toUpperCase(),u.indexOf(i)>-1?i:e),this.mode=o.mode||this.mode||null,this.signal=o.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function y(t){var o=new FormData;return t.trim().split("&").forEach((function(t){if(t){var e=t.split("="),i=e.shift().replace(/\+/g," "),r=e.join("=").replace(/\+/g," ");o.append(decodeURIComponent(i),decodeURIComponent(r))}})),o}function b(t,o){o||(o={}),this.type="default",this.status=void 0===o.status?200:o.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in o?o.statusText:"OK",this.headers=new s(o.headers),this.url=o.url||"",this._initBody(t)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},h.call(g.prototype),h.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];b.redirect=function(t,o){if(-1===m.indexOf(o))throw new RangeError("Invalid status code");return new b(null,{status:o,headers:{location:t}})},o.DOMException=t.DOMException;try{new o.DOMException}catch(t){o.DOMException=function(t,o){this.message=t,this.name=o;var e=Error(t);this.stack=e.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function x(t,i){return new Promise((function(r,n){var a=new g(t,i);if(a.signal&&a.signal.aborted)return n(new o.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function c(){l.abort()}l.onload=function(){var t,o,e={status:l.status,statusText:l.statusText,headers:(t=l.getAllResponseHeaders()||"",o=new s,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var e=t.split(":"),i=e.shift().trim();if(i){var r=e.join(":").trim();o.append(i,r)}})),o)};e.url="responseURL"in l?l.responseURL:e.headers.get("X-Request-URL");var i="response"in l?l.response:l.responseText;r(new b(i,e))},l.onerror=function(){n(new TypeError("Network request failed"))},l.ontimeout=function(){n(new TypeError("Network request failed"))},l.onabort=function(){n(new o.DOMException("Aborted","AbortError"))},l.open(a.method,a.url,!0),"include"===a.credentials?l.withCredentials=!0:"omit"===a.credentials&&(l.withCredentials=!1),"responseType"in l&&e.blob&&(l.responseType="blob"),a.headers.forEach((function(t,o){l.setRequestHeader(o,t)})),a.signal&&(a.signal.addEventListener("abort",c),l.onreadystatechange=function(){4===l.readyState&&a.signal.removeEventListener("abort",c)}),l.send(void 0===a._bodyInit?null:a._bodyInit)}))}x.polyfill=!0,t.fetch||(t.fetch=x,t.Headers=s,t.Request=g,t.Response=b),o.Headers=s,o.Request=g,o.Response=b,o.fetch=x,Object.defineProperty(o,"t",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(wr||(wr={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(Sr||(Sr={})),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"}(Nr||(Nr={})),function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"}($r||($r={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(Cr||(Cr={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(Er||(Er={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(Ir||(Ir={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(kr||(kr={})),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"}(Rr||(Rr={})),function(t){t.ASC="ASC",t.DESC="DESC"}(Ur||(Ur={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(Lr||(Lr={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(Wr||(Wr={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(zr||(zr={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(Ar||(Ar={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Zr||(Zr={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(Kr||(Kr={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(Dr||(Dr={})),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"}(Br||(Br={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(Fr||(Fr={})),Br.PERSONAL_BOOK_SHARE_USER,Br.PERSONAL_BOOK_USER,Br.HTML_EXPORT_USER,Br.PERSONAL_BOOK_USER,Br.PDF_EXPORT_USER,Br.PERSONAL_BOOK_USER,Br.KHUB_ADMIN,Br.CONTENT_PUBLISHER,Br.ADMIN,Br.KHUB_ADMIN,Br.USERS_ADMIN,Br.PORTAL_ADMIN,Br.DEVELOPER,Br.BETA_USER,Br.DEBUG_USER;class Mr extends Event{constructor(){super(Mr.eventName)}}Mr.eventName="search-context-clear-all-filters";var _r=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class jr extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const Gr=Symbol("registerInterval");class Vr extends(function(t){var o;class e extends t{constructor(){super(...arguments),this[o]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Gr]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Gr]):this.dispatchEvent(new jr)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return o=Gr,_r([i.state()],e.prototype,"stateManager",void 0),e}(o.FtLitElementRedux)){}const Yr=Pr.build("designedSearchPeriodFilter"),qr={label:"Last update",anyTime:"Any time",LAST_WEEK:"Less than a week",LAST_MONTH:"Less than a month",LAST_QUARTER:"Less than a quarter",LAST_YEAR:"Less than a year",CUSTOM:"Custom period",customPeriod:"From {0} to {1}",period:"Period: {0}"};var Xr=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Qr extends(xr(Vr)){constructor(){super(),this.addI18nContext(Yr,qr)}render(){var t,o,i,r;return e.html`<div part="container">
1533
1533
  <div part="header">
1534
1534
  <ft-typography variant="overline" part="label" id="label">
1535
- ${Vr.messages.label()}
1535
+ ${Yr.messages.label()}
1536
1536
  </ft-typography>
1537
1537
  </div>
1538
1538
  <ft-radio-group @change=${t=>this.setPeriodFilter(t)} aria-labelledby="label">
1539
- <ft-radio value="anyTime" ?checked=${void 0===this.periodFilter||void 0===this.periodFilter.periodType}>${Vr.messages.anyTime()}</ft-radio>
1540
- ${this.lessThanAWeek?e.html`<ft-radio ?checked=${"LAST_WEEK"==(null===(t=this.periodFilter)||void 0===t?void 0:t.periodType)} value="LAST_WEEK">${Vr.messages.LAST_WEEK()}</ft-radio>`:e.nothing}
1541
- ${this.lessThanAMonth?e.html`<ft-radio ?checked=${"LAST_MONTH"==(null===(o=this.periodFilter)||void 0===o?void 0:o.periodType)} value="LAST_MONTH">${Vr.messages.LAST_MONTH()}</ft-radio>`:e.nothing}
1542
- ${this.lessThanAQuarter?e.html`<ft-radio ?checked=${"LAST_QUARTER"==(null===(i=this.periodFilter)||void 0===i?void 0:i.periodType)} value="LAST_QUARTER">${Vr.messages.LAST_QUARTER()}</ft-radio>`:e.nothing}
1543
- ${this.lessThanAYear?e.html`<ft-radio ?checked=${"LAST_YEAR"==(null===(r=this.periodFilter)||void 0===r?void 0:r.periodType)} value="LAST_YEAR">${Vr.messages.LAST_YEAR()}</ft-radio>`:e.nothing}
1539
+ <ft-radio value="anyTime" ?checked=${void 0===this.periodFilter||void 0===this.periodFilter.periodType}>${Yr.messages.anyTime()}</ft-radio>
1540
+ ${this.lessThanAWeek?e.html`<ft-radio ?checked=${"LAST_WEEK"==(null===(t=this.periodFilter)||void 0===t?void 0:t.periodType)} value="LAST_WEEK">${Yr.messages.LAST_WEEK()}</ft-radio>`:e.nothing}
1541
+ ${this.lessThanAMonth?e.html`<ft-radio ?checked=${"LAST_MONTH"==(null===(o=this.periodFilter)||void 0===o?void 0:o.periodType)} value="LAST_MONTH">${Yr.messages.LAST_MONTH()}</ft-radio>`:e.nothing}
1542
+ ${this.lessThanAQuarter?e.html`<ft-radio ?checked=${"LAST_QUARTER"==(null===(i=this.periodFilter)||void 0===i?void 0:i.periodType)} value="LAST_QUARTER">${Yr.messages.LAST_QUARTER()}</ft-radio>`:e.nothing}
1543
+ ${this.lessThanAYear?e.html`<ft-radio ?checked=${"LAST_YEAR"==(null===(r=this.periodFilter)||void 0===r?void 0:r.periodType)} value="LAST_YEAR">${Yr.messages.LAST_YEAR()}</ft-radio>`:e.nothing}
1544
1544
  </ft-radio-group>
1545
- </div>`}setPeriodFilter(t){var o;const e=kr[t.detail];null===(o=this.stateManager)||void 0===o||o.setPeriodFilter(void 0===e?void 0:{periodType:e})}}Xr.elementDefinitions={"ft-radio-group":Ei,"ft-radio":Ni,"ft-typography":uo},Xr.styles=Ji,qr([i.property({type:Boolean})],Xr.prototype,"lessThanAWeek",void 0),qr([i.property({type:Boolean})],Xr.prototype,"lessThanAMonth",void 0),qr([i.property({type:Boolean})],Xr.prototype,"lessThanAQuarter",void 0),qr([i.property({type:Boolean})],Xr.prototype,"lessThanAYear",void 0),qr([o.redux({store:"search",selector:t=>t.request.periodFilter})],Xr.prototype,"periodFilter",void 0),o.customElement("ft-search-period-filter")(Xr),t.FtSearchPeriodFilter=Xr,t.FtSearchPeriodFilterCssVariables=Qi,t.periodFilterContext=Vr,t.periodFilterDefaultMessages=Yr,t.styles=Ji}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
1545
+ </div>`}setPeriodFilter(t){var o;const e=Rr[t.detail];null===(o=this.stateManager)||void 0===o||o.setPeriodFilter(void 0===e?void 0:{periodType:e})}}Qr.elementDefinitions={"ft-radio-group":Ei,"ft-radio":Ni,"ft-typography":uo},Qr.styles=Ji,Xr([i.property({type:Boolean})],Qr.prototype,"lessThanAWeek",void 0),Xr([i.property({type:Boolean})],Qr.prototype,"lessThanAMonth",void 0),Xr([i.property({type:Boolean})],Qr.prototype,"lessThanAQuarter",void 0),Xr([i.property({type:Boolean})],Qr.prototype,"lessThanAYear",void 0),Xr([o.redux({store:"search",selector:t=>t.request.periodFilter})],Qr.prototype,"periodFilter",void 0),o.customElement("ft-search-period-filter")(Qr),t.FtSearchPeriodFilter=Qr,t.FtSearchPeriodFilterCssVariables=Qi,t.periodFilterContext=Yr,t.periodFilterDefaultMessages=qr,t.styles=Ji}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
@@ -1693,21 +1693,21 @@ function Re(t){return(e,o)=>{const{slot:r,selector:i}=t??{},n="slot"+(r?`[name=$
1693
1693
  `,xf=dt`
1694
1694
  `,Of=rs.get({name:"ft-app-info",reducers:{},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}});class wf{static get(t){const{baseUrl:e,apiIntegrationIdentifier:o}=Of.getState(),r=null!=t?t:o;if(e&&r&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,r,!0)}static await(t){return new Promise((e=>{let o=wf.get(t);if(o)e(o);else{const r=Of.subscribe((()=>{o=wf.get(t),o&&(r(),e(o))}))}}))}}class Sf{constructor(t=!0,e){var o;this.overrideApi=e;let r=this.constructor;r.commonCache=null!==(o=r.commonCache)&&void 0!==o?o:new io,this.cache=t?r.commonCache:new io}get api(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:wf.get()}get awaitApi(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:wf.await()}clearCache(){this.cache.clearAll()}}var Cf;const Nf=Symbol("clearAfterUnitTest");class Ef extends Sf{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Cf]=()=>{this.defaultMessages={},this.cache=new io,this.listeners={}},this.currentUiLocale=Of.getState().uiLocale,Of.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Of.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var o;if(t=t.toLowerCase(),Object.keys(e).length>0){const r={...null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},...e};yo(this.defaultMessages[t],r)||(this.defaultMessages[t]=r,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...o){var r,i,n;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(i=null===(r=this.cache.getNow(t))||void 0===r?void 0:r.messages)&&void 0!==i?i:{};return new rn(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},a).resolve(e,...o)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var o;return t=t.toLowerCase(),this.listeners[t]=null!==(o=this.listeners[t])&&void 0!==o?o:new Set,this.listeners[t].add(e),()=>{var o;return null===(o=this.listeners[t])||void 0===o?void 0:o.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>fo(0).then((()=>t())).catch((()=>null)))))}}Cf=Nf,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new class extends Ef{constructor(){super((async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e)))}}),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new class extends Ef{constructor(){super((async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e)))}});const $f=window.FluidTopicsI18nService,kf=window.FluidTopicsCustomI18nService;var Rf=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class If extends Mi{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=()=>wf.get(),this.messageContexts=[],this.cache=new io,this.cleanSessionDebouncer=new lo}render(){return Jt`
1695
1695
  <slot></slot>
1696
- `}update(t){super.update(t),t.has("baseUrl")&&(Of.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&Of.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Of.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&Of.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&Of.actions.noCustom(this.noCustom),t.has("editorMode")&&Of.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&Of.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&Of.actions.session(this.session),t.has("availableUiLocales")&&Of.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>$f.addContext(t))),t.has("openExternalDocumentInNewTab")&&Of.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&Of.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&Of.actions.forcedOffline(this.forcedOffline),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}If.elementDefinitions={},If.styles=xf,Rf([we()],If.prototype,"baseUrl",void 0),Rf([we()],If.prototype,"apiIntegrationIdentifier",void 0),Rf([we()],If.prototype,"uiLocale",void 0),Rf([mo(null)],If.prototype,"availableUiLocales",void 0),Rf([mo(null)],If.prototype,"metadataConfiguration",void 0),Rf([we({type:Boolean})],If.prototype,"editorMode",void 0),Rf([we({type:Boolean})],If.prototype,"noCustom",void 0),Rf([we({type:Boolean})],If.prototype,"openExternalDocumentInNewTab",void 0),Rf([we({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],If.prototype,"noCustomComponent",void 0),Rf([we({type:Boolean})],If.prototype,"withManualResources",void 0),Rf([we({type:Boolean})],If.prototype,"navigatorOnline",void 0),Rf([we({type:Boolean})],If.prototype,"forcedOffline",void 0),Rf([we({type:Object})],If.prototype,"apiProvider",void 0),Rf([mo([])],If.prototype,"messageContexts",void 0),Rf([mo(void 0)],If.prototype,"session",void 0);class Lf extends Sf{async listMySearches(){let t=Of.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-searches",(async()=>(await this.awaitApi).listMySearches(t.profile.userId)),3e5):[]}}class Uf extends Sf{async listMyBookmarks(){let t=Of.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-bookmarks",(async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId)),3e5):[]}}const Af=rs.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=Of.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Uf,this.savedSearchesService=new Lf,Of.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=Of.getState();yo(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Af.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Af.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();const t=await this.savedSearchesService.listMySearches();Af.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;Af.actions.bookmarks(e)}}};window.FluidTopicsAppInfoStoreService=new class{addCommand(t,e=!1){Of.commands.add(t,e)}consumeCommand(t){return Of.commands.consume(t)}};window.FluidTopicsHighlightHtmlService=new class{highlightHtml(t,e){Yi(t,e)}},bo("ft-app-context")(If);var Wf=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const Bf=Symbol("i18nAttributes"),zf=Symbol("i18nProperties"),Ff=Symbol("i18nUnsubs");function _f(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?kf:$f}i18n(t,e,...o){var r;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...o);const i=null!==(r=t.args)&&void 0!==r?r:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...i)}onI18nUpdate(t){var e,o;null===(e=this[Bf])||void 0===e||e.forEach(((e,o)=>{var r;const i=this.getI18nAttributeValue(o);(null===(r=null==i?void 0:i.context)||void 0===r?void 0:r.toLowerCase())===t.toLowerCase()&&this.updateI18nAttributeMessage(o,i,e)})),null===(o=this[zf])||void 0===o||o.forEach(((e,o)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[o]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updateI18nAttributeMessage(t,e,o){this[t]={...e,message:this.i18n({context:e.context,key:e.key,...o})}}update(t){var e,o;super.update(t),null===(e=this[Bf])||void 0===e||e.forEach(((e,o)=>{const r=this.getI18nAttributeValue(o);(null==r?void 0:r.context)&&r.key&&(t.has(o)||null!=e.argsProvider)&&(t.has(o)&&this.addI18nContext(r.context),this.updateI18nAttributeMessage(o,r,e))})),null===(o=this[zf])||void 0===o||o.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}getI18nAttributeValue(t){return this[t]}connectedCallback(){var t,e,o,r;super.connectedCallback(),new Set([...null!==(e=null===(t=this[zf])||void 0===t?void 0:t.values())&&void 0!==e?e:[],...[...null!==(r=null===(o=this[Bf])||void 0===o?void 0:o.keys())&&void 0!==r?r:[]].map((t=>this.getI18nAttributeValue(t)))].map((t=>null==t?void 0:t.context))).forEach((t=>t&&this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Ff].has(t)||this[Ff].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages("string"==typeof t?t:t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[Ff].forEach((t=>t())),this[Ff].clear()}}return e=Ff,Wf([we({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class Pf extends(_f(Mi)){}class jf extends(_f(yn)){}var Df,Mf,Tf,Hf,Kf,Zf,Gf,Vf,qf,Yf,Jf,Xf,Qf,th,eh,oh,rh,ih,nh=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ah extends jf{constructor(){super(),this.editorMode=!1,this.addStore(Of)}render(){return this.key&&this.context?Jt`
1696
+ `}update(t){super.update(t),t.has("baseUrl")&&(Of.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&Of.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Of.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&Of.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&Of.actions.noCustom(this.noCustom),t.has("editorMode")&&Of.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&Of.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&Of.actions.session(this.session),t.has("availableUiLocales")&&Of.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>$f.addContext(t))),t.has("openExternalDocumentInNewTab")&&Of.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&Of.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&Of.actions.forcedOffline(this.forcedOffline),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}If.elementDefinitions={},If.styles=xf,Rf([we()],If.prototype,"baseUrl",void 0),Rf([we()],If.prototype,"apiIntegrationIdentifier",void 0),Rf([we()],If.prototype,"uiLocale",void 0),Rf([mo(null)],If.prototype,"availableUiLocales",void 0),Rf([mo(null)],If.prototype,"metadataConfiguration",void 0),Rf([we({type:Boolean})],If.prototype,"editorMode",void 0),Rf([we({type:Boolean})],If.prototype,"noCustom",void 0),Rf([we({type:Boolean})],If.prototype,"openExternalDocumentInNewTab",void 0),Rf([we({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],If.prototype,"noCustomComponent",void 0),Rf([we({type:Boolean})],If.prototype,"withManualResources",void 0),Rf([we({type:Boolean})],If.prototype,"navigatorOnline",void 0),Rf([we({type:Boolean})],If.prototype,"forcedOffline",void 0),Rf([we({type:Object})],If.prototype,"apiProvider",void 0),Rf([mo([])],If.prototype,"messageContexts",void 0),Rf([mo(void 0)],If.prototype,"session",void 0);class Lf extends Sf{async listMySearches(){let t=Of.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-searches",(async()=>(await this.awaitApi).listMySearches(t.profile.userId)),3e5):[]}}class Uf extends Sf{async listMyBookmarks(){let t=Of.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-bookmarks",(async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId)),3e5):[]}}const Af=rs.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=Of.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Uf,this.savedSearchesService=new Lf,Of.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=Of.getState();yo(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Af.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Af.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();const t=await this.savedSearchesService.listMySearches();Af.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;Af.actions.bookmarks(e)}}};window.FluidTopicsAppInfoStoreService=new class{addCommand(t,e=!1){Of.commands.add(t,e)}consumeCommand(t){return Of.commands.consume(t)}};window.FluidTopicsHighlightHtmlService=new class{highlightHtml(t,e){Yi(t,e)}},bo("ft-app-context")(If);var Wf=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const Bf=Symbol("i18nAttributes"),zf=Symbol("i18nProperties"),Ff=Symbol("i18nUnsubs");function _f(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?kf:$f}i18n(t,e,...o){var r;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...o);const i=null!==(r=t.args)&&void 0!==r?r:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...i)}onI18nUpdate(t){var e,o;null===(e=this[Bf])||void 0===e||e.forEach(((e,o)=>{var r;const i=this.getI18nAttributeValue(o);(null===(r=null==i?void 0:i.context)||void 0===r?void 0:r.toLowerCase())===t.toLowerCase()&&this.updateI18nAttributeMessage(o,i,e)})),null===(o=this[zf])||void 0===o||o.forEach(((e,o)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[o]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updateI18nAttributeMessage(t,e,o){this[t]={...e,message:this.i18n({context:e.context,key:e.key,...o})}}update(t){var e,o;super.update(t),null===(e=this[Bf])||void 0===e||e.forEach(((e,o)=>{const r=this.getI18nAttributeValue(o);(null==r?void 0:r.context)&&r.key&&(t.has(o)||null!=e.argsProvider)&&(t.has(o)&&this.addI18nContext(r.context),this.updateI18nAttributeMessage(o,r,e))})),null===(o=this[zf])||void 0===o||o.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}getI18nAttributeValue(t){return this[t]}connectedCallback(){var t,e,o,r;super.connectedCallback(),new Set([...null!==(e=null===(t=this[zf])||void 0===t?void 0:t.values())&&void 0!==e?e:[],...[...null!==(r=null===(o=this[Bf])||void 0===o?void 0:o.keys())&&void 0!==r?r:[]].map((t=>this.getI18nAttributeValue(t)))].map((t=>null==t?void 0:t.context))).forEach((t=>t&&this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Ff].has(t)||this[Ff].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages("string"==typeof t?t:t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[Ff].forEach((t=>t())),this[Ff].clear()}}return e=Ff,Wf([we({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class Pf extends(_f(Mi)){}class jf extends(_f(yn)){}var Df,Mf,Tf,Hf,Kf,Zf,Gf,Vf,qf,Yf,Jf,Xf,Qf,th,eh,oh,rh,ih,nh,ah=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class sh extends jf{constructor(){super(),this.editorMode=!1,this.addStore(Of)}render(){return this.key&&this.context?Jt`
1697
1697
  <span class="ft-i18n">
1698
1698
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
1699
1699
  </span>
1700
- `:this.editorMode?"Select a context and a label key.":te}update(t){var e;super.update(t),["context","key","defaultMessage"].some((e=>t.has(e)))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}ah.elementDefinitions={},ah.styles=vf,nh([an()],ah.prototype,"editorMode",void 0),nh([we()],ah.prototype,"context",void 0),nh([we()],ah.prototype,"key",void 0),nh([mo([])],ah.prototype,"args",void 0),nh([we()],ah.prototype,"defaultMessage",void 0);class sh{static build(t){return new sh(t)}static fromGwt(t){return new sh(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const o=e;return t=>({context:this.name,key:o,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>$f.resolveMessage(this.name,e,...t)})}}bo("ft-i18n")(ah),function(t){!function(e){var o={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(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(o.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o.iterable&&(e[Symbol.iterator]=function(){return e}),e}function l(t){this.map={},t instanceof l?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(e,o){t.onload=function(){e(t.result)},t.onerror=function(){o(t.error)}}))}function h(t){var e=new FileReader,o=f(e);return e.readAsArrayBuffer(t),o}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():o.arrayBuffer&&o.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||i(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var t=c(this);if(t)return t;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?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,o=f(e);return e.readAsText(t),o}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),o=new Array(e.length),r=0;r<e.length;r++)o[r]=String.fromCharCode(e[r]);return o.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(t,e){t=n(t),e=a(e);var o=this.map[t];this.map[t]=o?o+", "+e:e},l.prototype.delete=function(t){delete this.map[n(t)]},l.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},l.prototype.set=function(t,e){this.map[n(t)]=a(e)},l.prototype.forEach=function(t,e){for(var o in this.map)this.map.hasOwnProperty(o)&&t.call(e,this.map[o],o,this)},l.prototype.keys=function(){var t=[];return this.forEach((function(e,o){t.push(o)})),s(t)},l.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),s(t)},l.prototype.entries=function(){var t=[];return this.forEach((function(e,o){t.push([o,e])})),s(t)},o.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var u=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(t,e){var o,r,i=(e=e||{}).body;if(t instanceof y){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=(o=e.method||this.method||"GET",r=o.toUpperCase(),u.indexOf(r)>-1?r:o),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function g(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var o=t.split("="),r=o.shift().replace(/\+/g," "),i=o.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},p.call(y.prototype),p.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];b.redirect=function(t,e){if(-1===m.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var o=Error(t);this.stack=o.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function v(t,r){return new Promise((function(i,n){var a=new y(t,r);if(a.signal&&a.signal.aborted)return n(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,e,o={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new l,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var o=t.split(":"),r=o.shift().trim();if(r){var i=o.join(":").trim();e.append(r,i)}})),e)};o.url="responseURL"in s?s.responseURL:o.headers.get("X-Request-URL");var r="response"in s?s.response:s.responseText;i(new b(r,o))},s.onerror=function(){n(new TypeError("Network request failed"))},s.ontimeout=function(){n(new TypeError("Network request failed"))},s.onabort=function(){n(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&o.blob&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}v.polyfill=!0,t.fetch||(t.fetch=v,t.Headers=l,t.Request=y,t.Response=b),e.Headers=l,e.Request=y,e.Response=b,e.fetch=v,Object.defineProperty(e,"W",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(Df||(Df={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(Mf||(Mf={})),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"}(Tf||(Tf={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(Hf||(Hf={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(Kf||(Kf={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(Zf||(Zf={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(Gf||(Gf={})),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"}(Vf||(Vf={})),function(t){t.ASC="ASC",t.DESC="DESC"}(qf||(qf={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(Yf||(Yf={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(Jf||(Jf={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Xf||(Xf={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(Qf||(Qf={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(th||(th={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(eh||(eh={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(oh||(oh={})),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"}(rh||(rh={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(ih||(ih={})),rh.PERSONAL_BOOK_SHARE_USER,rh.PERSONAL_BOOK_USER,rh.HTML_EXPORT_USER,rh.PERSONAL_BOOK_USER,rh.PDF_EXPORT_USER,rh.PERSONAL_BOOK_USER,rh.KHUB_ADMIN,rh.CONTENT_PUBLISHER,rh.ADMIN,rh.KHUB_ADMIN,rh.USERS_ADMIN,rh.PORTAL_ADMIN,rh.DEVELOPER,rh.BETA_USER,rh.DEBUG_USER;class lh extends Event{constructor(){super(lh.eventName)}}lh.eventName="search-context-clear-all-filters";var ch=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class fh extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const hh=Symbol("registerInterval");class dh extends(function(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[hh]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[hh]):this.dispatchEvent(new fh)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=hh,ch([Se()],o.prototype,"stateManager",void 0),o}(yn)){}const ph=sh.build("designedSearchPeriodFilter"),uh={label:"Last update",anyTime:"Any time",LAST_WEEK:"Less than a week",LAST_MONTH:"Less than a month",LAST_QUARTER:"Less than a quarter",LAST_YEAR:"Less than a year",CUSTOM:"Custom period",customPeriod:"From {0} to {1}",period:"Period: {0}"};var yh=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class gh extends(_f(dh)){constructor(){super(),this.addI18nContext(ph,uh)}render(){var t,e,o,r;return Jt`<div part="container">
1700
+ `:this.editorMode?"Select a context and a label key.":te}update(t){var e;super.update(t),["context","key","defaultMessage"].some((e=>t.has(e)))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}sh.elementDefinitions={},sh.styles=vf,ah([an()],sh.prototype,"editorMode",void 0),ah([we()],sh.prototype,"context",void 0),ah([we()],sh.prototype,"key",void 0),ah([mo([])],sh.prototype,"args",void 0),ah([we()],sh.prototype,"defaultMessage",void 0);class lh{static build(t){return new lh(t)}static fromGwt(t){return new lh(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const o=e;return t=>({context:this.name,key:o,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>$f.resolveMessage(this.name,e,...t)})}}bo("ft-i18n")(sh),function(t){!function(e){var o={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(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(o.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o.iterable&&(e[Symbol.iterator]=function(){return e}),e}function l(t){this.map={},t instanceof l?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(e,o){t.onload=function(){e(t.result)},t.onerror=function(){o(t.error)}}))}function h(t){var e=new FileReader,o=f(e);return e.readAsArrayBuffer(t),o}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():o.arrayBuffer&&o.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||i(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var t=c(this);if(t)return t;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?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,o=f(e);return e.readAsText(t),o}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),o=new Array(e.length),r=0;r<e.length;r++)o[r]=String.fromCharCode(e[r]);return o.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(t,e){t=n(t),e=a(e);var o=this.map[t];this.map[t]=o?o+", "+e:e},l.prototype.delete=function(t){delete this.map[n(t)]},l.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},l.prototype.set=function(t,e){this.map[n(t)]=a(e)},l.prototype.forEach=function(t,e){for(var o in this.map)this.map.hasOwnProperty(o)&&t.call(e,this.map[o],o,this)},l.prototype.keys=function(){var t=[];return this.forEach((function(e,o){t.push(o)})),s(t)},l.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),s(t)},l.prototype.entries=function(){var t=[];return this.forEach((function(e,o){t.push([o,e])})),s(t)},o.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var u=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(t,e){var o,r,i=(e=e||{}).body;if(t instanceof y){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=(o=e.method||this.method||"GET",r=o.toUpperCase(),u.indexOf(r)>-1?r:o),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function g(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var o=t.split("="),r=o.shift().replace(/\+/g," "),i=o.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},p.call(y.prototype),p.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];b.redirect=function(t,e){if(-1===m.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var o=Error(t);this.stack=o.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function v(t,r){return new Promise((function(i,n){var a=new y(t,r);if(a.signal&&a.signal.aborted)return n(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,e,o={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new l,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var o=t.split(":"),r=o.shift().trim();if(r){var i=o.join(":").trim();e.append(r,i)}})),e)};o.url="responseURL"in s?s.responseURL:o.headers.get("X-Request-URL");var r="response"in s?s.response:s.responseText;i(new b(r,o))},s.onerror=function(){n(new TypeError("Network request failed"))},s.ontimeout=function(){n(new TypeError("Network request failed"))},s.onabort=function(){n(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&o.blob&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}v.polyfill=!0,t.fetch||(t.fetch=v,t.Headers=l,t.Request=y,t.Response=b),e.Headers=l,e.Request=y,e.Response=b,e.fetch=v,Object.defineProperty(e,"W",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(Df||(Df={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(Mf||(Mf={})),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"}(Tf||(Tf={})),function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"}(Hf||(Hf={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(Kf||(Kf={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(Zf||(Zf={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(Gf||(Gf={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(Vf||(Vf={})),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"}(qf||(qf={})),function(t){t.ASC="ASC",t.DESC="DESC"}(Yf||(Yf={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(Jf||(Jf={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(Xf||(Xf={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Qf||(Qf={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(th||(th={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(eh||(eh={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(oh||(oh={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(rh||(rh={})),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"}(ih||(ih={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(nh||(nh={})),ih.PERSONAL_BOOK_SHARE_USER,ih.PERSONAL_BOOK_USER,ih.HTML_EXPORT_USER,ih.PERSONAL_BOOK_USER,ih.PDF_EXPORT_USER,ih.PERSONAL_BOOK_USER,ih.KHUB_ADMIN,ih.CONTENT_PUBLISHER,ih.ADMIN,ih.KHUB_ADMIN,ih.USERS_ADMIN,ih.PORTAL_ADMIN,ih.DEVELOPER,ih.BETA_USER,ih.DEBUG_USER;class ch extends Event{constructor(){super(ch.eventName)}}ch.eventName="search-context-clear-all-filters";var fh=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class hh extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const dh=Symbol("registerInterval");class ph extends(function(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[dh]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[dh]):this.dispatchEvent(new hh)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=dh,fh([Se()],o.prototype,"stateManager",void 0),o}(yn)){}const uh=lh.build("designedSearchPeriodFilter"),yh={label:"Last update",anyTime:"Any time",LAST_WEEK:"Less than a week",LAST_MONTH:"Less than a month",LAST_QUARTER:"Less than a quarter",LAST_YEAR:"Less than a year",CUSTOM:"Custom period",customPeriod:"From {0} to {1}",period:"Period: {0}"};var gh=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class bh extends(_f(ph)){constructor(){super(),this.addI18nContext(uh,yh)}render(){var t,e,o,r;return Jt`<div part="container">
1701
1701
  <div part="header">
1702
1702
  <ft-typography variant="overline" part="label" id="label">
1703
- ${ph.messages.label()}
1703
+ ${uh.messages.label()}
1704
1704
  </ft-typography>
1705
1705
  </div>
1706
1706
  <ft-radio-group @change=${t=>this.setPeriodFilter(t)} aria-labelledby="label">
1707
- <ft-radio value="anyTime" ?checked=${void 0===this.periodFilter||void 0===this.periodFilter.periodType}>${ph.messages.anyTime()}</ft-radio>
1708
- ${this.lessThanAWeek?Jt`<ft-radio ?checked=${"LAST_WEEK"==(null===(t=this.periodFilter)||void 0===t?void 0:t.periodType)} value="LAST_WEEK">${ph.messages.LAST_WEEK()}</ft-radio>`:te}
1709
- ${this.lessThanAMonth?Jt`<ft-radio ?checked=${"LAST_MONTH"==(null===(e=this.periodFilter)||void 0===e?void 0:e.periodType)} value="LAST_MONTH">${ph.messages.LAST_MONTH()}</ft-radio>`:te}
1710
- ${this.lessThanAQuarter?Jt`<ft-radio ?checked=${"LAST_QUARTER"==(null===(o=this.periodFilter)||void 0===o?void 0:o.periodType)} value="LAST_QUARTER">${ph.messages.LAST_QUARTER()}</ft-radio>`:te}
1711
- ${this.lessThanAYear?Jt`<ft-radio ?checked=${"LAST_YEAR"==(null===(r=this.periodFilter)||void 0===r?void 0:r.periodType)} value="LAST_YEAR">${ph.messages.LAST_YEAR()}</ft-radio>`:te}
1707
+ <ft-radio value="anyTime" ?checked=${void 0===this.periodFilter||void 0===this.periodFilter.periodType}>${uh.messages.anyTime()}</ft-radio>
1708
+ ${this.lessThanAWeek?Jt`<ft-radio ?checked=${"LAST_WEEK"==(null===(t=this.periodFilter)||void 0===t?void 0:t.periodType)} value="LAST_WEEK">${uh.messages.LAST_WEEK()}</ft-radio>`:te}
1709
+ ${this.lessThanAMonth?Jt`<ft-radio ?checked=${"LAST_MONTH"==(null===(e=this.periodFilter)||void 0===e?void 0:e.periodType)} value="LAST_MONTH">${uh.messages.LAST_MONTH()}</ft-radio>`:te}
1710
+ ${this.lessThanAQuarter?Jt`<ft-radio ?checked=${"LAST_QUARTER"==(null===(o=this.periodFilter)||void 0===o?void 0:o.periodType)} value="LAST_QUARTER">${uh.messages.LAST_QUARTER()}</ft-radio>`:te}
1711
+ ${this.lessThanAYear?Jt`<ft-radio ?checked=${"LAST_YEAR"==(null===(r=this.periodFilter)||void 0===r?void 0:r.periodType)} value="LAST_YEAR">${uh.messages.LAST_YEAR()}</ft-radio>`:te}
1712
1712
  </ft-radio-group>
1713
- </div>`}setPeriodFilter(t){var e;const o=Vf[t.detail];null===(e=this.stateManager)||void 0===e||e.setPeriodFilter(void 0===o?void 0:{periodType:o})}}gh.elementDefinitions={"ft-radio-group":Kc,"ft-radio":Mc,"ft-typography":Al},gh.styles=mf,yh([we({type:Boolean})],gh.prototype,"lessThanAWeek",void 0),yh([we({type:Boolean})],gh.prototype,"lessThanAMonth",void 0),yh([we({type:Boolean})],gh.prototype,"lessThanAQuarter",void 0),yh([we({type:Boolean})],gh.prototype,"lessThanAYear",void 0),yh([an({store:"search",selector:t=>t.request.periodFilter})],gh.prototype,"periodFilter",void 0),bo("ft-search-period-filter")(gh),t.FtSearchPeriodFilter=gh,t.FtSearchPeriodFilterCssVariables=bf,t.periodFilterContext=ph,t.periodFilterDefaultMessages=uh,t.styles=mf}({});
1713
+ </div>`}setPeriodFilter(t){var e;const o=qf[t.detail];null===(e=this.stateManager)||void 0===e||e.setPeriodFilter(void 0===o?void 0:{periodType:o})}}bh.elementDefinitions={"ft-radio-group":Kc,"ft-radio":Mc,"ft-typography":Al},bh.styles=mf,gh([we({type:Boolean})],bh.prototype,"lessThanAWeek",void 0),gh([we({type:Boolean})],bh.prototype,"lessThanAMonth",void 0),gh([we({type:Boolean})],bh.prototype,"lessThanAQuarter",void 0),gh([we({type:Boolean})],bh.prototype,"lessThanAYear",void 0),gh([an({store:"search",selector:t=>t.request.periodFilter})],bh.prototype,"periodFilter",void 0),bo("ft-search-period-filter")(bh),t.FtSearchPeriodFilter=bh,t.FtSearchPeriodFilterCssVariables=bf,t.periodFilterContext=uh,t.periodFilterDefaultMessages=yh,t.styles=mf}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-period-filter",
3
- "version": "1.1.69",
3
+ "version": "1.1.70",
4
4
  "description": "Search period filter for integrated fluid-topics search pages",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,16 +19,16 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-filter": "1.1.69",
23
- "@fluid-topics/ft-i18n": "1.1.69",
24
- "@fluid-topics/ft-icon": "1.1.69",
25
- "@fluid-topics/ft-search-context": "1.1.69",
26
- "@fluid-topics/ft-tooltip": "1.1.69",
27
- "@fluid-topics/ft-wc-utils": "1.1.69",
22
+ "@fluid-topics/ft-filter": "1.1.70",
23
+ "@fluid-topics/ft-i18n": "1.1.70",
24
+ "@fluid-topics/ft-icon": "1.1.70",
25
+ "@fluid-topics/ft-search-context": "1.1.70",
26
+ "@fluid-topics/ft-tooltip": "1.1.70",
27
+ "@fluid-topics/ft-wc-utils": "1.1.70",
28
28
  "lit": "3.1.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@fluid-topics/public-api": "1.0.67"
31
+ "@fluid-topics/public-api": "1.0.68"
32
32
  },
33
- "gitHead": "2174dcd6c0339b1a1722fa2eb263462ee4621c72"
33
+ "gitHead": "491d226f1e94018f6daf64b3831693326b1bd44e"
34
34
  }