@fluid-topics/ft-reader-topic-content 1.0.42 → 1.0.43
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.
|
@@ -8,6 +8,8 @@ export declare class FtReaderTopicContent extends FtReaderTopicComponent impleme
|
|
|
8
8
|
private scrollTarget?;
|
|
9
9
|
private content?;
|
|
10
10
|
private error?;
|
|
11
|
+
contentPreprocessor: (content: string) => string;
|
|
12
|
+
onContentAvailable: (container: HTMLElement, shadowRoot: ShadowRoot) => void;
|
|
11
13
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
12
14
|
protected updated(props: PropertyValues): void;
|
|
13
15
|
private updateContent;
|
|
@@ -4,15 +4,20 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html } from "lit";
|
|
7
|
+
import { html, nothing } from "lit";
|
|
8
8
|
import { styles } from "./ft-reader-topic-content.css";
|
|
9
9
|
import { FtReaderTopicComponent } from "@fluid-topics/ft-reader-topic-context/build/registration";
|
|
10
10
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
11
11
|
import { redux } from "@fluid-topics/ft-wc-utils";
|
|
12
|
-
import { state } from "lit/decorators.js";
|
|
12
|
+
import { property, state } from "lit/decorators.js";
|
|
13
13
|
import "@fluid-topics/ft-icon";
|
|
14
14
|
import { context } from "./i18n/TopicContentMessages";
|
|
15
15
|
class FtReaderTopicContent extends FtReaderTopicComponent {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.contentPreprocessor = content => content;
|
|
19
|
+
this.onContentAvailable = () => null;
|
|
20
|
+
}
|
|
16
21
|
render() {
|
|
17
22
|
var _a, _b;
|
|
18
23
|
if (!this.map || (!this.error && !this.content)) {
|
|
@@ -44,13 +49,17 @@ class FtReaderTopicContent extends FtReaderTopicComponent {
|
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
contentAvailableCallback(props) {
|
|
47
|
-
var _a, _b, _c, _d, _e, _f;
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
48
53
|
super.contentAvailableCallback(props);
|
|
49
54
|
if (!this.disableContextInteractions && ((_a = this.scrollTarget) === null || _a === void 0 ? void 0 : _a.section) && ((_b = this.tocNode) === null || _b === void 0 ? void 0 : _b.tocId) && ((_c = this.tocNode) === null || _c === void 0 ? void 0 : _c.tocId) === this.scrollTarget.tocId && this.content) {
|
|
50
55
|
const target = (_e = (_d = this.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`)) !== null && _e !== void 0 ? _e : this;
|
|
51
56
|
target.scrollIntoView({ block: "start" });
|
|
52
57
|
(_f = this.stateManager) === null || _f === void 0 ? void 0 : _f.scrollDone();
|
|
53
58
|
}
|
|
59
|
+
const container = (_g = this.shadowRoot) === null || _g === void 0 ? void 0 : _g.querySelector("section.topic");
|
|
60
|
+
if (container) {
|
|
61
|
+
this.onContentAvailable(container, this.shadowRoot);
|
|
62
|
+
}
|
|
54
63
|
}
|
|
55
64
|
onStoreAvailable() {
|
|
56
65
|
super.onStoreAvailable();
|
|
@@ -71,7 +80,7 @@ class FtReaderTopicContent extends FtReaderTopicComponent {
|
|
|
71
80
|
const customClasses = (_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a.contentStyles.customCssClasses.join(" ")) !== null && _b !== void 0 ? _b : "";
|
|
72
81
|
return html `
|
|
73
82
|
<div class="depth-${(_c = this.tocNode) === null || _c === void 0 ? void 0 : _c.depth} content-locale-${(_d = this.map) === null || _d === void 0 ? void 0 : _d.lang} ${customClasses}">
|
|
74
|
-
${unsafeHTML(`${this.content}`)}
|
|
83
|
+
${this.content != null ? unsafeHTML(`${this.contentPreprocessor(this.content)}`) : nothing}
|
|
75
84
|
</div>
|
|
76
85
|
`;
|
|
77
86
|
}
|
|
@@ -92,4 +101,10 @@ __decorate([
|
|
|
92
101
|
__decorate([
|
|
93
102
|
state()
|
|
94
103
|
], FtReaderTopicContent.prototype, "error", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
property({ attribute: false })
|
|
106
|
+
], FtReaderTopicContent.prototype, "contentPreprocessor", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
property({ attribute: false })
|
|
109
|
+
], FtReaderTopicContent.prototype, "onContentAvailable", void 0);
|
|
95
110
|
export { FtReaderTopicContent };
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
</i>
|
|
71
71
|
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let s=this.value||this.textContent;switch(this.variant){case j.file_format:this.resolvedIcon=null!==(t=f[s.replace("-","_").toUpperCase()])&&void 0!==t?t:s;break;case j.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=p[s.replace("-","_").toUpperCase()])&&void 0!==e?e:s}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}k.elementDefinitions={},k.styles=C,$([s.property()],k.prototype,"variant",void 0),$([s.property()],k.prototype,"value",void 0),$([s.state()],k.prototype,"resolvedIcon",void 0),$([s.query("slot")],k.prototype,"slottedContent",void 0),e.customElement("ft-icon")(k);const O=i.css`
|
|
72
72
|
`,U=i.css`
|
|
73
|
-
`,I=e.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class N{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=I.getState(),s=null!=t?t:i;if(e&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,s,!0)}static get(t){var e;return null!=t?N.build(t):null!==(e=N.API)&&void 0!==e?e:N.API=N.build()}static await(t){return new Promise((e=>{let i=N.get(t);if(i)e(i);else{const s=I.subscribe((()=>{i=N.get(t),i&&(s(),e(i))}))}}))}}var M;const S=Symbol("clearAfterUnitTest");class
|
|
73
|
+
`,I=e.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class N{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=I.getState(),s=null!=t?t:i;if(e&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,s,!0)}static get(t){var e;return null!=t?N.build(t):null!==(e=N.API)&&void 0!==e?e:N.API=N.build()}static await(t){return new Promise((e=>{let i=N.get(t);if(i)e(i);else{const s=I.subscribe((()=>{i=N.get(t),i&&(s(),e(i))}))}}))}}var M;const S=Symbol("clearAfterUnitTest");class A{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={},this.currentUiLocale="",this[M]=()=>{this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=I.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,i){var s;if(t=t.toLowerCase(),Object.keys(i).length>0){const o={...null!==(s=this.defaultMessages[t])&&void 0!==s?s:{},...i};e.deepEqual(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,i,...s){var o,n,a;t=t.toLowerCase(),this.fetchContext(t);const r=null!==(n=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==n?n:{};return new e.ParametrizedLabelResolver(null!==(a=this.defaultMessages[t])&&void 0!==a?a:{},r).resolve(i,...s)}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 i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.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=>e.delay(0).then((()=>t())).catch((()=>null)))))}}M=S,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new A((async(t,e)=>(await N.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new A((async(t,e)=>(await N.await()).getCustomMessageContext(t,e))));const T=window.FluidTopicsI18nService,z=window.FluidTopicsCustomI18nService;var L=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class P extends e.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>N.get(),this.cache=new e.CacheRegistry,this.cleanSessionDebouncer=new e.Debouncer}render(){return i.html`
|
|
74
74
|
<slot></slot>
|
|
75
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&I.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&I.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&I.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&I.actions.setNoCustom(this.noCustom),t.has("editorMode")&&I.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&I.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&I.actions.setSession(this.session),t.has("availableUiLocales")&&I.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>
|
|
75
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&I.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&I.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&I.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&I.actions.setNoCustom(this.noCustom),t.has("editorMode")&&I.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&I.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&I.actions.setSession(this.session),t.has("availableUiLocales")&&I.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>T.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}P.elementDefinitions={},P.styles=U,L([s.property()],P.prototype,"baseUrl",void 0),L([s.property()],P.prototype,"apiIntegrationIdentifier",void 0),L([s.property()],P.prototype,"uiLocale",void 0),L([e.jsonProperty([])],P.prototype,"availableUiLocales",void 0),L([s.property({type:Boolean})],P.prototype,"editorMode",void 0),L([s.property({type:Boolean})],P.prototype,"noCustom",void 0),L([s.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],P.prototype,"noCustomComponent",void 0),L([s.property({type:Boolean})],P.prototype,"withManualResources",void 0),L([e.jsonProperty([])],P.prototype,"messageContexts",void 0),L([e.jsonProperty(void 0)],P.prototype,"session",void 0),L([s.property({type:Object})],P.prototype,"apiProvider",void 0),e.customElement("ft-app-context")(P);var E=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const G=Symbol("i18nProperties"),R=Symbol("i18nUnsubs");function W(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?z:T}i18n(t,e,...i){var s;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const o=null!==(s=t.args)&&void 0!==s?s:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...o)}onI18nUpdate(t){var e;null===(e=this[G])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[G])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[G]&&new Set([...this[G].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[R].has(t)||this[R].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[R].forEach((t=>t())),this[R].clear()}}return e=R,E([s.property({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class B extends(W(e.FtLitElement)){}class K extends(W(e.FtLitElementRedux)){}var q=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class D extends K{constructor(){super(),this.editorMode=!1,this.addStore(I)}render(){return this.key&&this.context?i.html`
|
|
76
76
|
<span class="ft-i18n">
|
|
77
77
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
78
78
|
</span>
|
|
79
|
-
`:this.editorMode?"Select a context and a label key.":i.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}D.elementDefinitions={},D.styles=O,q([e.redux()],D.prototype,"editorMode",void 0),q([s.property()],D.prototype,"context",void 0),q([s.property()],D.prototype,"key",void 0),q([e.jsonProperty([])],D.prototype,"args",void 0),q([s.property()],D.prototype,"defaultMessage",void 0);class _{static build(t){return new _(t)}static fromGwt(t){return new _(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>
|
|
79
|
+
`:this.editorMode?"Select a context and a label key.":i.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}D.elementDefinitions={},D.styles=O,q([e.redux()],D.prototype,"editorMode",void 0),q([s.property()],D.prototype,"context",void 0),q([s.property()],D.prototype,"key",void 0),q([e.jsonProperty([])],D.prototype,"args",void 0),q([s.property()],D.prototype,"defaultMessage",void 0);class _{static build(t){return new _(t)}static fromGwt(t){return new _(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>T.resolveMessage(this.name,e,...t)})}}e.customElement("ft-i18n")(D);const F=_.build("designedReaderTopicContent");var Z=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class H extends v{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,e;return this.map&&(this.error||this.content)?i.html`
|
|
80
80
|
<style>
|
|
81
81
|
@import "${null===(t=this.map)||void 0===t?void 0:t.contentStyles.topicStylesheetUrl}";
|
|
82
82
|
</style>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
</section>
|
|
86
86
|
`:i.html`
|
|
87
87
|
<section class="topic-loading"></section>
|
|
88
|
-
`}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode.contentId).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,s,o,n,a;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)&&(null===(s=this.tocNode)||void 0===s?void 0:s.tocId)===this.scrollTarget.tocId&&this.content){(null!==(n=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==n?n:this).scrollIntoView({block:"start"}),null===(a=this.stateManager)||void 0===a||a.scrollDone()}}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,s,n;if(this.error)return i.html`
|
|
88
|
+
`}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode.contentId).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,s,o,n,a,r;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)&&(null===(s=this.tocNode)||void 0===s?void 0:s.tocId)===this.scrollTarget.tocId&&this.content){(null!==(n=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==n?n:this).scrollIntoView({block:"start"}),null===(a=this.stateManager)||void 0===a||a.scrollDone()}const l=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector("section.topic");l&&this.onContentAvailable(l,this.shadowRoot)}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,s,n;if(this.error)return i.html`
|
|
89
89
|
<div class="topic-on-error">
|
|
90
90
|
<ft-icon>WARNING</ft-icon>
|
|
91
91
|
<div>
|
|
@@ -94,6 +94,6 @@
|
|
|
94
94
|
</div>
|
|
95
95
|
`;const a=null!==(e=null===(t=this.map)||void 0===t?void 0:t.contentStyles.customCssClasses.join(" "))&&void 0!==e?e:"";return i.html`
|
|
96
96
|
<div class="depth-${null===(s=this.tocNode)||void 0===s?void 0:s.depth} content-locale-${null===(n=this.map)||void 0===n?void 0:n.lang} ${a}">
|
|
97
|
-
${o.unsafeHTML(`${this.content}`)}
|
|
97
|
+
${null!=this.content?o.unsafeHTML(`${this.contentPreprocessor(this.content)}`):i.nothing}
|
|
98
98
|
</div>
|
|
99
|
-
`}is404Error(){return 404===this.error.status}}H.styles=a,Z([e.redux()],H.prototype,"map",void 0),Z([e.redux()],H.prototype,"scrollTarget",void 0),Z([s.state()],H.prototype,"content",void 0),Z([s.state()],H.prototype,"error",void 0),e.customElement("ft-reader-topic-content")(H),t.FtReaderTopicContent=H,t.FtReaderTopicContentCssVariables=n,t.styles=a}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
|
|
99
|
+
`}is404Error(){return 404===this.error.status}}H.styles=a,Z([e.redux()],H.prototype,"map",void 0),Z([e.redux()],H.prototype,"scrollTarget",void 0),Z([s.state()],H.prototype,"content",void 0),Z([s.state()],H.prototype,"error",void 0),Z([s.property({attribute:!1})],H.prototype,"contentPreprocessor",void 0),Z([s.property({attribute:!1})],H.prototype,"onContentAvailable",void 0),e.customElement("ft-reader-topic-content")(H),t.FtReaderTopicContent=H,t.FtReaderTopicContentCssVariables=n,t.styles=a}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,n=window.customElements.get,i=window.customElements,r=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap;let c;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=r.prototype.attributeChangedCallback,c=new Set(r.observedAttributes||[]);h(r,c,a);const u={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:c};this._definitionsByTag.set(t,u),this._definitionsByClass.set(r,u);let l=n.call(i,t);l||(l=f(t),e.call(i,t,l)),this===window.customElements&&(s.set(r,u),u.standInClass=l);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)o.delete(t),v(t,u,!0)}const p=this._whenDefinedPromises.get(t);return void 0!==p&&(p.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){b.push(this),i.upgrade.apply(i,arguments),b.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let n=this._whenDefinedPromises.get(t);return void 0===n&&(n={},n.promise=new Promise((t=>n.resolve=t)),this._whenDefinedPromises.set(t,n)),n.promise}_upgradeWhenDefined(t,e,n){let i=this._awaitingUpgrade.get(e);i||this._awaitingUpgrade.set(e,i=new Set),n?i.add(t):i.delete(t)}},window.HTMLElement=function(){let e=c;if(e)return c=void 0,e;const n=s.get(this.constructor);if(!n)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],n.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,n),e},window.HTMLElement.prototype=t.prototype;const u=t=>t===document||t instanceof ShadowRoot,l=t=>{let e=t.getRootNode();if(!u(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),u(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},f=e=>class{static get formAssociated(){return!0}constructor(){const n=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(n,HTMLElement.prototype);const i=l(n)||window.customElements,r=i._getDefinition(e);return r?v(n,r):o.set(n,i),n}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},h=(t,e,n)=>{if(0===e.size||void 0===n)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);i.call(this,o,r),n.call(this,o,t,r)}else i.call(this,o,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);r.call(this,i),n.call(this,i,t,null)}else r.call(this,i)})},d=e=>{const n=Object.getPrototypeOf(e);if(n!==window.HTMLElement)return n===t||"HTMLElement"===n?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(n)},v=(t,e,n=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),c=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((n=>{t.hasAttribute(n)&&e.attributeChangedCallback.call(t,n,null,t.getAttribute(n))})),n&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=p.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const x=(t,e,n=void 0)=>{const i=(n?Object.getPrototypeOf(n):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=i.apply(n||this,arguments);return void 0!==t&&a.set(t,this),b.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const m=(t,e)=>{const n=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...n,set(t){b.push(this),n.set.call(this,t),b.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,n=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...n){const i=e.call(this,...n);return t.set(i,this),i},n.forEach((e=>{const n=window.ElementInternals.prototype,i=n[e];n[e]=function(...e){const n=t.get(this);if(!0!==r.get(n).formAssociated)throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`);i?.call(this,...e)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class o{constructor(t){const e=new Map;t.forEach(((t,n)=>{const i=t.getAttribute("name"),r=e.get(i)||[];this[+n]=t,r.push(t),e.set(i,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new i(t))}))}namedItem(t){return this[t]}}const s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const n of t){const t=r.get(n);t&&!0!==t.formAssociated||e.push(n)}return new o(e)}})}}try{window.customElements.define("custom-element",null)}catch(Fn){const t=window.customElements.define;window.customElements.define=(e,n,i)=>{if(null!==n)try{t.bind(window.customElements)(e,n,i)}catch(t){console.info(e,n,i,t)}}}class e extends Error{constructor(t,e,n){super(t),this.canceledPromiseResult=e,this.canceledPromiseError=n}}class n extends Promise{constructor(t){super(((n,i)=>t((t=>{this.isCanceled?i(new e("Promise has been canceled",t)):n(t)}),(t=>{this.isCanceled?i(new e("Promise has been canceled",void 0,t)):i(t)})))),this.isCanceled=!1}cancel(){this.isCanceled=!0}}class i{constructor(){this.loaders={},this.content={},this.clearTimeouts={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||this.forceClear(t)}forceClear(t){this.clearClearTimeout(t),this.content[t]instanceof n&&this.content[t].cancel(),delete this.content[t]}clearClearTimeout(t){null!=this.clearTimeouts[t]&&(window.clearTimeout(this.clearTimeouts[t]),delete this.clearTimeouts[t])}set(t,e){this.forceClear(t),this.register(t,(async()=>e)),this.content[t]=e}setFinal(t,e){this.forceClear(t),this.registerFinal(t,(async()=>e)),this.content[t]=e}async get(t,e,i){if(void 0===this.content[t]){if(null==(e=null!=e?e:this.loaders[t]))throw new Error("Unknown cache key "+t);const r=(t=>new n(((e,n)=>t.then(e).catch(n))))(e());return this.content[t]=r,r.then((e=>(this.content[t]=e,null!=i&&(this.clearClearTimeout(t),this.clearTimeouts[t]=window.setTimeout((()=>this.clear(t)),i)),e)))}if(this.content[t]instanceof Error)throw this.content[t];return this.content[t]}isResolvedValue(t){return!(null==t||t instanceof Promise||t instanceof Error)}getNow(t){if(this.isResolvedValue(this.content[t]))return this.content[t]}has(t){return null!=this.content[t]}resolvedKeys(){return Object.keys(this.content).filter((t=>this.isResolvedValue(this.content[t])))}resolvedValues(){return Object.values(this.content).filter((t=>this.isResolvedValue(t)))}keys(){return Object.keys(this.content)}values(){return Object.values(this.content)}}class r{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const n=[...this.callbacks];this.callbacks=[];const i=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of n)try{await t()}catch(t){return void i(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,n=window.customElements.get,i=window.customElements,r=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap;let c;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=r.prototype.attributeChangedCallback,c=new Set(r.observedAttributes||[]);h(r,c,a);const u={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:c};this._definitionsByTag.set(t,u),this._definitionsByClass.set(r,u);let l=n.call(i,t);l||(l=f(t),e.call(i,t,l)),this===window.customElements&&(s.set(r,u),u.standInClass=l);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)o.delete(t),v(t,u,!0)}const p=this._whenDefinedPromises.get(t);return void 0!==p&&(p.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){b.push(this),i.upgrade.apply(i,arguments),b.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let n=this._whenDefinedPromises.get(t);return void 0===n&&(n={},n.promise=new Promise((t=>n.resolve=t)),this._whenDefinedPromises.set(t,n)),n.promise}_upgradeWhenDefined(t,e,n){let i=this._awaitingUpgrade.get(e);i||this._awaitingUpgrade.set(e,i=new Set),n?i.add(t):i.delete(t)}},window.HTMLElement=function(){let e=c;if(e)return c=void 0,e;const n=s.get(this.constructor);if(!n)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],n.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,n),e},window.HTMLElement.prototype=t.prototype;const u=t=>t===document||t instanceof ShadowRoot,l=t=>{let e=t.getRootNode();if(!u(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),u(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},f=e=>class{static get formAssociated(){return!0}constructor(){const n=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(n,HTMLElement.prototype);const i=l(n)||window.customElements,r=i._getDefinition(e);return r?v(n,r):o.set(n,i),n}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},h=(t,e,n)=>{if(0===e.size||void 0===n)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);i.call(this,o,r),n.call(this,o,t,r)}else i.call(this,o,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);r.call(this,i),n.call(this,i,t,null)}else r.call(this,i)})},d=e=>{const n=Object.getPrototypeOf(e);if(n!==window.HTMLElement)return n===t||"HTMLElement"===n?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(n)},v=(t,e,n=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),c=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((n=>{t.hasAttribute(n)&&e.attributeChangedCallback.call(t,n,null,t.getAttribute(n))})),n&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=p.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const x=(t,e,n=void 0)=>{const i=(n?Object.getPrototypeOf(n):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=i.apply(n||this,arguments);return void 0!==t&&a.set(t,this),b.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const m=(t,e)=>{const n=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...n,set(t){b.push(this),n.set.call(this,t),b.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,n=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...n){const i=e.call(this,...n);return t.set(i,this),i},n.forEach((e=>{const n=window.ElementInternals.prototype,i=n[e];n[e]=function(...e){const n=t.get(this);if(!0!==r.get(n).formAssociated)throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`);i?.call(this,...e)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class o{constructor(t){const e=new Map;t.forEach(((t,n)=>{const i=t.getAttribute("name"),r=e.get(i)||[];this[+n]=t,r.push(t),e.set(i,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new i(t))}))}namedItem(t){return this[t]}}const s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const n of t){const t=r.get(n);t&&!0!==t.formAssociated||e.push(n)}return new o(e)}})}}try{window.customElements.define("custom-element",null)}catch(Tn){const t=window.customElements.define;window.customElements.define=(e,n,i)=>{if(null!==n)try{t.bind(window.customElements)(e,n,i)}catch(t){console.info(e,n,i,t)}}}class e extends Error{constructor(t,e,n){super(t),this.canceledPromiseResult=e,this.canceledPromiseError=n}}class n extends Promise{constructor(t){super(((n,i)=>t((t=>{this.isCanceled?i(new e("Promise has been canceled",t)):n(t)}),(t=>{this.isCanceled?i(new e("Promise has been canceled",void 0,t)):i(t)})))),this.isCanceled=!1}cancel(){this.isCanceled=!0}}class i{constructor(){this.loaders={},this.content={},this.clearTimeouts={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||this.forceClear(t)}forceClear(t){this.clearClearTimeout(t),this.content[t]instanceof n&&this.content[t].cancel(),delete this.content[t]}clearClearTimeout(t){null!=this.clearTimeouts[t]&&(window.clearTimeout(this.clearTimeouts[t]),delete this.clearTimeouts[t])}set(t,e){this.forceClear(t),this.register(t,(async()=>e)),this.content[t]=e}setFinal(t,e){this.forceClear(t),this.registerFinal(t,(async()=>e)),this.content[t]=e}async get(t,e,i){if(void 0===this.content[t]){if(null==(e=null!=e?e:this.loaders[t]))throw new Error("Unknown cache key "+t);const r=(t=>new n(((e,n)=>t.then(e).catch(n))))(e());return this.content[t]=r,r.then((e=>(this.content[t]=e,null!=i&&(this.clearClearTimeout(t),this.clearTimeouts[t]=window.setTimeout((()=>this.clear(t)),i)),e)))}if(this.content[t]instanceof Error)throw this.content[t];return this.content[t]}isResolvedValue(t){return!(null==t||t instanceof Promise||t instanceof Error)}getNow(t){if(this.isResolvedValue(this.content[t]))return this.content[t]}has(t){return null!=this.content[t]}resolvedKeys(){return Object.keys(this.content).filter((t=>this.isResolvedValue(this.content[t])))}resolvedValues(){return Object.values(this.content).filter((t=>this.isResolvedValue(t)))}keys(){return Object.keys(this.content)}values(){return Object.values(this.content)}}class r{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const n=[...this.callbacks];this.callbacks=[];const i=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of n)try{await t()}catch(t){return void i(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -51,7 +51,7 @@ var c;null===(c=window.HTMLSlotElement)||void 0===c||c.prototype.assignedElement
|
|
|
51
51
|
* Copyright 2017 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
53
|
*/
|
|
54
|
-
var k;M.finalized=!0,M.elementProperties=new Map,M.elementStyles=[],M.shadowRootOptions={mode:"open"},null==E||E({ReactiveElement:M}),(null!==(g=O.reactiveElementVersions)&&void 0!==g?g:O.reactiveElementVersions=[]).push("1.6.1");const
|
|
54
|
+
var k;M.finalized=!0,M.elementProperties=new Map,M.elementStyles=[],M.shadowRootOptions={mode:"open"},null==E||E({ReactiveElement:M}),(null!==(g=O.reactiveElementVersions)&&void 0!==g?g:O.reactiveElementVersions=[]).push("1.6.1");const A=window,$=A.trustedTypes,U=$?$.createPolicy("lit-html",{createHTML:t=>t}):void 0,P="$lit$",F=`lit$${(Math.random()+"").slice(9)}$`,L="?"+F,T=`<${L}>`,_=document,I=()=>_.createComment(""),B=t=>null===t||"object"!=typeof t&&"function"!=typeof t,W=Array.isArray,D="[ \t\n\f\r]",K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,z=/-->/g,H=/>/g,q=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,J=/"/g,Z=/^(?:script|style|textarea|title)$/i,X=(t=>(e,...n)=>({_$litType$:t,strings:e,values:n}))(1),G=Symbol.for("lit-noChange"),Q=Symbol.for("lit-nothing"),Y=new WeakMap,tt=_.createTreeWalker(_,129,null,!1);class et{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let r=0,o=0;const s=t.length-1,a=this.parts,[c,u]=((t,e)=>{const n=t.length-1,i=[];let r,o=2===e?"<svg>":"",s=K;for(let e=0;e<n;e++){const n=t[e];let a,c,u=-1,l=0;for(;l<n.length&&(s.lastIndex=l,c=s.exec(n),null!==c);)l=s.lastIndex,s===K?"!--"===c[1]?s=z:void 0!==c[1]?s=H:void 0!==c[2]?(Z.test(c[2])&&(r=RegExp("</"+c[2],"g")),s=q):void 0!==c[3]&&(s=q):s===q?">"===c[0]?(s=null!=r?r:K,u=-1):void 0===c[1]?u=-2:(u=s.lastIndex-c[2].length,a=c[1],s=void 0===c[3]?q:'"'===c[3]?J:V):s===J||s===V?s=q:s===z||s===H?s=K:(s=q,r=void 0);const f=s===q&&t[e+1].startsWith("/>")?" ":"";o+=s===K?n+T:u>=0?(i.push(a),n.slice(0,u)+P+n.slice(u)+F+f):n+F+(-2===u?(i.push(void 0),e):f)}const a=o+(t[n]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==U?U.createHTML(a):a,i]})(t,e);if(this.el=et.createElement(c,n),tt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=tt.nextNode())&&a.length<s;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith(P)||e.startsWith(F)){const n=u[o++];if(t.push(e),void 0!==n){const t=i.getAttribute(n.toLowerCase()+P).split(F),e=/([.?@])?(.*)/.exec(n);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?ot:"?"===e[1]?at:"@"===e[1]?ct:rt})}else a.push({type:6,index:r})}for(const e of t)i.removeAttribute(e)}if(Z.test(i.tagName)){const t=i.textContent.split(F),e=t.length-1;if(e>0){i.textContent=$?$.emptyScript:"";for(let n=0;n<e;n++)i.append(t[n],I()),tt.nextNode(),a.push({type:2,index:++r});i.append(t[e],I())}}}else if(8===i.nodeType)if(i.data===L)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(F,t+1));)a.push({type:7,index:r}),t+=F.length-1}r++}}static createElement(t,e){const n=_.createElement("template");return n.innerHTML=t,n}}function nt(t,e,n=t,i){var r,o,s,a;if(e===G)return e;let c=void 0!==i?null===(r=n._$Co)||void 0===r?void 0:r[i]:n._$Cl;const u=B(e)?void 0:e._$litDirective$;return(null==c?void 0:c.constructor)!==u&&(null===(o=null==c?void 0:c._$AO)||void 0===o||o.call(c,!1),void 0===u?c=void 0:(c=new u(t),c._$AT(t,n,i)),void 0!==i?(null!==(s=(a=n)._$Co)&&void 0!==s?s:a._$Co=[])[i]=c:n._$Cl=c),void 0!==c&&(e=nt(t,c._$AS(t,e.values),c,i)),e}let it=class t{constructor(t,e,n,i){var r;this.type=2,this._$AH=Q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=i,this._$Cp=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=nt(this,t,e),B(t)?t===Q||null==t||""===t?(this._$AH!==Q&&this._$AR(),this._$AH=Q):t!==this._$AH&&t!==G&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>W(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Q&&B(this._$AH)?this._$AA.nextSibling.data=t:this.$(_.createTextNode(t)),this._$AH=t}g(t){var e;const{values:n,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=et.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(n);else{const t=new class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:n},parts:i}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:_).importNode(n,!0);tt.currentNode=r;let o=tt.nextNode(),s=0,a=0,c=i[0];for(;void 0!==c;){if(s===c.index){let e;2===c.type?e=new it(o,o.nextSibling,this,t):1===c.type?e=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(e=new ut(o,this,t)),this._$AV.push(e),c=i[++a]}s!==(null==c?void 0:c.index)&&(o=tt.nextNode(),s++)}return r}v(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}(r,this),e=t.u(this.options);t.v(n),this.$(e),this._$AH=t}}_$AC(t){let e=Y.get(t.strings);return void 0===e&&Y.set(t.strings,e=new et(t)),e}T(e){W(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const o of e)r===n.length?n.push(i=new t(this.k(I()),this.k(I()),this,this.options)):i=n[r],i._$AI(o),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}},rt=class{constructor(t,e,n,i,r){this.type=1,this._$AH=Q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,i){const r=this.strings;let o=!1;if(void 0===r)t=nt(this,t,e,0),o=!B(t)||t!==this._$AH&&t!==G,o&&(this._$AH=t);else{const i=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=nt(this,i[n+s],e,s),a===G&&(a=this._$AH[s]),o||(o=!B(a)||a!==this._$AH[s]),a===Q?t=Q:t!==Q&&(t+=(null!=a?a:"")+r[s+1]),this._$AH[s]=a}o&&!i&&this.j(t)}j(t){t===Q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}},ot=class extends rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Q?void 0:t}};const st=$?$.emptyScript:"";let at=class extends rt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Q?this.element.setAttribute(this.name,st):this.element.removeAttribute(this.name)}},ct=class extends rt{constructor(t,e,n,i,r){super(t,e,n,i,r),this.type=5}_$AI(t,e=this){var n;if((t=null!==(n=nt(this,t,e,0))&&void 0!==n?n:Q)===G)return;const i=this._$AH,r=t===Q&&i!==Q||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==Q&&(i===Q||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}},ut=class{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){nt(this,t)}};const lt=A.litHtmlPolyfillSupport;null==lt||lt(et,it),(null!==(k=A.litHtmlVersions)&&void 0!==k?k:A.litHtmlVersions=[]).push("2.7.3");
|
|
55
55
|
/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2017 Google LLC
|
|
@@ -89,9 +89,9 @@ var ft,ht;let dt=class extends M{constructor(){super(...arguments),this.renderOp
|
|
|
89
89
|
display: inline-block;
|
|
90
90
|
width: 0;
|
|
91
91
|
}
|
|
92
|
-
`;class jt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var n,i;t=this.resolvePluralKey(t,e);let r=null!==(i=null!==(n=this.labels[t])&&void 0!==n?n:this.defaultLabels[t])&&void 0!==i?i:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,n)=>this.formatValue(t,n))))),r}resolvePluralKey(t,e){for(let n of e)if("number"==typeof n){const e=`${String(t)}[\\=${n}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const n=n=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(n):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(n):t.toLocaleString(n);try{return n(document.documentElement.lang)}catch(t){return n()}}}function Et(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ct(t){return!!t&&!!t[he]}function Nt(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===de}(t)||Array.isArray(t)||!!t[fe]||!!(null===(e=t.constructor)||void 0===e?void 0:e[fe])||Ut(t)||Pt(t))}function Rt(t,e,n){void 0===n&&(n=!1),0===Mt(t)?(n?Object.keys:ve)(t).forEach((function(i){n&&"symbol"==typeof i||e(i,t[i],t)})):t.forEach((function(n,i){return e(i,n,t)}))}function Mt(t){var e=t[he];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ut(t)?2:Pt(t)?3:0}function kt(t,e){return 2===Mt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function $t(t,e,n){var i=Mt(t);2===i?t.set(e,n):3===i?t.add(n):t[e]=n}function At(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Ut(t){return ae&&t instanceof Map}function Pt(t){return ce&&t instanceof Set}function Ft(t){return t.o||t.t}function Lt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=pe(t);delete e[he];for(var n=ve(e),i=0;i<n.length;i++){var r=n[i],o=e[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function Tt(t,e){return void 0===e&&(e=!1),It(t)||Ct(t)||!Nt(t)||(Mt(t)>1&&(t.set=t.add=t.clear=t.delete=_t),Object.freeze(t),e&&Rt(t,(function(t,e){return Tt(e,!0)}),!0)),t}function _t(){Et(2)}function It(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function Bt(t){var e=be[t];return e||Et(18,t),e}function Wt(){return oe}function Dt(t,e){e&&(Bt("Patches"),t.u=[],t.s=[],t.v=e)}function Kt(t){zt(t),t.p.forEach(qt),t.p=null}function zt(t){t===oe&&(oe=t.l)}function Ht(t){return oe={p:[],l:oe,h:t,m:!0,_:0}}function qt(t){var e=t[he];0===e.i||1===e.i?e.j():e.g=!0}function Vt(t,e){e._=e.p.length;var n=e.p[0],i=void 0!==t&&t!==n;return e.h.O||Bt("ES5").S(e,t,i),i?(n[he].P&&(Kt(e),Et(4)),Nt(t)&&(t=Jt(e,t),e.l||Xt(e,t)),e.u&&Bt("Patches").M(n[he].t,t,e.u,e.s)):t=Jt(e,n,[]),Kt(e),e.u&&e.v(e.u,e.s),t!==le?t:void 0}function Jt(t,e,n){if(It(e))return e;var i=e[he];if(!i)return Rt(e,(function(r,o){return Zt(t,i,e,r,o,n)}),!0),e;if(i.A!==t)return e;if(!i.P)return Xt(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var r=4===i.i||5===i.i?i.o=Lt(i.k):i.o,o=r,s=!1;3===i.i&&(o=new Set(r),r.clear(),s=!0),Rt(o,(function(e,o){return Zt(t,i,r,e,o,n,s)})),Xt(t,r,!1),n&&t.u&&Bt("Patches").N(i,n,t.u,t.s)}return i.o}function Zt(t,e,n,i,r,o,s){if(Ct(r)){var a=Jt(t,r,o&&e&&3!==e.i&&!kt(e.R,i)?o.concat(i):void 0);if($t(n,i,a),!Ct(a))return;t.m=!1}else s&&n.add(r);if(Nt(r)&&!It(r)){if(!t.h.D&&t._<1)return;Jt(t,r),e&&e.A.l||Xt(t,r)}}function Xt(t,e,n){void 0===n&&(n=!1),!t.l&&t.h.D&&t.m&&Tt(e,n)}function Gt(t,e){var n=t[he];return(n?Ft(n):t)[e]}function Qt(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var i=Object.getOwnPropertyDescriptor(n,e);if(i)return i;n=Object.getPrototypeOf(n)}}function Yt(t){t.P||(t.P=!0,t.l&&Yt(t.l))}function te(t){t.o||(t.o=Lt(t.t))}function ee(t,e,n){var i=Ut(e)?Bt("MapSet").F(e,n):Pt(e)?Bt("MapSet").T(e,n):t.O?function(t,e){var n=Array.isArray(t),i={i:n?1:0,A:e?e.A:Wt(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},r=i,o=xe;n&&(r=[i],o=me);var s=Proxy.revocable(r,o),a=s.revoke,c=s.proxy;return i.k=c,i.j=a,c}(e,n):Bt("ES5").J(e,n);return(n?n.A:Wt()).p.push(i),i}function ne(t){return Ct(t)||Et(22,t),function t(e){if(!Nt(e))return e;var n,i=e[he],r=Mt(e);if(i){if(!i.P&&(i.i<4||!Bt("ES5").K(i)))return i.t;i.I=!0,n=ie(e,r),i.I=!1}else n=ie(e,r);return Rt(n,(function(e,r){i&&function(t,e){return 2===Mt(t)?t.get(e):t[e]}(i.t,e)===r||$t(n,e,t(r))})),3===r?new Set(n):n}(t)}function ie(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Lt(t)}var re,oe,se="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ae="undefined"!=typeof Map,ce="undefined"!=typeof Set,ue="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,le=se?Symbol.for("immer-nothing"):((re={})["immer-nothing"]=!0,re),fe=se?Symbol.for("immer-draftable"):"__$immer_draftable",he=se?Symbol.for("immer-state"):"__$immer_state",de=""+Object.prototype.constructor,ve="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,pe=Object.getOwnPropertyDescriptors||function(t){var e={};return ve(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},be={},xe={get:function(t,e){if(e===he)return t;var n=Ft(t);if(!kt(n,e))return function(t,e,n){var i,r=Qt(e,n);return r?"value"in r?r.value:null===(i=r.get)||void 0===i?void 0:i.call(t.k):void 0}(t,n,e);var i=n[e];return t.I||!Nt(i)?i:i===Gt(t.t,e)?(te(t),t.o[e]=ee(t.A.h,i,t)):i},has:function(t,e){return e in Ft(t)},ownKeys:function(t){return Reflect.ownKeys(Ft(t))},set:function(t,e,n){var i=Qt(Ft(t),e);if(null==i?void 0:i.set)return i.set.call(t.k,n),!0;if(!t.P){var r=Gt(Ft(t),e),o=null==r?void 0:r[he];if(o&&o.t===n)return t.o[e]=n,t.R[e]=!1,!0;if(At(n,r)&&(void 0!==n||kt(t.t,e)))return!0;te(t),Yt(t)}return t.o[e]===n&&(void 0!==n||e in t.o)||Number.isNaN(n)&&Number.isNaN(t.o[e])||(t.o[e]=n,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==Gt(t.t,e)||e in t.t?(t.R[e]=!1,te(t),Yt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=Ft(t),i=Reflect.getOwnPropertyDescriptor(n,e);return i?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:i.enumerable,value:n[e]}:i},defineProperty:function(){Et(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Et(12)}},me={};Rt(xe,(function(t,e){me[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),me.deleteProperty=function(t,e){return me.set.call(this,t,e,void 0)},me.set=function(t,e,n){return xe.set.call(this,t[0],e,n,t[0])};var ye=function(){function t(t){var e=this;this.O=ue,this.D=!0,this.produce=function(t,n,i){if("function"==typeof t&&"function"!=typeof n){var r=n;n=t;var o=e;return function(t){var e=this;void 0===t&&(t=r);for(var i=arguments.length,s=Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];return o.produce(t,(function(t){var i;return(i=n).call.apply(i,[e,t].concat(s))}))}}var s;if("function"!=typeof n&&Et(6),void 0!==i&&"function"!=typeof i&&Et(7),Nt(t)){var a=Ht(e),c=ee(e,t,void 0),u=!0;try{s=n(c),u=!1}finally{u?Kt(a):zt(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Dt(a,i),Vt(t,a)}),(function(t){throw Kt(a),t})):(Dt(a,i),Vt(s,a))}if(!t||"object"!=typeof t){if(void 0===(s=n(t))&&(s=t),s===le&&(s=void 0),e.D&&Tt(s,!0),i){var l=[],f=[];Bt("Patches").M(t,s,l,f),i(l,f)}return s}Et(21,t)},this.produceWithPatches=function(t,n){if("function"==typeof t)return function(n){for(var i=arguments.length,r=Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(r))}))};var i,r,o=e.produce(t,n,(function(t,e){i=t,r=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,i,r]})):[o,i,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Nt(t)||Et(8),Ct(t)&&(t=ne(t));var e=Ht(this),n=ee(this,t,void 0);return n[he].C=!0,zt(e),n},e.finishDraft=function(t,e){var n=(t&&t[he]).A;return Dt(n,e),Vt(void 0,n)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!ue&&Et(20),this.O=t},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var i=e[n];if(0===i.path.length&&"replace"===i.op){t=i.value;break}}n>-1&&(e=e.slice(n+1));var r=Bt("Patches").$;return Ct(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),we=new ye,ge=we.produce;function Oe(t){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(t)}function Se(t){var e=function(t,e){if("object"!==Oe(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==Oe(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Oe(e)?e:String(e)}function je(t,e,n){return(e=Se(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ee(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Ce(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ee(Object(n),!0).forEach((function(e){je(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ne(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}we.produceWithPatches.bind(we),we.setAutoFreeze.bind(we),we.setUseProxies.bind(we),we.applyPatches.bind(we),we.createDraft.bind(we),we.finishDraft.bind(we);var Re="function"==typeof Symbol&&Symbol.observable||"@@observable",Me=function(){return Math.random().toString(36).substring(7).split("").join(".")},ke={INIT:"@@redux/INIT"+Me(),REPLACE:"@@redux/REPLACE"+Me(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Me()}};function $e(t,e,n){var i;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Ne(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Ne(1));return n($e)(t,e)}if("function"!=typeof t)throw new Error(Ne(2));var r=t,o=e,s=[],a=s,c=!1;function u(){a===s&&(a=s.slice())}function l(){if(c)throw new Error(Ne(3));return o}function f(t){if("function"!=typeof t)throw new Error(Ne(4));if(c)throw new Error(Ne(5));var e=!0;return u(),a.push(t),function(){if(e){if(c)throw new Error(Ne(6));e=!1,u();var n=a.indexOf(t);a.splice(n,1),s=null}}}function h(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error(Ne(7));if(void 0===t.type)throw new Error(Ne(8));if(c)throw new Error(Ne(9));try{c=!0,o=r(o,t)}finally{c=!1}for(var e=s=a,n=0;n<e.length;n++){(0,e[n])()}return t}return h({type:ke.INIT}),(i={dispatch:h,subscribe:f,getState:l,replaceReducer:function(t){if("function"!=typeof t)throw new Error(Ne(10));r=t,h({type:ke.REPLACE})}})[Re]=function(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ne(11));function n(){t.next&&t.next(l())}return n(),{unsubscribe:e(n)}}})[Re]=function(){return this},t},i}function Ae(t){for(var e=Object.keys(t),n={},i=0;i<e.length;i++){var r=e[i];"function"==typeof t[r]&&(n[r]=t[r])}var o,s=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:ke.INIT}))throw new Error(Ne(12));if(void 0===n(void 0,{type:ke.PROBE_UNKNOWN_ACTION()}))throw new Error(Ne(13))}))}(n)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var i=!1,r={},a=0;a<s.length;a++){var c=s[a],u=n[c],l=t[c],f=u(l,e);if(void 0===f)throw e&&e.type,new Error(Ne(14));r[c]=f,i=i||f!==l}return(i=i||s.length!==Object.keys(t).length)?r:t}}function Ue(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Pe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),i=function(){throw new Error(Ne(15))},r={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},o=e.map((function(t){return t(r)}));return i=Ue.apply(void 0,o)(n.dispatch),Ce(Ce({},n),{},{dispatch:i})}}}function Fe(t){return function(e){var n=e.dispatch,i=e.getState;return function(e){return function(r){return"function"==typeof r?r(n,i,t):e(r)}}}}var Le=Fe();Le.withExtraArgument=Fe;var Te,_e=Le,Ie=(Te=function(t,e){return Te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Te(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Te(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Be=function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},We=function(t,e){for(var n=0,i=e.length,r=t.length;n<i;n++,r++)t[r]=e[n];return t},De=Object.defineProperty,Ke=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,Je=function(t,e,n){return e in t?De(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},Ze=function(t,e){for(var n in e||(e={}))qe.call(e,n)&&Je(t,n,e[n]);if(He)for(var i=0,r=He(e);i<r.length;i++){n=r[i];Ve.call(e,n)&&Je(t,n,e[n])}return t},Xe=function(t,e){return Ke(t,ze(e))},Ge="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Ue:Ue.apply(null,arguments)};var Qe=function(t){function e(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=t.apply(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ie(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,We([void 0],t[0].concat(this)))):new(e.bind.apply(e,We([void 0],t.concat(this))))},e}(Array),Ye=function(t){function e(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=t.apply(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ie(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,We([void 0],t[0].concat(this)))):new(e.bind.apply(e,We([void 0],t.concat(this))))},e}(Array);function tn(t){return Nt(t)?ge(t,(function(){})):t}function en(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e;t.immutableCheck,t.serializableCheck;var i=new Qe;n&&(!function(t){return"boolean"==typeof t}(n)?i.push(_e.withExtraArgument(n.extraArgument)):i.push(_e));return i}(t)}}function nn(t){var e,n=en(),i=t||{},r=i.reducer,o=void 0===r?void 0:r,s=i.middleware,a=void 0===s?n():s,c=i.devTools,u=void 0===c||c,l=i.preloadedState,f=void 0===l?void 0:l,h=i.enhancers,d=void 0===h?void 0:h;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return e===n}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Ae(o)}var v=a;"function"==typeof v&&(v=v(n));var p=Pe.apply(void 0,v),b=Ue;u&&(b=Ge(Ze({trace:!1},"object"==typeof u&&u)));var x=new Ye(p),m=x;return Array.isArray(d)?m=We([p],d):"function"==typeof d&&(m=d(x)),$e(e,f,b.apply(void 0,m))}function rn(t,e){function n(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var r=e.apply(void 0,n);if(!r)throw new Error("prepareAction did not return an object");return Ze(Ze({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:n[0]}}return n.toString=function(){return""+t},n.type=t,n.match=function(e){return e.type===t},n}function on(t){var e,n={},i=[],r={addCase:function(t,e){var i="string"==typeof t?t:t.type;if(i in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[i]=e,r},addMatcher:function(t,e){return i.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[n,i,e]}function sn(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var n,i="function"==typeof t.initialState?t.initialState:tn(t.initialState),r=t.reducers||{},o=Object.keys(r),s={},a={},c={};function u(){var e="function"==typeof t.extraReducers?on(t.extraReducers):[t.extraReducers],n=e[0],r=void 0===n?{}:n,o=e[1],s=void 0===o?[]:o,c=e[2],u=void 0===c?void 0:c,l=Ze(Ze({},r),a);return function(t,e,n,i){void 0===n&&(n=[]);var r,o="function"==typeof e?on(e):[e,n,i],s=o[0],a=o[1],c=o[2];if(function(t){return"function"==typeof t}(t))r=function(){return tn(t())};else{var u=tn(t);r=function(){return u}}function l(t,e){void 0===t&&(t=r());var n=We([s[e.type]],a.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===n.filter((function(t){return!!t})).length&&(n=[c]),n.reduce((function(t,n){if(n){var i;if(Ct(t))return void 0===(i=n(t,e))?t:i;if(Nt(t))return ge(t,(function(t){return n(t,e)}));if(void 0===(i=n(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return i}return t}),t)}return l.getInitialState=r,l}(i,(function(t){for(var e in l)t.addCase(e,l[e]);for(var n=0,i=s;n<i.length;n++){var r=i[n];t.addMatcher(r.matcher,r.reducer)}u&&t.addDefaultCase(u)}))}return o.forEach((function(t){var n,i,o=r[t],u=e+"/"+t;"reducer"in o?(n=o.reducer,i=o.prepare):n=o,s[t]=n,a[u]=n,c[t]=i?rn(u,i):rn(u)})),{name:e,reducer:function(t,e){return n||(n=u()),n(t,e)},actions:c,caseReducers:s,getInitialState:function(){return n||(n=u()),n.getInitialState()}}}var an=["name","message","stack","code"],cn=function(t,e){this.payload=t,this.meta=e},un=function(t,e){this.payload=t,this.meta=e},ln=function(t){if("object"==typeof t&&null!==t){for(var e={},n=0,i=an;n<i.length;n++){var r=i[n];"string"==typeof t[r]&&(e[r]=t[r])}return e}return{message:String(t)}};function fn(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,n){var i=rn(t+"/fulfilled",(function(t,e,n,i){return{payload:t,meta:Xe(Ze({},i||{}),{arg:n,requestId:e,requestStatus:"fulfilled"})}})),r=rn(t+"/pending",(function(t,e,n){return{payload:void 0,meta:Xe(Ze({},n||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),o=rn(t+"/rejected",(function(t,e,i,r,o){return{payload:r,error:(n&&n.serializeError||ln)(t||"Rejected"),meta:Xe(Ze({},o||{}),{arg:i,requestId:e,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),s="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(a,c,u){var l,f=(null==n?void 0:n.idGenerator)?n.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",n=t;n--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),h=new s;function d(t){l=t,h.abort()}var v=function(){return s=this,v=null,p=function(){var s,v,p,b,x,m;return Be(this,(function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),b=null==(s=null==n?void 0:n.condition)?void 0:s.call(n,t,{getState:c,extra:u}),null===(w=b)||"object"!=typeof w||"function"!=typeof w.then?[3,2]:[4,b];case 1:b=y.sent(),y.label=2;case 2:if(!1===b||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return x=new Promise((function(t,e){return h.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:l||"Aborted"})}))})),a(r(f,t,null==(v=null==n?void 0:n.getPendingMeta)?void 0:v.call(n,{requestId:f,arg:t},{getState:c,extra:u}))),[4,Promise.race([x,Promise.resolve(e(t,{dispatch:a,getState:c,extra:u,requestId:f,signal:h.signal,abort:d,rejectWithValue:function(t,e){return new cn(t,e)},fulfillWithValue:function(t,e){return new un(t,e)}})).then((function(e){if(e instanceof cn)throw e;return e instanceof un?i(e.payload,f,t,e.meta):i(e,f,t)}))])];case 3:return p=y.sent(),[3,5];case 4:return m=y.sent(),p=m instanceof cn?o(null,f,t,m.payload,m.meta):o(m,f,t),[3,5];case 5:return n&&!n.dispatchConditionRejection&&o.match(p)&&p.meta.condition||a(p),[2,p]}var w}))},new Promise((function(t,e){var n=function(t){try{r(p.next(t))}catch(t){e(t)}},i=function(t){try{r(p.throw(t))}catch(t){e(t)}},r=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(n,i)};r((p=p.apply(s,v)).next())}));var s,v,p}();return Object.assign(v,{abort:d,requestId:f,arg:t,unwrap:function(){return v.then(fn)}})}}),{pending:r,rejected:o,fulfilled:i,typePrefix:t})}t.withTypes=function(){return t}}();var hn,dn,vn="listenerMiddleware";rn(vn+"/add"),rn(vn+"/removeAll"),rn(vn+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var n=r[t];return n?n.enumerable=e:r[t]=n={configurable:!0,enumerable:e,get:function(){var e=this[he];return xe.get(e,t)},set:function(e){var n=this[he];xe.set(n,t,e)}},n}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][he];if(!r.P)switch(r.i){case 5:i(r)&&Yt(r);break;case 4:n(r)&&Yt(r)}}}function n(t){for(var e=t.t,n=t.k,i=ve(n),r=i.length-1;r>=0;r--){var o=i[r];if(o!==he){var s=e[o];if(void 0===s&&!kt(e,o))return!0;var a=n[o],c=a&&a[he];if(c?c.t!==s:!At(a,s))return!0}}var u=!!e[he];return i.length!==ve(e).length+(u?0:1)}function i(t){var e=t.k;if(e.length!==t.t.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);if(n&&!n.get)return!0;for(var i=0;i<e.length;i++)if(!e.hasOwnProperty(i))return!0;return!1}var r={};!function(t,e){be[t]||(be[t]=e)}("ES5",{J:function(e,n){var i=Array.isArray(e),r=function(e,n){if(e){for(var i=Array(n.length),r=0;r<n.length;r++)Object.defineProperty(i,""+r,t(r,!0));return i}var o=pe(n);delete o[he];for(var s=ve(o),a=0;a<s.length;a++){var c=s[a];o[c]=t(c,e||!!o[c].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(i,e),o={i:i?5:4,A:n?n.A:Wt(),P:!1,I:!1,R:{},l:n,t:e,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,he,{value:o,writable:!0}),r},S:function(t,n,r){r?Ct(n)&&n[he].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var n=e[he];if(n){var r=n.t,o=n.k,s=n.R,a=n.i;if(4===a)Rt(o,(function(e){e!==he&&(void 0!==r[e]||kt(r,e)?s[e]||t(o[e]):(s[e]=!0,Yt(n)))})),Rt(r,(function(t){void 0!==o[t]||kt(o,t)||(s[t]=!1,Yt(n))}));else if(5===a){if(i(n)&&(Yt(n),s.length=!0),o.length<r.length)for(var c=o.length;c<r.length;c++)s[c]=!1;else for(var u=r.length;u<o.length;u++)s[u]=!0;for(var l=Math.min(o.length,r.length),f=0;f<l;f++)o.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(o[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?n(t):i(t)}})}();const pn=t=>{const e=null!=t?t:{};return(t,n)=>{var i;const r={hasChanged:(t,e)=>!u(t,e),attribute:!1,...e};s(r)(t,n);const o=t;o.reduxProperties=o.reduxProperties||new Map,o.reduxProperties.set(n,{selector:null!==(i=e.selector)&&void 0!==i?i:t=>t[n],store:e.store})}},bn=Symbol("internalStoresUnsubscribers"),xn=Symbol("internalStores");class mn extends St{constructor(){super(...arguments),this[hn]=new Map,this[dn]=new Map}updated(t){var e;super.updated(t),(null===(e=this.reduxReactiveProperties)||void 0===e?void 0:e.some((e=>t.has(e))))&&this.updateFromStores()}getUnnamedStore(){if(this[xn].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xn].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[xn].get(t)}addStore(t,e){var n;e=null!==(n=null!=e?e:yn(t)?t.name:void 0)&&void 0!==n?n:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[xn].delete(e)}setupStore(t,e){this[xn].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[xn].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const n=this.constructor.getPropertyOptions(e);if(!(null==n?void 0:n.attribute)||!this.hasAttribute("string"==typeof(null==n?void 0:n.attribute)?n.attribute:e)){const n=this.getStore(t.store);n&&(this[e]=t.selector(n.getState(),this))}}))}subscribeToStore(t,e){this[bn].set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this[bn]).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this[bn].has(t)&&this[bn].get(t)(),this[bn].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function yn(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}hn=bn,dn=xn;class wn{static get(t){window.ftReduxStores||(window.ftReduxStores={});const e="string"==typeof t?t:t.name,n="string"==typeof t?void 0:t,i=window.ftReduxStores[e];if(yn(i))return i;if(null==n)return;const r=sn(n),o=nn({reducer:(t,e)=>"CLEAR_FT_REDUX_STORE"===e.type?r.getInitialState():r.reducer(t,e)});return window.ftReduxStores[n.name]=new wn(r,o)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,n)=>{const i=t[e];if(i)return(...t)=>{const e=i(...t);return this.reduxStore.dispatch(e),e}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var gn,On;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(On=null===(gn=window.safari)||void 0===gn?void 0:gn.pushNotification)||void 0===On||On.toString());const Sn={colorError:pt.external(bt.colorError,"Design system"),fontFamily:pt.external(bt.contentFont,"Design system")},jn=m`
|
|
92
|
+
`;class jt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var n,i;t=this.resolvePluralKey(t,e);let r=null!==(i=null!==(n=this.labels[t])&&void 0!==n?n:this.defaultLabels[t])&&void 0!==i?i:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,n)=>this.formatValue(t,n))))),r}resolvePluralKey(t,e){for(let n of e)if("number"==typeof n){const e=`${String(t)}[\\=${n}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const n=n=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(n):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(n):t.toLocaleString(n);try{return n(document.documentElement.lang)}catch(t){return n()}}}function Et(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ct(t){return!!t&&!!t[he]}function Nt(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===de}(t)||Array.isArray(t)||!!t[fe]||!!(null===(e=t.constructor)||void 0===e?void 0:e[fe])||Ut(t)||Pt(t))}function Rt(t,e,n){void 0===n&&(n=!1),0===Mt(t)?(n?Object.keys:ve)(t).forEach((function(i){n&&"symbol"==typeof i||e(i,t[i],t)})):t.forEach((function(n,i){return e(i,n,t)}))}function Mt(t){var e=t[he];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ut(t)?2:Pt(t)?3:0}function kt(t,e){return 2===Mt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function At(t,e,n){var i=Mt(t);2===i?t.set(e,n):3===i?t.add(n):t[e]=n}function $t(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Ut(t){return ae&&t instanceof Map}function Pt(t){return ce&&t instanceof Set}function Ft(t){return t.o||t.t}function Lt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=pe(t);delete e[he];for(var n=ve(e),i=0;i<n.length;i++){var r=n[i],o=e[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function Tt(t,e){return void 0===e&&(e=!1),It(t)||Ct(t)||!Nt(t)||(Mt(t)>1&&(t.set=t.add=t.clear=t.delete=_t),Object.freeze(t),e&&Rt(t,(function(t,e){return Tt(e,!0)}),!0)),t}function _t(){Et(2)}function It(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function Bt(t){var e=be[t];return e||Et(18,t),e}function Wt(){return oe}function Dt(t,e){e&&(Bt("Patches"),t.u=[],t.s=[],t.v=e)}function Kt(t){zt(t),t.p.forEach(qt),t.p=null}function zt(t){t===oe&&(oe=t.l)}function Ht(t){return oe={p:[],l:oe,h:t,m:!0,_:0}}function qt(t){var e=t[he];0===e.i||1===e.i?e.j():e.g=!0}function Vt(t,e){e._=e.p.length;var n=e.p[0],i=void 0!==t&&t!==n;return e.h.O||Bt("ES5").S(e,t,i),i?(n[he].P&&(Kt(e),Et(4)),Nt(t)&&(t=Jt(e,t),e.l||Xt(e,t)),e.u&&Bt("Patches").M(n[he].t,t,e.u,e.s)):t=Jt(e,n,[]),Kt(e),e.u&&e.v(e.u,e.s),t!==le?t:void 0}function Jt(t,e,n){if(It(e))return e;var i=e[he];if(!i)return Rt(e,(function(r,o){return Zt(t,i,e,r,o,n)}),!0),e;if(i.A!==t)return e;if(!i.P)return Xt(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var r=4===i.i||5===i.i?i.o=Lt(i.k):i.o,o=r,s=!1;3===i.i&&(o=new Set(r),r.clear(),s=!0),Rt(o,(function(e,o){return Zt(t,i,r,e,o,n,s)})),Xt(t,r,!1),n&&t.u&&Bt("Patches").N(i,n,t.u,t.s)}return i.o}function Zt(t,e,n,i,r,o,s){if(Ct(r)){var a=Jt(t,r,o&&e&&3!==e.i&&!kt(e.R,i)?o.concat(i):void 0);if(At(n,i,a),!Ct(a))return;t.m=!1}else s&&n.add(r);if(Nt(r)&&!It(r)){if(!t.h.D&&t._<1)return;Jt(t,r),e&&e.A.l||Xt(t,r)}}function Xt(t,e,n){void 0===n&&(n=!1),!t.l&&t.h.D&&t.m&&Tt(e,n)}function Gt(t,e){var n=t[he];return(n?Ft(n):t)[e]}function Qt(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var i=Object.getOwnPropertyDescriptor(n,e);if(i)return i;n=Object.getPrototypeOf(n)}}function Yt(t){t.P||(t.P=!0,t.l&&Yt(t.l))}function te(t){t.o||(t.o=Lt(t.t))}function ee(t,e,n){var i=Ut(e)?Bt("MapSet").F(e,n):Pt(e)?Bt("MapSet").T(e,n):t.O?function(t,e){var n=Array.isArray(t),i={i:n?1:0,A:e?e.A:Wt(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},r=i,o=xe;n&&(r=[i],o=me);var s=Proxy.revocable(r,o),a=s.revoke,c=s.proxy;return i.k=c,i.j=a,c}(e,n):Bt("ES5").J(e,n);return(n?n.A:Wt()).p.push(i),i}function ne(t){return Ct(t)||Et(22,t),function t(e){if(!Nt(e))return e;var n,i=e[he],r=Mt(e);if(i){if(!i.P&&(i.i<4||!Bt("ES5").K(i)))return i.t;i.I=!0,n=ie(e,r),i.I=!1}else n=ie(e,r);return Rt(n,(function(e,r){i&&function(t,e){return 2===Mt(t)?t.get(e):t[e]}(i.t,e)===r||At(n,e,t(r))})),3===r?new Set(n):n}(t)}function ie(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Lt(t)}var re,oe,se="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ae="undefined"!=typeof Map,ce="undefined"!=typeof Set,ue="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,le=se?Symbol.for("immer-nothing"):((re={})["immer-nothing"]=!0,re),fe=se?Symbol.for("immer-draftable"):"__$immer_draftable",he=se?Symbol.for("immer-state"):"__$immer_state",de=""+Object.prototype.constructor,ve="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,pe=Object.getOwnPropertyDescriptors||function(t){var e={};return ve(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},be={},xe={get:function(t,e){if(e===he)return t;var n=Ft(t);if(!kt(n,e))return function(t,e,n){var i,r=Qt(e,n);return r?"value"in r?r.value:null===(i=r.get)||void 0===i?void 0:i.call(t.k):void 0}(t,n,e);var i=n[e];return t.I||!Nt(i)?i:i===Gt(t.t,e)?(te(t),t.o[e]=ee(t.A.h,i,t)):i},has:function(t,e){return e in Ft(t)},ownKeys:function(t){return Reflect.ownKeys(Ft(t))},set:function(t,e,n){var i=Qt(Ft(t),e);if(null==i?void 0:i.set)return i.set.call(t.k,n),!0;if(!t.P){var r=Gt(Ft(t),e),o=null==r?void 0:r[he];if(o&&o.t===n)return t.o[e]=n,t.R[e]=!1,!0;if($t(n,r)&&(void 0!==n||kt(t.t,e)))return!0;te(t),Yt(t)}return t.o[e]===n&&(void 0!==n||e in t.o)||Number.isNaN(n)&&Number.isNaN(t.o[e])||(t.o[e]=n,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==Gt(t.t,e)||e in t.t?(t.R[e]=!1,te(t),Yt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=Ft(t),i=Reflect.getOwnPropertyDescriptor(n,e);return i?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:i.enumerable,value:n[e]}:i},defineProperty:function(){Et(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Et(12)}},me={};Rt(xe,(function(t,e){me[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),me.deleteProperty=function(t,e){return me.set.call(this,t,e,void 0)},me.set=function(t,e,n){return xe.set.call(this,t[0],e,n,t[0])};var ye=function(){function t(t){var e=this;this.O=ue,this.D=!0,this.produce=function(t,n,i){if("function"==typeof t&&"function"!=typeof n){var r=n;n=t;var o=e;return function(t){var e=this;void 0===t&&(t=r);for(var i=arguments.length,s=Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];return o.produce(t,(function(t){var i;return(i=n).call.apply(i,[e,t].concat(s))}))}}var s;if("function"!=typeof n&&Et(6),void 0!==i&&"function"!=typeof i&&Et(7),Nt(t)){var a=Ht(e),c=ee(e,t,void 0),u=!0;try{s=n(c),u=!1}finally{u?Kt(a):zt(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Dt(a,i),Vt(t,a)}),(function(t){throw Kt(a),t})):(Dt(a,i),Vt(s,a))}if(!t||"object"!=typeof t){if(void 0===(s=n(t))&&(s=t),s===le&&(s=void 0),e.D&&Tt(s,!0),i){var l=[],f=[];Bt("Patches").M(t,s,l,f),i(l,f)}return s}Et(21,t)},this.produceWithPatches=function(t,n){if("function"==typeof t)return function(n){for(var i=arguments.length,r=Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(r))}))};var i,r,o=e.produce(t,n,(function(t,e){i=t,r=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,i,r]})):[o,i,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Nt(t)||Et(8),Ct(t)&&(t=ne(t));var e=Ht(this),n=ee(this,t,void 0);return n[he].C=!0,zt(e),n},e.finishDraft=function(t,e){var n=(t&&t[he]).A;return Dt(n,e),Vt(void 0,n)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!ue&&Et(20),this.O=t},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var i=e[n];if(0===i.path.length&&"replace"===i.op){t=i.value;break}}n>-1&&(e=e.slice(n+1));var r=Bt("Patches").$;return Ct(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),we=new ye,ge=we.produce;function Oe(t){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(t)}function Se(t){var e=function(t,e){if("object"!==Oe(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==Oe(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Oe(e)?e:String(e)}function je(t,e,n){return(e=Se(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ee(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Ce(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ee(Object(n),!0).forEach((function(e){je(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ne(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}we.produceWithPatches.bind(we),we.setAutoFreeze.bind(we),we.setUseProxies.bind(we),we.applyPatches.bind(we),we.createDraft.bind(we),we.finishDraft.bind(we);var Re="function"==typeof Symbol&&Symbol.observable||"@@observable",Me=function(){return Math.random().toString(36).substring(7).split("").join(".")},ke={INIT:"@@redux/INIT"+Me(),REPLACE:"@@redux/REPLACE"+Me(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Me()}};function Ae(t,e,n){var i;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Ne(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Ne(1));return n(Ae)(t,e)}if("function"!=typeof t)throw new Error(Ne(2));var r=t,o=e,s=[],a=s,c=!1;function u(){a===s&&(a=s.slice())}function l(){if(c)throw new Error(Ne(3));return o}function f(t){if("function"!=typeof t)throw new Error(Ne(4));if(c)throw new Error(Ne(5));var e=!0;return u(),a.push(t),function(){if(e){if(c)throw new Error(Ne(6));e=!1,u();var n=a.indexOf(t);a.splice(n,1),s=null}}}function h(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error(Ne(7));if(void 0===t.type)throw new Error(Ne(8));if(c)throw new Error(Ne(9));try{c=!0,o=r(o,t)}finally{c=!1}for(var e=s=a,n=0;n<e.length;n++){(0,e[n])()}return t}return h({type:ke.INIT}),(i={dispatch:h,subscribe:f,getState:l,replaceReducer:function(t){if("function"!=typeof t)throw new Error(Ne(10));r=t,h({type:ke.REPLACE})}})[Re]=function(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ne(11));function n(){t.next&&t.next(l())}return n(),{unsubscribe:e(n)}}})[Re]=function(){return this},t},i}function $e(t){for(var e=Object.keys(t),n={},i=0;i<e.length;i++){var r=e[i];"function"==typeof t[r]&&(n[r]=t[r])}var o,s=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:ke.INIT}))throw new Error(Ne(12));if(void 0===n(void 0,{type:ke.PROBE_UNKNOWN_ACTION()}))throw new Error(Ne(13))}))}(n)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var i=!1,r={},a=0;a<s.length;a++){var c=s[a],u=n[c],l=t[c],f=u(l,e);if(void 0===f)throw e&&e.type,new Error(Ne(14));r[c]=f,i=i||f!==l}return(i=i||s.length!==Object.keys(t).length)?r:t}}function Ue(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Pe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),i=function(){throw new Error(Ne(15))},r={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},o=e.map((function(t){return t(r)}));return i=Ue.apply(void 0,o)(n.dispatch),Ce(Ce({},n),{},{dispatch:i})}}}function Fe(t){return function(e){var n=e.dispatch,i=e.getState;return function(e){return function(r){return"function"==typeof r?r(n,i,t):e(r)}}}}var Le=Fe();Le.withExtraArgument=Fe;var Te,_e=Le,Ie=(Te=function(t,e){return Te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Te(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Te(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Be=function(t,e){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},We=function(t,e){for(var n=0,i=e.length,r=t.length;n<i;n++,r++)t[r]=e[n];return t},De=Object.defineProperty,Ke=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,Je=function(t,e,n){return e in t?De(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},Ze=function(t,e){for(var n in e||(e={}))qe.call(e,n)&&Je(t,n,e[n]);if(He)for(var i=0,r=He(e);i<r.length;i++){n=r[i];Ve.call(e,n)&&Je(t,n,e[n])}return t},Xe=function(t,e){return Ke(t,ze(e))},Ge="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Ue:Ue.apply(null,arguments)};var Qe=function(t){function e(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=t.apply(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ie(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,We([void 0],t[0].concat(this)))):new(e.bind.apply(e,We([void 0],t.concat(this))))},e}(Array),Ye=function(t){function e(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=t.apply(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ie(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,We([void 0],t[0].concat(this)))):new(e.bind.apply(e,We([void 0],t.concat(this))))},e}(Array);function tn(t){return Nt(t)?ge(t,(function(){})):t}function en(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e;t.immutableCheck,t.serializableCheck;var i=new Qe;n&&(!function(t){return"boolean"==typeof t}(n)?i.push(_e.withExtraArgument(n.extraArgument)):i.push(_e));return i}(t)}}function nn(t){var e,n=en(),i=t||{},r=i.reducer,o=void 0===r?void 0:r,s=i.middleware,a=void 0===s?n():s,c=i.devTools,u=void 0===c||c,l=i.preloadedState,f=void 0===l?void 0:l,h=i.enhancers,d=void 0===h?void 0:h;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return e===n}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=$e(o)}var v=a;"function"==typeof v&&(v=v(n));var p=Pe.apply(void 0,v),b=Ue;u&&(b=Ge(Ze({trace:!1},"object"==typeof u&&u)));var x=new Ye(p),m=x;return Array.isArray(d)?m=We([p],d):"function"==typeof d&&(m=d(x)),Ae(e,f,b.apply(void 0,m))}function rn(t,e){function n(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var r=e.apply(void 0,n);if(!r)throw new Error("prepareAction did not return an object");return Ze(Ze({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:n[0]}}return n.toString=function(){return""+t},n.type=t,n.match=function(e){return e.type===t},n}function on(t){var e,n={},i=[],r={addCase:function(t,e){var i="string"==typeof t?t:t.type;if(i in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[i]=e,r},addMatcher:function(t,e){return i.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[n,i,e]}function sn(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var n,i="function"==typeof t.initialState?t.initialState:tn(t.initialState),r=t.reducers||{},o=Object.keys(r),s={},a={},c={};function u(){var e="function"==typeof t.extraReducers?on(t.extraReducers):[t.extraReducers],n=e[0],r=void 0===n?{}:n,o=e[1],s=void 0===o?[]:o,c=e[2],u=void 0===c?void 0:c,l=Ze(Ze({},r),a);return function(t,e,n,i){void 0===n&&(n=[]);var r,o="function"==typeof e?on(e):[e,n,i],s=o[0],a=o[1],c=o[2];if(function(t){return"function"==typeof t}(t))r=function(){return tn(t())};else{var u=tn(t);r=function(){return u}}function l(t,e){void 0===t&&(t=r());var n=We([s[e.type]],a.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===n.filter((function(t){return!!t})).length&&(n=[c]),n.reduce((function(t,n){if(n){var i;if(Ct(t))return void 0===(i=n(t,e))?t:i;if(Nt(t))return ge(t,(function(t){return n(t,e)}));if(void 0===(i=n(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return i}return t}),t)}return l.getInitialState=r,l}(i,(function(t){for(var e in l)t.addCase(e,l[e]);for(var n=0,i=s;n<i.length;n++){var r=i[n];t.addMatcher(r.matcher,r.reducer)}u&&t.addDefaultCase(u)}))}return o.forEach((function(t){var n,i,o=r[t],u=e+"/"+t;"reducer"in o?(n=o.reducer,i=o.prepare):n=o,s[t]=n,a[u]=n,c[t]=i?rn(u,i):rn(u)})),{name:e,reducer:function(t,e){return n||(n=u()),n(t,e)},actions:c,caseReducers:s,getInitialState:function(){return n||(n=u()),n.getInitialState()}}}var an=["name","message","stack","code"],cn=function(t,e){this.payload=t,this.meta=e},un=function(t,e){this.payload=t,this.meta=e},ln=function(t){if("object"==typeof t&&null!==t){for(var e={},n=0,i=an;n<i.length;n++){var r=i[n];"string"==typeof t[r]&&(e[r]=t[r])}return e}return{message:String(t)}};function fn(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,n){var i=rn(t+"/fulfilled",(function(t,e,n,i){return{payload:t,meta:Xe(Ze({},i||{}),{arg:n,requestId:e,requestStatus:"fulfilled"})}})),r=rn(t+"/pending",(function(t,e,n){return{payload:void 0,meta:Xe(Ze({},n||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),o=rn(t+"/rejected",(function(t,e,i,r,o){return{payload:r,error:(n&&n.serializeError||ln)(t||"Rejected"),meta:Xe(Ze({},o||{}),{arg:i,requestId:e,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),s="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(a,c,u){var l,f=(null==n?void 0:n.idGenerator)?n.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",n=t;n--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),h=new s;function d(t){l=t,h.abort()}var v=function(){return s=this,v=null,p=function(){var s,v,p,b,x,m;return Be(this,(function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),b=null==(s=null==n?void 0:n.condition)?void 0:s.call(n,t,{getState:c,extra:u}),null===(w=b)||"object"!=typeof w||"function"!=typeof w.then?[3,2]:[4,b];case 1:b=y.sent(),y.label=2;case 2:if(!1===b||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return x=new Promise((function(t,e){return h.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:l||"Aborted"})}))})),a(r(f,t,null==(v=null==n?void 0:n.getPendingMeta)?void 0:v.call(n,{requestId:f,arg:t},{getState:c,extra:u}))),[4,Promise.race([x,Promise.resolve(e(t,{dispatch:a,getState:c,extra:u,requestId:f,signal:h.signal,abort:d,rejectWithValue:function(t,e){return new cn(t,e)},fulfillWithValue:function(t,e){return new un(t,e)}})).then((function(e){if(e instanceof cn)throw e;return e instanceof un?i(e.payload,f,t,e.meta):i(e,f,t)}))])];case 3:return p=y.sent(),[3,5];case 4:return m=y.sent(),p=m instanceof cn?o(null,f,t,m.payload,m.meta):o(m,f,t),[3,5];case 5:return n&&!n.dispatchConditionRejection&&o.match(p)&&p.meta.condition||a(p),[2,p]}var w}))},new Promise((function(t,e){var n=function(t){try{r(p.next(t))}catch(t){e(t)}},i=function(t){try{r(p.throw(t))}catch(t){e(t)}},r=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(n,i)};r((p=p.apply(s,v)).next())}));var s,v,p}();return Object.assign(v,{abort:d,requestId:f,arg:t,unwrap:function(){return v.then(fn)}})}}),{pending:r,rejected:o,fulfilled:i,typePrefix:t})}t.withTypes=function(){return t}}();var hn,dn,vn,pn="listenerMiddleware";rn(pn+"/add"),rn(pn+"/removeAll"),rn(pn+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var n=r[t];return n?n.enumerable=e:r[t]=n={configurable:!0,enumerable:e,get:function(){var e=this[he];return xe.get(e,t)},set:function(e){var n=this[he];xe.set(n,t,e)}},n}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][he];if(!r.P)switch(r.i){case 5:i(r)&&Yt(r);break;case 4:n(r)&&Yt(r)}}}function n(t){for(var e=t.t,n=t.k,i=ve(n),r=i.length-1;r>=0;r--){var o=i[r];if(o!==he){var s=e[o];if(void 0===s&&!kt(e,o))return!0;var a=n[o],c=a&&a[he];if(c?c.t!==s:!$t(a,s))return!0}}var u=!!e[he];return i.length!==ve(e).length+(u?0:1)}function i(t){var e=t.k;if(e.length!==t.t.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);if(n&&!n.get)return!0;for(var i=0;i<e.length;i++)if(!e.hasOwnProperty(i))return!0;return!1}var r={};!function(t,e){be[t]||(be[t]=e)}("ES5",{J:function(e,n){var i=Array.isArray(e),r=function(e,n){if(e){for(var i=Array(n.length),r=0;r<n.length;r++)Object.defineProperty(i,""+r,t(r,!0));return i}var o=pe(n);delete o[he];for(var s=ve(o),a=0;a<s.length;a++){var c=s[a];o[c]=t(c,e||!!o[c].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(i,e),o={i:i?5:4,A:n?n.A:Wt(),P:!1,I:!1,R:{},l:n,t:e,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,he,{value:o,writable:!0}),r},S:function(t,n,r){r?Ct(n)&&n[he].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var n=e[he];if(n){var r=n.t,o=n.k,s=n.R,a=n.i;if(4===a)Rt(o,(function(e){e!==he&&(void 0!==r[e]||kt(r,e)?s[e]||t(o[e]):(s[e]=!0,Yt(n)))})),Rt(r,(function(t){void 0!==o[t]||kt(o,t)||(s[t]=!1,Yt(n))}));else if(5===a){if(i(n)&&(Yt(n),s.length=!0),o.length<r.length)for(var c=o.length;c<r.length;c++)s[c]=!1;else for(var u=r.length;u<o.length;u++)s[u]=!0;for(var l=Math.min(o.length,r.length),f=0;f<l;f++)o.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(o[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?n(t):i(t)}})}();const bn=t=>{const e=null!=t?t:{};return(t,n)=>{var i;const r={hasChanged:(t,e)=>!u(t,e),attribute:!1,...e};s(r)(t,n);const o=t;o.reduxProperties=o.reduxProperties||new Map,o.reduxProperties.set(n,{selector:null!==(i=e.selector)&&void 0!==i?i:t=>t[n],store:e.store})}},xn=Symbol("internalReduxEventsUnsubscribers"),mn=Symbol("internalStoresUnsubscribers"),yn=Symbol("internalStores");class wn extends St{constructor(){super(...arguments),this[hn]=new Map,this[dn]=new Map,this[vn]=[]}updated(t){var e;super.updated(t),(null===(e=this.reduxReactiveProperties)||void 0===e?void 0:e.some((e=>t.has(e))))&&this.updateFromStores()}getUnnamedStore(){if(this[yn].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[yn].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[yn].get(t)}addStore(t,e){var n;e=null!==(n=null!=e?e:gn(t)?t.name:void 0)&&void 0!==n?n:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[yn].delete(e)}setupStore(t,e){this[yn].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[yn].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const n=this.constructor.getPropertyOptions(e);if(!(null==n?void 0:n.attribute)||!this.hasAttribute("string"==typeof(null==n?void 0:n.attribute)?n.attribute:e)){const n=this.getStore(t.store);n&&(this[e]=t.selector(n.getState(),this))}}))}subscribeToStore(t,e){var n;this[mn].set(t,e.subscribe((()=>this.updateFromStores()))),gn(e)&&e.eventBus&&(null===(n=this.reduxEventListeners)||void 0===n||n.forEach(((t,n)=>{if("function"==typeof this[n]&&(!t.store||e.name===t.store)){const i=t=>this[n](t);e.eventBus.addEventListener(t.eventName,i),this[xn].push((()=>e.eventBus.removeEventListener(t.eventName,i)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this[mn]).forEach((t=>this.unsubscribeFromStore(t))),this[xn].forEach((t=>t())),this[xn]=[]}unsubscribeFromStore(t){this[mn].has(t)&&this[mn].get(t)(),this[mn].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function gn(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}hn=mn,dn=yn,vn=xn;class On{static get(t){window.ftReduxStores||(window.ftReduxStores={});const e="string"==typeof t?t:t.name,n="string"==typeof t?void 0:t,i=window.ftReduxStores[e];if(gn(i))return i;if(null==n)return;const r=sn(n),o=nn({reducer:(t,e)=>"CLEAR_FT_REDUX_STORE"===e.type?r.getInitialState():r.reducer(t,e)});return window.ftReduxStores[n.name]=new On(r,o)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,n)=>{const i=t[e];if(i)return(...t)=>{const e=i(...t);return this.reduxStore.dispatch(e),e}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var Sn,jn;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(jn=null===(Sn=window.safari)||void 0===Sn?void 0:Sn.pushNotification)||void 0===jn||jn.toString());const En={colorError:pt.external(bt.colorError,"Design system"),fontFamily:pt.external(bt.contentFont,"Design system")},Cn=m`
|
|
93
93
|
.topic {
|
|
94
|
-
font-family: ${
|
|
94
|
+
font-family: ${En.fontFamily};
|
|
95
95
|
overflow-x: auto;
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -100,23 +100,23 @@ var ft,ht;let dt=class extends M{constructor(){super(...arguments),this.renderOp
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.topic-on-error ft-icon {
|
|
103
|
-
color: ${
|
|
103
|
+
color: ${En.colorError}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
.topic-loading {
|
|
107
107
|
height: 100vh;
|
|
108
108
|
}
|
|
109
|
-
`;var
|
|
109
|
+
`;var Nn=function(t,e,n,i){for(var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class Rn extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const Mn=Symbol("registerInterval");class kn extends(function(t){var e;class n extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[Mn]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Mn]):this.dispatchEvent(new Rn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Mn,Nn([a()],n.prototype,"stateManager",void 0),n}(wn)){}var An=function(t,e,n,i){for(var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class $n extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const Un=Symbol("registerInterval");class Pn extends(function(t){var e;class n extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[Un]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[Un]):this.dispatchEvent(new $n)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=Un,An([a()],n.prototype,"tocNode",void 0),An([a()],n.prototype,"disableContextInteractions",void 0),n}(kn)){}
|
|
110
110
|
/**
|
|
111
111
|
* @license
|
|
112
112
|
* Copyright 2017 Google LLC
|
|
113
113
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
114
|
-
*/const
|
|
114
|
+
*/const Fn=2;class Ln{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
115
115
|
/**
|
|
116
116
|
* @license
|
|
117
117
|
* Copyright 2017 Google LLC
|
|
118
118
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
119
|
-
*/class
|
|
119
|
+
*/class Tn extends Ln{constructor(t){if(super(t),this.et=Q,t.type!==Fn)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Q||null==t)return this.ft=void 0,this.et=t;if(t===G)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Tn.directiveName="unsafeHTML",Tn.resultType=1;const _n=(t=>(...e)=>({_$litDirective$:t,values:e}))(Tn);var In,Bn;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(In||(In={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Bn||(Bn={})),new Map([...["abw"].map((t=>[t,Bn.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Bn.AUDIO])),...["avi"].map((t=>[t,Bn.AVI])),...["chm","xhs"].map((t=>[t,Bn.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Bn.CODE])),...["csv"].map((t=>[t,Bn.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Bn.DITA])),...["epub"].map((t=>[t,Bn.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Bn.EXCEL])),...["flac"].map((t=>[t,Bn.FLAC])),...["gif"].map((t=>[t,Bn.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Bn.GZIP])),...["html","htm","xhtml"].map((t=>[t,Bn.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Bn.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Bn.JPEG])),...["json"].map((t=>[t,Bn.JSON])),...["m4a","m4p"].map((t=>[t,Bn.M4A])),...["mov","qt"].map((t=>[t,Bn.MOV])),...["mp3"].map((t=>[t,Bn.MP3])),...["mp4","m4v"].map((t=>[t,Bn.MP4])),...["ogg","oga"].map((t=>[t,Bn.OGG])),...["pdf","ps"].map((t=>[t,Bn.PDF])),...["png"].map((t=>[t,Bn.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Bn.POWERPOINT])),...["rar"].map((t=>[t,Bn.RAR])),...["stp"].map((t=>[t,Bn.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Bn.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Bn.VIDEO])),...["wav"].map((t=>[t,Bn.WAV])),...["wma"].map((t=>[t,Bn.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Bn.WORD])),...["xml","xsl","rdf"].map((t=>[t,Bn.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Bn.YAML])),...["zip"].map((t=>[t,Bn.ZIP]))]);const Wn=pt.create("--ft-icon-font-size","SIZE","24px"),Dn=pt.extend("--ft-icon-fluid-topics-font-family",pt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),Kn=pt.extend("--ft-icon-file-format-font-family",pt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),zn=pt.extend("--ft-icon-material-font-family",pt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),Hn=pt.create("--ft-icon-vertical-align","UNKNOWN","unset"),qn=m`
|
|
120
120
|
:host, i.ft-icon {
|
|
121
121
|
display: inline-flex;
|
|
122
122
|
align-items: center;
|
|
@@ -125,14 +125,14 @@ var ft,ht;let dt=class extends M{constructor(){super(...arguments),this.renderOp
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
:host {
|
|
128
|
-
width: ${
|
|
129
|
-
height: ${
|
|
128
|
+
width: ${Wn};
|
|
129
|
+
height: ${Wn};
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
i.ft-icon {
|
|
133
133
|
width: 100%;
|
|
134
134
|
height: 100%;
|
|
135
|
-
font-size: ${
|
|
135
|
+
font-size: ${Wn};
|
|
136
136
|
line-height: 1;
|
|
137
137
|
font-weight: normal;
|
|
138
138
|
text-transform: none;
|
|
@@ -143,47 +143,47 @@ var ft,ht;let dt=class extends M{constructor(){super(...arguments),this.renderOp
|
|
|
143
143
|
text-rendering: auto;
|
|
144
144
|
-webkit-font-smoothing: antialiased;
|
|
145
145
|
-moz-osx-font-smoothing: grayscale;
|
|
146
|
-
vertical-align: ${
|
|
146
|
+
vertical-align: ${Hn};
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
i.ft-icon.ft-icon--fluid-topics {
|
|
150
|
-
font-family: ${
|
|
150
|
+
font-family: ${Dn}, ft-icons, fticons, sans-serif;
|
|
151
151
|
|
|
152
152
|
/* Ugly fix because font is broken */
|
|
153
|
-
font-size: calc(0.75 * ${
|
|
154
|
-
line-height: ${
|
|
153
|
+
font-size: calc(0.75 * ${Wn});
|
|
154
|
+
line-height: ${Wn};
|
|
155
155
|
position: relative;
|
|
156
156
|
top: -4%;
|
|
157
157
|
justify-content: center;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
.ft-icon--file-format {
|
|
161
|
-
font-family: ${
|
|
161
|
+
font-family: ${Kn}, ft-mime, sans-serif;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
.ft-icon--material {
|
|
165
|
-
font-family: ${
|
|
165
|
+
font-family: ${zn}, "Material Icons", sans-serif;
|
|
166
166
|
}
|
|
167
|
-
`;var
|
|
167
|
+
`;var Vn;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Vn||(Vn={}));var Jn=function(t,e,n,i){for(var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class Zn extends St{constructor(){super(...arguments),this.resolvedIcon=Q}render(){const t=this.variant&&Object.values(Vn).includes(this.variant)?this.variant:Vn.fluid_topics,e=t!==Vn.material||!!this.value;return X`
|
|
168
168
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
169
|
-
${
|
|
169
|
+
${_n(this.resolvedIcon)}
|
|
170
170
|
<slot ?hidden=${e}></slot>
|
|
171
171
|
</i>
|
|
172
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let n=this.value||this.textContent;switch(this.variant){case
|
|
172
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let n=this.value||this.textContent;switch(this.variant){case Vn.file_format:this.resolvedIcon=null!==(t=Bn[n.replace("-","_").toUpperCase()])&&void 0!==t?t:n;break;case Vn.material:this.resolvedIcon=this.value||Q;break;default:this.resolvedIcon=null!==(e=In[n.replace("-","_").toUpperCase()])&&void 0!==e?e:n}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Zn.elementDefinitions={},Zn.styles=qn,Jn([s()],Zn.prototype,"variant",void 0),Jn([s()],Zn.prototype,"value",void 0),Jn([a()],Zn.prototype,"resolvedIcon",void 0),Jn([
|
|
173
173
|
/**
|
|
174
174
|
* @license
|
|
175
175
|
* Copyright 2017 Google LLC
|
|
176
176
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
177
177
|
*/
|
|
178
|
-
function(t,e){return(({finisher:t,descriptor:e})=>(n,i)=>{var r;if(void 0===i){const i=null!==(r=n.originalKey)&&void 0!==r?r:n.key,o=null!=e?{kind:"method",placement:"prototype",key:i,descriptor:e(n.key)}:{...n,key:i};return null!=t&&(o.finisher=function(e){t(e,i)}),o}{const r=n.constructor;void 0!==e&&Object.defineProperty(n,i,e(i)),null==t||t(r,i)}})({descriptor:n=>{const i={get(){var e,n;return null!==(n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof n?Symbol():"__"+n;i.get=function(){var n,i;return void 0===this[e]&&(this[e]=null!==(i=null===(n=this.renderRoot)||void 0===n?void 0:n.querySelector(t))&&void 0!==i?i:null),this[e]}}return i}})}("slot")],
|
|
179
|
-
`,
|
|
180
|
-
`,
|
|
178
|
+
function(t,e){return(({finisher:t,descriptor:e})=>(n,i)=>{var r;if(void 0===i){const i=null!==(r=n.originalKey)&&void 0!==r?r:n.key,o=null!=e?{kind:"method",placement:"prototype",key:i,descriptor:e(n.key)}:{...n,key:i};return null!=t&&(o.finisher=function(e){t(e,i)}),o}{const r=n.constructor;void 0!==e&&Object.defineProperty(n,i,e(i)),null==t||t(r,i)}})({descriptor:n=>{const i={get(){var e,n;return null!==(n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof n?Symbol():"__"+n;i.get=function(){var n,i;return void 0===this[e]&&(this[e]=null!==(i=null===(n=this.renderRoot)||void 0===n?void 0:n.querySelector(t))&&void 0!==i?i:null),this[e]}}return i}})}("slot")],Zn.prototype,"slottedContent",void 0),l("ft-icon")(Zn);const Xn=m`
|
|
179
|
+
`,Gn=m`
|
|
180
|
+
`,Qn=On.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Yn{static build(t){const{baseUrl:e,apiIntegrationIdentifier:n}=Qn.getState(),i=null!=t?t:n;if(e&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,i,!0)}static get(t){var e;return null!=t?Yn.build(t):null!==(e=Yn.API)&&void 0!==e?e:Yn.API=Yn.build()}static await(t){return new Promise((e=>{let n=Yn.get(t);if(n)e(n);else{const i=Qn.subscribe((()=>{n=Yn.get(t),n&&(i(),e(n))}))}}))}}var ti;const ei=Symbol("clearAfterUnitTest");class ni{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new i,this.listeners={},this.currentUiLocale="",this[ti]=()=>{this.defaultMessages={},this.cache=new i,this.listeners={}},this.currentUiLocale=Qn.getState().uiLocale,Qn.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Qn.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 n;if(t=t.toLowerCase(),Object.keys(e).length>0){const i={...null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},...e};u(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...n){var i,r,o;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(r=null===(i=this.cache.getNow(t))||void 0===i?void 0:i.messages)&&void 0!==r?r:{};return new jt(null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},s).resolve(e,...n)}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 n;return t=t.toLowerCase(),this.listeners[t]=null!==(n=this.listeners[t])&&void 0!==n?n:new Set,this.listeners[t].add(e),()=>{var n;return null===(n=this.listeners[t])||void 0===n?void 0:n.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=>{return(e=0,new Promise((t=>setTimeout(t,e)))).then((()=>t())).catch((()=>null));var e})))}}ti=ei,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new ni((async(t,e)=>(await Yn.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new ni((async(t,e)=>(await Yn.await()).getCustomMessageContext(t,e))));const ii=window.FluidTopicsI18nService,ri=window.FluidTopicsCustomI18nService;var oi=function(t,e,n,i){for(var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class si extends St{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Yn.get(),this.cache=new i,this.cleanSessionDebouncer=new r}render(){return X`
|
|
181
181
|
<slot></slot>
|
|
182
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&
|
|
182
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&Qn.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Qn.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Qn.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Qn.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Qn.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Qn.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Qn.actions.setSession(this.session),t.has("availableUiLocales")&&Qn.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>ii.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}si.elementDefinitions={},si.styles=Gn,oi([s()],si.prototype,"baseUrl",void 0),oi([s()],si.prototype,"apiIntegrationIdentifier",void 0),oi([s()],si.prototype,"uiLocale",void 0),oi([f([])],si.prototype,"availableUiLocales",void 0),oi([s({type:Boolean})],si.prototype,"editorMode",void 0),oi([s({type:Boolean})],si.prototype,"noCustom",void 0),oi([s({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],si.prototype,"noCustomComponent",void 0),oi([s({type:Boolean})],si.prototype,"withManualResources",void 0),oi([f([])],si.prototype,"messageContexts",void 0),oi([f(void 0)],si.prototype,"session",void 0),oi([s({type:Object})],si.prototype,"apiProvider",void 0),l("ft-app-context")(si);var ai=function(t,e,n,i){for(var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};const ci=Symbol("i18nProperties"),ui=Symbol("i18nUnsubs");function li(t){var e;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?ri:ii}i18n(t,e,...n){var i;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...n);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 e;null===(e=this[ci])||void 0===e||e.forEach(((e,n)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[n]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[ci])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[ci]&&new Set([...this[ci].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[ui].has(t)||this[ui].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[ui].forEach((t=>t())),this[ui].clear()}}return e=ui,ai([s({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}class fi extends(li(St)){}class hi extends(li(wn)){}var di=function(t,e,n,i){for(var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class vi extends hi{constructor(){super(),this.editorMode=!1,this.addStore(Qn)}render(){return this.key&&this.context?X`
|
|
183
183
|
<span class="ft-i18n">
|
|
184
184
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
185
185
|
</span>
|
|
186
|
-
`:this.editorMode?"Select a context and a label key.":Q}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}
|
|
186
|
+
`:this.editorMode?"Select a context and a label key.":Q}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}vi.elementDefinitions={},vi.styles=Xn,di([bn()],vi.prototype,"editorMode",void 0),di([s()],vi.prototype,"context",void 0),di([s()],vi.prototype,"key",void 0),di([f([])],vi.prototype,"args",void 0),di([s()],vi.prototype,"defaultMessage",void 0);class pi{static build(t){return new pi(t)}static fromGwt(t){return new pi(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const n=e;return t=>({context:this.name,key:n,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>ii.resolveMessage(this.name,e,...t)})}}l("ft-i18n")(vi);const bi=pi.build("designedReaderTopicContent");var xi=function(t,e,n,i){for(var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};class mi extends Pn{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,e;return this.map&&(this.error||this.content)?X`
|
|
187
187
|
<style>
|
|
188
188
|
@import "${null===(t=this.map)||void 0===t?void 0:t.contentStyles.topicStylesheetUrl}";
|
|
189
189
|
</style>
|
|
@@ -192,15 +192,15 @@ function(t,e){return(({finisher:t,descriptor:e})=>(n,i)=>{var r;if(void 0===i){c
|
|
|
192
192
|
</section>
|
|
193
193
|
`:X`
|
|
194
194
|
<section class="topic-loading"></section>
|
|
195
|
-
`}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode.contentId).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,n,i,r,o,s;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(n=this.tocNode)||void 0===n?void 0:n.tocId)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)===this.scrollTarget.tocId&&this.content){(null!==(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==o?o:this).scrollIntoView({block:"start"}),null===(s=this.stateManager)||void 0===s||s.scrollDone()}}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,n,i;if(this.error)return X`
|
|
195
|
+
`}updated(t){super.updated(t),(t.has("map")||t.has("tocNode"))&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.map&&this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode.contentId).then((t=>this.content=t||'<div class="empty-topic"></div>')).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,n,i,r,o,s,a;if(super.contentAvailableCallback(t),!this.disableContextInteractions&&(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&(null===(n=this.tocNode)||void 0===n?void 0:n.tocId)&&(null===(i=this.tocNode)||void 0===i?void 0:i.tocId)===this.scrollTarget.tocId&&this.content){(null!==(o=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==o?o:this).scrollIntoView({block:"start"}),null===(s=this.stateManager)||void 0===s||s.scrollDone()}const c=null===(a=this.shadowRoot)||void 0===a?void 0:a.querySelector("section.topic");c&&this.onContentAvailable(c,this.shadowRoot)}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,n,i;if(this.error)return X`
|
|
196
196
|
<div class="topic-on-error">
|
|
197
197
|
<ft-icon>WARNING</ft-icon>
|
|
198
198
|
<div>
|
|
199
|
-
${this.is404Error()?
|
|
199
|
+
${this.is404Error()?bi.messages.topicMissingAdvice():bi.messages.somethingWentWrong()}
|
|
200
200
|
</div>
|
|
201
201
|
</div>
|
|
202
202
|
`;const r=null!==(e=null===(t=this.map)||void 0===t?void 0:t.contentStyles.customCssClasses.join(" "))&&void 0!==e?e:"";return X`
|
|
203
203
|
<div class="depth-${null===(n=this.tocNode)||void 0===n?void 0:n.depth} content-locale-${null===(i=this.map)||void 0===i?void 0:i.lang} ${r}">
|
|
204
|
-
${
|
|
204
|
+
${null!=this.content?_n(`${this.contentPreprocessor(this.content)}`):Q}
|
|
205
205
|
</div>
|
|
206
|
-
`}is404Error(){return 404===this.error.status}}
|
|
206
|
+
`}is404Error(){return 404===this.error.status}}mi.styles=Cn,xi([bn()],mi.prototype,"map",void 0),xi([bn()],mi.prototype,"scrollTarget",void 0),xi([a()],mi.prototype,"content",void 0),xi([a()],mi.prototype,"error",void 0),xi([s({attribute:!1})],mi.prototype,"contentPreprocessor",void 0),xi([s({attribute:!1})],mi.prototype,"onContentAvailable",void 0),l("ft-reader-topic-content")(mi),t.FtReaderTopicContent=mi,t.FtReaderTopicContentCssVariables=En,t.styles=Cn}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-topic-content",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.43",
|
|
4
4
|
"description": "Content of a topic in integrated reader.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-chip": "1.0.
|
|
23
|
-
"@fluid-topics/ft-i18n": "1.0.
|
|
24
|
-
"@fluid-topics/ft-reader-context": "1.0.
|
|
25
|
-
"@fluid-topics/ft-reader-topic-context": "1.0.
|
|
26
|
-
"@fluid-topics/ft-tooltip": "1.0.
|
|
27
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-chip": "1.0.43",
|
|
23
|
+
"@fluid-topics/ft-i18n": "1.0.43",
|
|
24
|
+
"@fluid-topics/ft-reader-context": "1.0.43",
|
|
25
|
+
"@fluid-topics/ft-reader-topic-context": "1.0.43",
|
|
26
|
+
"@fluid-topics/ft-tooltip": "1.0.43",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "1.0.43",
|
|
28
28
|
"@fluid-topics/public-api": "1.0.39",
|
|
29
29
|
"lit": "2.7.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "a67b8727b254b72302e36166d89f998545bacf8f"
|
|
32
32
|
}
|