@fluid-topics/ft-app-context 2.0.36 → 2.0.38
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.
|
@@ -22,6 +22,7 @@ export declare class FtAppContext extends FtLitElementRedux implements FtAppCont
|
|
|
22
22
|
messageContexts: FtMessageContext[];
|
|
23
23
|
session?: FtSession;
|
|
24
24
|
stateManager: import("./redux-stores/FtAppStateManager").FtAppStateManager;
|
|
25
|
+
private contextRoot;
|
|
25
26
|
render(): import("lit-html").TemplateResult<1>;
|
|
26
27
|
connectedCallback(): void;
|
|
27
28
|
disconnectedCallback(): void;
|
package/build/ft-app-context.js
CHANGED
|
@@ -10,6 +10,7 @@ import { FtLitElementRedux, jsonProperty, } from "@fluid-topics/ft-wc-utils";
|
|
|
10
10
|
import { styles } from "./ft-app-context.styles";
|
|
11
11
|
import { ftI18nService } from "./services";
|
|
12
12
|
import { ftAppStateManager } from "./redux-stores/FtAppStateManager";
|
|
13
|
+
import { ContextRoot } from "@lit/context";
|
|
13
14
|
export class FtAppContext extends FtLitElementRedux {
|
|
14
15
|
constructor() {
|
|
15
16
|
super(...arguments);
|
|
@@ -26,6 +27,7 @@ export class FtAppContext extends FtLitElementRedux {
|
|
|
26
27
|
this.authenticationRequired = false;
|
|
27
28
|
this.messageContexts = [];
|
|
28
29
|
this.stateManager = ftAppStateManager;
|
|
30
|
+
this.contextRoot = new ContextRoot();
|
|
29
31
|
}
|
|
30
32
|
render() {
|
|
31
33
|
return html `
|
|
@@ -35,9 +37,11 @@ export class FtAppContext extends FtLitElementRedux {
|
|
|
35
37
|
connectedCallback() {
|
|
36
38
|
super.connectedCallback();
|
|
37
39
|
this.stateManager.initService();
|
|
40
|
+
this.contextRoot.attach(document.body);
|
|
38
41
|
}
|
|
39
42
|
disconnectedCallback() {
|
|
40
43
|
super.disconnectedCallback();
|
|
44
|
+
this.contextRoot.detach(document.body);
|
|
41
45
|
}
|
|
42
46
|
update(props) {
|
|
43
47
|
var _a;
|
|
@@ -1,4 +1,32 @@
|
|
|
1
|
-
"use strict";(()=>{var
|
|
2
|
-
`;var x=p(y()),Qe="ft-app-info",C=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};C.eventName="authentication-change";var R=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};R.eventName="ui-locale-changed";var Xe={session:(e,t)=>{(0,x.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>l.dispatchEvent(new C(t.payload)),0))}},l=x.FtReduxStore.get({name:Qe,reducers:Xe,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var N=p(y());var E=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:s}=l.getState(),n=t??s;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let s=e.get(t);if(s)r(s);else{let n=l.subscribe(()=>{s=e.get(t),s&&(n(),r(s))})}})}};var I=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:E.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):E.await()}};var g=class extends I{constructor(t=!0,r){var s;super(r),this.sortObjectFields=(i,a)=>typeof a!="object"||a==null||Array.isArray(a)?a:Object.fromEntries(Object.entries(a).sort(([u],[O])=>u.localeCompare(O)));let n=this.constructor;n.commonCache=(s=n.commonCache)!==null&&s!==void 0?s:new N.CacheRegistry,this.cache=t?n.commonCache:new N.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,s)=>0|31*r+s.charCodeAt(0),0))}};var P=class{addCommand(t,r=!1){l.commands.add(t,r)}consumeCommand(t){return l.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new P;var A=p(y());var z,_=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Je=Symbol("clearAfterUnitTest"),L=class extends(0,A.withEventBus)(g){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[z]=()=>{this.defaultMessages={},this.cache=new A.CacheRegistry,this.listeners={}},this.currentUiLocale=l.getState().uiLocale,l.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=l.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var s;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(s=this.defaultMessages[t])!==null&&s!==void 0?s:{},...r};(0,A.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,s;return this.fetchContext(t),(s=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&s!==void 0?s:{}}resolveRawMessage(t,r){let s=t.toLowerCase();return this.resolveContext(s)[r]}resolveMessage(t,r,...s){var n;let i=t.toLowerCase(),a=this.resolveContext(i);return new A.ParametrizedLabelResolver((n=this.defaultMessages[i])!==null&&n!==void 0?n:{},a).resolve(r,...s)}async fetchContext(t){let r=!this.cache.has(t),s;try{s=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof A.CanceledPromiseError)&&r&&console.error(n)}return s}subscribe(t,r){var s;return t=t.toLowerCase(),this.listeners[t]=(s=this.listeners[t])!==null&&s!==void 0?s:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new _({loadedContexts:t})),this.dispatchEvent(new _({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new _({loadedContexts:[t]})),this.dispatchEvent(new _({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(s=>(0,A.delay)(0).then(()=>s()).catch(()=>null)))}};z=Je;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends L{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends L{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Q=window.FluidTopicsI18nService,gt=window.FluidTopicsCustomI18nService;var X=p(y()),w=class{highlightHtml(t,r,s){(0,X.highlightHtml)(t,r,s)}};window.FluidTopicsHighlightHtmlService=new w;var J;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(J||(J={}));var Z;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Z||(Z={}));var ee;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(ee||(ee={}));var te;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(te||(te={}));var re;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(re||(re={}));var se;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(se||(se={}));var ne;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(ne||(ne={}));var ie;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(ie||(ie={}));var ae;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(ae||(ae={}));var le;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(le||(le={}));var oe;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(oe||(oe={}));var ue;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(ue||(ue={}));var ce;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(ce||(ce={}));var de;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(de||(de={}));var pe;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(pe||(pe={}));var he;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(he||(he={}));var Ae;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Ae||(Ae={}));var ye;(function(e){e.ASC="ASC",e.DESC="DESC"})(ye||(ye={}));var me;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(me||(me={}));var Ee;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Ee||(Ee={}));var ge;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ge||(ge={}));var fe;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(fe||(fe={}));var Se;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Se||(Se={}));var Te;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Te||(Te={}));var Ce;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Ce||(Ce={}));var Ie;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Ie||(Ie={}));var _e;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(_e||(_e={}));var c;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(c||(c={}));var Re;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Re||(Re={}));var ve;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(ve||(ve={}));var Oe;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Oe||(Oe={}));var xe;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(xe||(xe={}));var Le;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Le||(Le={}));var be;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(be||(be={}));var Ue;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ue||(Ue={}));var De;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(De||(De={}));var Me;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Me||(Me={}));var Ne;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Ne||(Ne={}));var Pe;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Pe||(Pe={}));var bt={[c.PERSONAL_BOOK_SHARE_USER]:[c.PERSONAL_BOOK_USER],[c.HTML_EXPORT_USER]:[c.PERSONAL_BOOK_USER],[c.PDF_EXPORT_USER]:[c.PERSONAL_BOOK_USER],[c.KHUB_ADMIN]:[c.CONTENT_PUBLISHER],[c.ADMIN]:[c.KHUB_ADMIN,c.USERS_ADMIN,c.PORTAL_ADMIN,c.BEHAVIOR_DATA_USER],[c.GENERATIVE_AI_EXPORT_USER]:[c.GENERATIVE_AI_USER]};var we=p(y());var F=class{isDate(t){var r,s,n,i;return(i=(n=((s=(r=l.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(u=>u.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var s,n,i,a;if(t==null)return"";try{return we.DateFormatter.format(t,(s=r?.locale)!==null&&s!==void 0?s:l.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(a=r?.onlyTime)!==null&&a!==void 0?a:!1)}catch(u){throw console.error(`Date ${JSON.stringify(t)} is not valid`,u),u}}};window.FluidTopicsDateService=new F;var Fe=p(y());var v=class{static get(t,r){var s,n;let i=l.getState(),{lang:a,region:u}=(n=(s=i.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Fe.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${a}-${u}`)}};var k=class{urlToSearchRequest(t){return v.get().parse(t)}searchRequestToUrl(t){return v.get().serialize(t)}};window.FluidTopicsUrlService=new k;var m=p(y());var f=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};f.eventName="change";var H=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},ke=new H;var b=class e extends m.WithEventBus{static build(){return new e(window.history,ke,()=>window.location,!1)}constructor(t,r,s,n){var i,a;super(),this.history=t,this.historyStorage=r,this.windowLocation=s,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(a=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&a!==void 0?a:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let s=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,s&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,m.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new f(this.currentItem())),0)}installProxies(){let t=r=>(s,n,[i,a,u])=>{let O=r(),j={...O===this.currentIndex?this.currentState:void 0,...i,index:O,href:typeof u=="string"?u:(u??this.windowLocation()).href};s.apply(n,[j,a,u]),this.setCurrentState(j,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let s={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(s)}addHistoryChangeListener(t){this.addEventListener(f.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(f.eventName,t)}currentItem(){return(0,m.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,m.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(s=>!!s).filter(s=>s.index<this.currentIndex).reverse();return(0,m.deepCopy)(r.find(s=>t(s)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,m.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let s=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!s)return t;let n=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,s);)this.hasState(i)&&(n=i),i++;return n}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var s;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,i=(s=this.states[t])===null||s===void 0?void 0:s.majorStateId;return i==null||i!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=b.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var S=p(y());function He(e,t){let{authenticationRequired:r,session:s}=l.getState();return r&&!s?.sessionAuthenticated?Promise.resolve(t):e()}var U=class extends I{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var B=class e extends S.FtStateManager{static build(t){return new e(l,t)}constructor(t,r){super(),this.store=t,this.cache=new S.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new U,this.cleanSessionDebouncer=new S.Debouncer,this.reloadDebouncer=new S.Debouncer(500),this.apiProvider=r??(()=>E.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(C.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>He(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){var r,s,n,i,a;this.localesConfiguration=t,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((r=this.localesConfiguration.availableUiLocales)!==null&&r!==void 0?r:[]),this.store.actions.searchInAllLanguagesAllowed((s=this.localesConfiguration.allLanguagesAllowed)!==null&&s!==void 0?s:!1),this.store.actions.searchLanguageSetsUiLanguage((n=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&n!==void 0?n:!1),this.store.actions.uiLanguageSetsSearchLanguage((i=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&i!==void 0?i:!1),this.store.actions.uiLanguageSetsReaderLanguage((a=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&a!==void 0?a:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new R(r)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Be=B.build();var d=function(e,t,r,s){var n=arguments.length,i=n<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,s);else for(var u=e.length-1;u>=0;u--)(a=e[u])&&(i=(n<3?a(i):n>3?a(t,r,i):a(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},o=class extends T.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Be}render(){return je.html`
|
|
1
|
+
"use strict";(()=>{var $e=Object.create;var q=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var Ye=Object.getPrototypeOf,Qe=Object.prototype.hasOwnProperty;var N=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Xe=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ze(t))!Qe.call(e,n)&&n!==r&&q(e,n,{get:()=>t[n],enumerable:!(s=We(t,n))||s.enumerable});return e};var p=(e,t,r)=>(r=e!=null?$e(Ye(e)):{},Xe(t||!e||!e.__esModule?q(r,"default",{value:e,enumerable:!0}):r,e));var m=N((nt,G)=>{G.exports=ftGlobals.wcUtils});var P=N((it,$)=>{$.exports=ftGlobals.lit});var z=N((at,W)=>{W.exports=ftGlobals.litDecorators});var Ge=p(m());var Ve=p(P()),h=p(z()),C=p(m());var Y=p(P());var Q=Y.css`
|
|
2
|
+
`;var L=p(m()),Je="ft-app-info",v=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};v.eventName="authentication-change";var I=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};I.eventName="ui-locale-changed";var Ze={session:(e,t)=>{(0,L.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>l.dispatchEvent(new v(t.payload)),0))}},l=L.FtReduxStore.get({name:Je,reducers:Ze,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var w=p(m());var f=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:s}=l.getState(),n=t??s;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let s=e.get(t);if(s)r(s);else{let n=l.subscribe(()=>{s=e.get(t),s&&(n(),r(s))})}})}};var x=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:f.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):f.await()}};var E=class extends x{constructor(t=!0,r){var s;super(r),this.sortObjectFields=(i,a)=>typeof a!="object"||a==null||Array.isArray(a)?a:Object.fromEntries(Object.entries(a).sort(([o],[O])=>o.localeCompare(O)));let n=this.constructor;n.commonCache=(s=n.commonCache)!==null&&s!==void 0?s:new w.CacheRegistry,this.cache=t?n.commonCache:new w.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,s)=>0|31*r+s.charCodeAt(0),0))}};var k=class{addCommand(t,r=!1){l.commands.add(t,r)}consumeCommand(t){return l.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new k;var A=p(m());var X,R=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},et=Symbol("clearAfterUnitTest"),U=class extends(0,A.withEventBus)(E){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[X]=()=>{this.defaultMessages={},this.cache=new A.CacheRegistry,this.listeners={}},this.currentUiLocale=l.getState().uiLocale,l.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=l.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var s;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(s=this.defaultMessages[t])!==null&&s!==void 0?s:{},...r};(0,A.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,s;return this.fetchContext(t),(s=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&s!==void 0?s:{}}resolveRawMessage(t,r){let s=t.toLowerCase();return this.resolveContext(s)[r]}resolveMessage(t,r,...s){var n;let i=t.toLowerCase(),a=this.resolveContext(i);return new A.ParametrizedLabelResolver((n=this.defaultMessages[i])!==null&&n!==void 0?n:{},a).resolve(r,...s)}async fetchContext(t){let r=!this.cache.has(t),s;try{s=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof A.CanceledPromiseError)&&r&&console.error(n)}return s}subscribe(t,r){var s;return t=t.toLowerCase(),this.listeners[t]=(s=this.listeners[t])!==null&&s!==void 0?s:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new R({loadedContexts:t})),this.dispatchEvent(new R({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new R({loadedContexts:[t]})),this.dispatchEvent(new R({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(s=>(0,A.delay)(0).then(()=>s()).catch(()=>null)))}};X=et;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends U{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends U{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var J=window.FluidTopicsI18nService,Ct=window.FluidTopicsCustomI18nService;var Z=p(m()),F=class{highlightHtml(t,r,s){(0,Z.highlightHtml)(t,r,s)}};window.FluidTopicsHighlightHtmlService=new F;var ee;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(ee||(ee={}));var te;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(te||(te={}));var re;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(re||(re={}));var se;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(se||(se={}));var ne;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(ne||(ne={}));var ie;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(ie||(ie={}));var ae;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(ae||(ae={}));var le;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(le||(le={}));var oe;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(oe||(oe={}));var ce;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(ce||(ce={}));var ue;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(ue||(ue={}));var de;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(de||(de={}));var pe;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(pe||(pe={}));var he;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(he||(he={}));var Ae;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Ae||(Ae={}));var me;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(me||(me={}));var ye;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(ye||(ye={}));var fe;(function(e){e.ASC="ASC",e.DESC="DESC"})(fe||(fe={}));var Ee;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Ee||(Ee={}));var ge;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(ge||(ge={}));var Se;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Se||(Se={}));var Te;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Te||(Te={}));var Ce;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ce||(Ce={}));var ve;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(ve||(ve={}));var xe;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(xe||(xe={}));var Re;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Re||(Re={}));var Ie;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ie||(Ie={}));var u;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(u||(u={}));var _e;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(_e||(_e={}));var be;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(be||(be={}));var Oe;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Oe||(Oe={}));var Le;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(Le||(Le={}));var Ue;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Ue||(Ue={}));var De;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(De||(De={}));var Me;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Me||(Me={}));var Ne;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(Ne||(Ne={}));var Pe;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Pe||(Pe={}));var we;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(we||(we={}));var ke;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ke||(ke={}));var Nt={[u.PERSONAL_BOOK_SHARE_USER]:[u.PERSONAL_BOOK_USER],[u.HTML_EXPORT_USER]:[u.PERSONAL_BOOK_USER],[u.PDF_EXPORT_USER]:[u.PERSONAL_BOOK_USER],[u.KHUB_ADMIN]:[u.CONTENT_PUBLISHER],[u.ADMIN]:[u.KHUB_ADMIN,u.USERS_ADMIN,u.PORTAL_ADMIN,u.BEHAVIOR_DATA_USER],[u.GENERATIVE_AI_EXPORT_USER]:[u.GENERATIVE_AI_USER]};var Fe=p(m());var H=class{isDate(t){var r,s,n,i;return(i=(n=((s=(r=l.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(o=>o.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var s,n,i,a;if(t==null)return"";try{return Fe.DateFormatter.format(t,(s=r?.locale)!==null&&s!==void 0?s:l.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(a=r?.onlyTime)!==null&&a!==void 0?a:!1)}catch(o){throw console.error(`Date ${JSON.stringify(t)} is not valid`,o),o}}};window.FluidTopicsDateService=new H;var He=p(m());var _=class{static get(t,r){var s,n;let i=l.getState(),{lang:a,region:o}=(n=(s=i.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new He.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${a}-${o}`)}};var B=class{urlToSearchRequest(t){return _.get().parse(t)}searchRequestToUrl(t){return _.get().serialize(t)}};window.FluidTopicsUrlService=new B;var y=p(m());var g=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};g.eventName="change";var j=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Be=new j;var D=class e extends y.WithEventBus{static build(){return new e(window.history,Be,()=>window.location,!1)}constructor(t,r,s,n){var i,a;super(),this.history=t,this.historyStorage=r,this.windowLocation=s,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(a=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&a!==void 0?a:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let s=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,s&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,y.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new g(this.currentItem())),0)}installProxies(){let t=r=>(s,n,[i,a,o])=>{let O=r(),V={...O===this.currentIndex?this.currentState:void 0,...i,index:O,href:typeof o=="string"?o:(o??this.windowLocation()).href};s.apply(n,[V,a,o]),this.setCurrentState(V,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let s={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(s)}addHistoryChangeListener(t){this.addEventListener(g.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(g.eventName,t)}currentItem(){return(0,y.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,y.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(s=>!!s).filter(s=>s.index<this.currentIndex).reverse();return(0,y.deepCopy)(r.find(s=>t(s)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,y.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let s=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!s)return t;let n=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,s);)this.hasState(i)&&(n=i),i++;return n}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var s;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,i=(s=this.states[t])===null||s===void 0?void 0:s.majorStateId;return i==null||i!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=D.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var S=p(m());function je(e,t){let{authenticationRequired:r,session:s}=l.getState();return r&&!s?.sessionAuthenticated?Promise.resolve(t):e()}var M=class extends x{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var K=class e extends S.FtStateManager{static build(t){return new e(l,t)}constructor(t,r){super(),this.store=t,this.cache=new S.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new M,this.cleanSessionDebouncer=new S.Debouncer,this.reloadDebouncer=new S.Debouncer(500),this.apiProvider=r??(()=>f.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(v.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>je(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){var r,s,n,i,a;this.localesConfiguration=t,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((r=this.localesConfiguration.availableUiLocales)!==null&&r!==void 0?r:[]),this.store.actions.searchInAllLanguagesAllowed((s=this.localesConfiguration.allLanguagesAllowed)!==null&&s!==void 0?s:!1),this.store.actions.searchLanguageSetsUiLanguage((n=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&n!==void 0?n:!1),this.store.actions.uiLanguageSetsSearchLanguage((i=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&i!==void 0?i:!1),this.store.actions.uiLanguageSetsReaderLanguage((a=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&a!==void 0?a:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new I(r)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Ke=K.build();var T=class extends Event{constructor(t,r,s,n){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=s,this.subscribe=n??!1}};var b=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:s}=r;for(let{elementRef:n,callbackRef:i}of s){let a=n.deref(),o=i.deref();a===void 0||o===void 0||a.dispatchEvent(new T(t.context,a,o,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],s=t.callback,n=this.pendingContextRequests.get(t.context);n===void 0&&this.pendingContextRequests.set(t.context,n={callbacks:new WeakMap,requests:[]});let i=n.callbacks.get(r);i===void 0&&n.callbacks.set(r,i=new WeakSet),i.has(s)||(i.add(s),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(s)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var d=function(e,t,r,s){var n=arguments.length,i=n<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,r):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,s);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(n<3?a(i):n>3?a(t,r,i):a(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},c=class extends C.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Ke,this.contextRoot=new b}render(){return Ve.html`
|
|
3
3
|
<slot></slot>
|
|
4
|
-
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService()}disconnectedCallback(){super.disconnectedCallback()}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(s=>
|
|
4
|
+
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(s=>J.addContext(s)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};c.elementDefinitions={};c.styles=Q;d([(0,h.property)()],c.prototype,"baseUrl",void 0);d([(0,h.property)()],c.prototype,"apiIntegrationIdentifier",void 0);d([(0,h.property)()],c.prototype,"apiIntegrationAppVersion",void 0);d([(0,h.property)()],c.prototype,"uiLocale",void 0);d([(0,C.jsonProperty)(null)],c.prototype,"availableUiLocales",void 0);d([(0,C.jsonProperty)(null)],c.prototype,"metadataConfiguration",void 0);d([(0,h.property)({type:Boolean})],c.prototype,"editorMode",void 0);d([(0,h.property)({type:Boolean})],c.prototype,"noCustom",void 0);d([(0,h.property)({type:Boolean})],c.prototype,"openExternalDocumentInNewTab",void 0);d([(0,h.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],c.prototype,"noCustomComponent",void 0);d([(0,h.property)({type:Boolean})],c.prototype,"withManualResources",void 0);d([(0,h.property)({type:Boolean})],c.prototype,"navigatorOnline",void 0);d([(0,h.property)({type:Boolean})],c.prototype,"forcedOffline",void 0);d([(0,h.property)({type:Boolean})],c.prototype,"authenticationRequired",void 0);d([(0,C.jsonProperty)([])],c.prototype,"messageContexts",void 0);d([(0,C.jsonProperty)(void 0)],c.prototype,"session",void 0);var qe={"ft-app-context":c};(0,Ge.customElements)(qe);})();
|
|
5
|
+
/*! Bundled license information:
|
|
6
|
+
|
|
7
|
+
@lit/context/lib/context-request-event.js:
|
|
8
|
+
@lit/context/lib/create-context.js:
|
|
9
|
+
@lit/context/lib/controllers/context-consumer.js:
|
|
10
|
+
@lit/context/lib/value-notifier.js:
|
|
11
|
+
@lit/context/lib/controllers/context-provider.js:
|
|
12
|
+
@lit/context/lib/context-root.js:
|
|
13
|
+
(**
|
|
14
|
+
* @license
|
|
15
|
+
* Copyright 2021 Google LLC
|
|
16
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
+
*)
|
|
18
|
+
|
|
19
|
+
@lit/context/lib/decorators/provide.js:
|
|
20
|
+
(**
|
|
21
|
+
* @license
|
|
22
|
+
* Copyright 2017 Google LLC
|
|
23
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
24
|
+
*)
|
|
25
|
+
|
|
26
|
+
@lit/context/lib/decorators/consume.js:
|
|
27
|
+
(**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright 2022 Google LLC
|
|
30
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
+
*)
|
|
32
|
+
*/
|