@fluid-topics/ft-reader-feedback 1.1.2 → 1.1.3
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.
- package/build/ft-reader-feedback.min.js +33 -33
- package/package.json +5 -5
|
@@ -12,38 +12,38 @@
|
|
|
12
12
|
* subject to an additional IP rights grant found at
|
|
13
13
|
* http://polymer.github.io/PATENTS.txt
|
|
14
14
|
*/
|
|
15
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;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 s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);d(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let h=i.call(o,t);h||(h=f(t),e.call(o,t,h)),this===window.customElements&&(a.set(r,c),c.standInClass=h);const u=this._awaitingUpgrade.get(t);if(u){this._awaitingUpgrade.delete(t);for(const t of u)n.delete(t),p(t,c,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){g.push(this),o.upgrade.apply(o,arguments),g.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 i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=a.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},f=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,r=o._getDefinition(e);return r?p(i,r):n.set(i,o),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.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)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,r),i.call(this,n,t,r)}else o.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o),i.call(this,o,t,null)}else r.call(this,o)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,o){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,o);const e=this.getAttribute(r);i.call(this,r,t,e)}else n.call(this,r,o)})},u=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t?Object.setPrototypeOf(e,window.HTMLElement):u(i)},p=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){u(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=y.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let g=[document];const b=(t,e,i=void 0)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){g.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&s.set(t,this),g.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const v=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){g.push(this),i.set.call(this,t),g.pop()}})};if(v(Element,"innerHTML"),v(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,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0===r.get(i).formAssociated)return o?.call(this,...e);throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),r=e.get(o)||[];this[+i]=t,r.push(t),e.set(o,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(ga){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{if(null!==i)try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e extends Error{constructor(t,e,i){super(t),this.canceledPromiseResult=e,this.canceledPromiseError=i}}class i extends Promise{constructor(t){super(((i,o)=>t((t=>{this.isCanceled?o(new e("Promise has been canceled",t)):i(t)}),(t=>{this.isCanceled?o(new e("Promise has been canceled",void 0,t)):o(t)})))),this.isCanceled=!1}cancel(){this.isCanceled=!0}}class o{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 i&&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,o){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 i(((e,i)=>t.then(e).catch(i))))(e());return this.content[t]=r,r.then((e=>(this.content[t]=e,null!=o&&(this.clearClearTimeout(t),this.clearTimeouts[t]=window.setTimeout((()=>this.clear(t)),o)),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 i=[...this.callbacks];this.callbacks=[];const o=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 i)try{await t()}catch(t){return void o(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
15
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;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 s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);d(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let h=i.call(o,t);h||(h=f(t),e.call(o,t,h)),this===window.customElements&&(a.set(r,c),c.standInClass=h);const u=this._awaitingUpgrade.get(t);if(u){this._awaitingUpgrade.delete(t);for(const t of u)n.delete(t),p(t,c,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){g.push(this),o.upgrade.apply(o,arguments),g.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 i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=a.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},f=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=h(i)||window.customElements,r=o._getDefinition(e);return r?p(i,r):n.set(i,o),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.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)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,r),i.call(this,n,t,r)}else o.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o),i.call(this,o,t,null)}else r.call(this,o)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,o){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,o);const e=this.getAttribute(r);i.call(this,r,t,e)}else n.call(this,r,o)})},u=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t?Object.setPrototypeOf(e,window.HTMLElement):u(i)},p=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){u(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=y.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let g=[document];const b=(t,e,i=void 0)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){g.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&s.set(t,this),g.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const v=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){g.push(this),i.set.call(this,t),g.pop()}})};if(v(Element,"innerHTML"),v(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,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0===r.get(i).formAssociated)return o?.call(this,...e);throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),r=e.get(o)||[];this[+i]=t,r.push(t),e.set(o,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(ga){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{if(null!==i)try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e extends Error{constructor(t,e,i){super(t),this.canceledPromiseResult=e,this.canceledPromiseError=i}}class i extends Promise{constructor(t){super(((i,o)=>t((t=>{this.isCanceled?o(new e("Promise has been canceled",t)):i(t)}),(t=>{this.isCanceled?o(new e("Promise has been canceled",void 0,t)):o(t)})))),this.isCanceled=!1}cancel(){this.isCanceled=!0}}class o{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 i&&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,o){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 i(((e,i)=>t.then(e).catch(i))))(e());return this.content[t]=r,r.then((e=>(this.content[t]=e,null!=o&&(this.clearClearTimeout(t),this.clearTimeouts[t]=window.setTimeout((()=>this.clear(t)),o)),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)}}
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2019 Google LLC
|
|
19
19
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
|
-
*/const
|
|
20
|
+
*/const r=globalThis,n=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),s=new WeakMap;const l=t=>new class{constructor(t,e,i){if(this._$cssResult$=!0,i!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(n&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&s.set(e,t))}return t}toString(){return this.cssText}}("string"==typeof t?t:t+"",void 0,a),c=n?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return l(e)})(t):t
|
|
21
21
|
/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/,{is:
|
|
25
|
+
*/,{is:h,defineProperty:f,getOwnPropertyDescriptor:d,getOwnPropertyNames:u,getOwnPropertySymbols:p,getPrototypeOf:y}=Object,g=globalThis,b=g.trustedTypes,v=b?b.emptyScript:"",m=g.reactiveElementPolyfillSupport,x=(t,e)=>t,w={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},O=(t,e)=>!h(t,e),S={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:O};Symbol.metadata??=Symbol("metadata"),g.litPropertyMetadata??=new WeakMap;let $=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=S){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&f(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:r}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return o?.call(this)},set(e){const n=o?.call(this);r.call(this,e),this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??S}static _$Ei(){if(this.hasOwnProperty(x("elementProperties")))return;const t=y(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x("properties"))){const t=this.properties,e=[...u(t),...p(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(c(t))}else void 0!==t&&e.push(c(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(n)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),o=r.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:w).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:w;this._$Em=o,this[o]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i,o=!1,r){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??O)(o?r:this[t],e))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[x("elementProperties")]=new Map,$[x("finalized")]=new Map,m?.({ReactiveElement:$}),(g.reactiveElementVersions??=[]).push("2.0.2");
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright 2017 Google LLC
|
|
29
29
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
30
30
|
*/
|
|
31
|
-
const
|
|
31
|
+
const N={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:O},C=(t=N,e,i)=>{const{kind:o,metadata:r}=i;let n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const r=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,r,t)},init(e){return void 0!==e&&this.C(o,void 0,t),e}}}if("setter"===o){const{name:o}=i;return function(i){const r=this[o];e.call(this,i),this.requestUpdate(o,r,t)}}throw Error("Unsupported decorator location: "+o)};function E(t){return(e,i)=>"object"==typeof i?C(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,o?{...t,wrapped:!0}:t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)
|
|
32
32
|
/**
|
|
33
33
|
* @license
|
|
34
34
|
* Copyright 2017 Google LLC
|
|
35
35
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
36
|
-
*/}function
|
|
36
|
+
*/}function k(t){return E({...t,state:!0,attribute:!1})}
|
|
37
37
|
/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/const
|
|
41
|
+
*/const R=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,i)
|
|
42
42
|
/**
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright 2017 Google LLC
|
|
45
45
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
|
-
*/;function
|
|
46
|
+
*/;function I(t,e){return(i,o,r)=>{const n=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof o?i:r??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return R(0,0,{get(){let i=t.call(this);return void 0===i&&(i=n(this),(null!==i||this.hasUpdated)&&e.call(this,i)),i}})}return R(0,0,{get(){return n(this)}})}}
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2021 Google LLC
|
|
@@ -54,7 +54,7 @@ const C={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:S},E=(t=C,e,
|
|
|
54
54
|
* Copyright 2017 Google LLC
|
|
55
55
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
56
56
|
*/
|
|
57
|
-
function
|
|
57
|
+
function U(t){return(e,i)=>{const{slot:o}=t??{},r="slot"+(o?`[name=${o}]`:":not([name])");return R(0,0,{get(){const e=this.renderRoot?.querySelector(r);return e?.assignedNodes(t)??[]}})}}class L{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 i=[...this.callbacks];this.callbacks=[];const o=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 i)try{await t()}catch(t){return void o(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}const A=t=>new Promise((e=>setTimeout(e,t)));function _(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,o,r;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(o=i;0!=o--;)if(!_(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!_(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(r=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,r[o]))return!1;for(o=i;0!=o--;){var n=r[o];if(!_(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}const T=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function W(t,e){const i=()=>JSON.parse(JSON.stringify(t));return E({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!_(t,e),...null!=e?e:{}})}
|
|
58
58
|
/**
|
|
59
59
|
* @license
|
|
60
60
|
* Copyright 2017 Google LLC
|
|
@@ -87,7 +87,7 @@ let $e=class extends Bt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
87
87
|
* @license
|
|
88
88
|
* Copyright 2019 Google LLC
|
|
89
89
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
90
|
-
*/const Te=window,We=Te.ShadowRoot&&(void 0===Te.ShadyCSS||Te.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;class De extends $e{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,i])=>t.registry.define(e,i))));const e={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(e);return((t,e)=>{We?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=Te.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(i,t.elementStyles),i}}var Fe,Pe=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Me=Symbol("constructorPrototype"),ze=Symbol("constructorName"),je=Symbol("exportpartsDebouncer");class Be extends De{constructor(){super(),this[Fe]=new
|
|
90
|
+
*/const Te=window,We=Te.ShadowRoot&&(void 0===Te.ShadyCSS||Te.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;class De extends $e{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,i])=>t.registry.define(e,i))));const e={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(e);return((t,e)=>{We?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=Te.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(i,t.elementStyles),i}}var Fe,Pe=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Me=Symbol("constructorPrototype"),ze=Symbol("constructorName"),je=Symbol("exportpartsDebouncer");class Be extends De{constructor(){super(),this[Fe]=new L(5),this[ze]=this.constructor.name,this[Me]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ze]&&Object.setPrototypeOf(this,this[Me])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[je].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,r,n,a;const s=t=>null!=t&&t.trim().length>0,l=t.filter(s).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==r?r:[],i=null!==(a=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==a?a:[];new Array(...e,...i).filter(s).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const h=[...c.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...h].join(", "))}}Fe=je,Pe([E()],Be.prototype,"exportpartsPrefix",void 0),Pe([W([])],Be.prototype,"exportpartsPrefixes",void 0),Pe([E()],Be.prototype,"customStylesheet",void 0);const Ke=Ee.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");Et`
|
|
91
91
|
.highlight-html-match {
|
|
92
92
|
background: ${Ke};
|
|
93
93
|
}
|
|
@@ -123,7 +123,7 @@ let $e=class extends Bt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
123
123
|
display: inline-block;
|
|
124
124
|
width: 0;
|
|
125
125
|
}
|
|
126
|
-
`;class Ge{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);let r=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),r}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${String(t)}[\\=${i}]`;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 i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function Ve(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var qe,Ye,Xe;const Je=Symbol("internalReduxEventsUnsubscribers"),Qe=Symbol("internalStoresUnsubscribers"),ti=Symbol("internalStores");class ei extends Be{constructor(){super(...arguments),this[qe]=new Map,this[Ye]=new Map,this[Xe]=[]}update(t){var e;super.update(t),(null===(e=this.reduxReactiveProperties)||void 0===e?void 0:e.some((e=>t.has(e))))&&this.updateFromStores()}getUnnamedStore(){if(this[ti].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ti].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[ti].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:Ve(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[ti].delete(e)}setupStore(t,e){this[ti].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[ti].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(t.store?this[Qe].has(t.store):this[Qe].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[Qe].set(t,e.subscribe((()=>this.updateFromStores()))),Ve(e)&&e.eventBus&&(null===(i=this.reduxEventListeners)||void 0===i||i.forEach(((t,i)=>{if("function"==typeof this[i]&&(!t.store||e.name===t.store)){const o=t=>this[i](t);e.eventBus.addEventListener(t.eventName,o),this[Je].push((()=>e.eventBus.removeEventListener(t.eventName,o)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Qe].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[Je].forEach((t=>t())),this[Je]=[]}unsubscribeFromStore(t){this[Qe].has(t)&&this[Qe].get(t)(),this[Qe].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function ii(t){for(var e=arguments.length,i=Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function oi(t){return!!t&&!!t[Bi]}function ri(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 i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===Ki}(t)||Array.isArray(t)||!!t[ji]||!!(null===(e=t.constructor)||void 0===e?void 0:e[ji])||hi(t)||fi(t))}function ni(t,e,i){void 0===i&&(i=!1),0===ai(t)?(i?Object.keys:Zi)(t).forEach((function(o){i&&"symbol"==typeof o||e(o,t[o],t)})):t.forEach((function(i,o){return e(o,i,t)}))}function ai(t){var e=t[Bi];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:hi(t)?2:fi(t)?3:0}function si(t,e){return 2===ai(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function li(t,e,i){var o=ai(t);2===o?t.set(e,i):3===o?t.add(i):t[e]=i}function ci(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function hi(t){return Fi&&t instanceof Map}function fi(t){return Pi&&t instanceof Set}function di(t){return t.o||t.t}function ui(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Hi(t);delete e[Bi];for(var i=Zi(e),o=0;o<i.length;o++){var r=i[o],n=e[r];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(e[r]={configurable:!0,writable:!0,enumerable:n.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function pi(t,e){return void 0===e&&(e=!1),gi(t)||oi(t)||!ri(t)||(ai(t)>1&&(t.set=t.add=t.clear=t.delete=yi),Object.freeze(t),e&&ni(t,(function(t,e){return pi(e,!0)}),!0)),t}function yi(){ii(2)}function gi(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function bi(t){var e=Gi[t];return e||ii(18,t),e}function vi(){return Wi}function mi(t,e){e&&(bi("Patches"),t.u=[],t.s=[],t.v=e)}function xi(t){wi(t),t.p.forEach(Si),t.p=null}function wi(t){t===Wi&&(Wi=t.l)}function Oi(t){return Wi={p:[],l:Wi,h:t,m:!0,_:0}}function Si(t){var e=t[Bi];0===e.i||1===e.i?e.j():e.g=!0}function $i(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.h.O||bi("ES5").S(e,t,o),o?(i[Bi].P&&(xi(e),ii(4)),ri(t)&&(t=Ni(e,t),e.l||Ei(e,t)),e.u&&bi("Patches").M(i[Bi].t,t,e.u,e.s)):t=Ni(e,i,[]),xi(e),e.u&&e.v(e.u,e.s),t!==zi?t:void 0}function Ni(t,e,i){if(gi(e))return e;var o=e[Bi];if(!o)return ni(e,(function(r,n){return Ci(t,o,e,r,n,i)}),!0),e;if(o.A!==t)return e;if(!o.P)return Ei(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var r=4===o.i||5===o.i?o.o=ui(o.k):o.o,n=r,a=!1;3===o.i&&(n=new Set(r),r.clear(),a=!0),ni(n,(function(e,n){return Ci(t,o,r,e,n,i,a)})),Ei(t,r,!1),i&&t.u&&bi("Patches").N(o,i,t.u,t.s)}return o.o}function Ci(t,e,i,o,r,n,a){if(oi(r)){var s=Ni(t,r,n&&e&&3!==e.i&&!si(e.R,o)?n.concat(o):void 0);if(li(i,o,s),!oi(s))return;t.m=!1}else a&&i.add(r);if(ri(r)&&!gi(r)){if(!t.h.D&&t._<1)return;Ni(t,r),e&&e.A.l||Ei(t,r)}}function Ei(t,e,i){void 0===i&&(i=!1),!t.l&&t.h.D&&t.m&&pi(e,i)}function ki(t,e){var i=t[Bi];return(i?di(i):t)[e]}function Ri(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var o=Object.getOwnPropertyDescriptor(i,e);if(o)return o;i=Object.getPrototypeOf(i)}}function Ii(t){t.P||(t.P=!0,t.l&&Ii(t.l))}function Ui(t){t.o||(t.o=ui(t.t))}function Li(t,e,i){var o=hi(e)?bi("MapSet").F(e,i):fi(e)?bi("MapSet").T(e,i):t.O?function(t,e){var i=Array.isArray(t),o={i:i?1:0,A:e?e.A:vi(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},r=o,n=Vi;i&&(r=[o],n=qi);var a=Proxy.revocable(r,n),s=a.revoke,l=a.proxy;return o.k=l,o.j=s,l}(e,i):bi("ES5").J(e,i);return(i?i.A:vi()).p.push(o),o}function Ai(t){return oi(t)||ii(22,t),function t(e){if(!ri(e))return e;var i,o=e[Bi],r=ai(e);if(o){if(!o.P&&(o.i<4||!bi("ES5").K(o)))return o.t;o.I=!0,i=_i(e,r),o.I=!1}else i=_i(e,r);return ni(i,(function(e,r){o&&function(t,e){return 2===ai(t)?t.get(e):t[e]}(o.t,e)===r||li(i,e,t(r))})),3===r?new Set(i):i}(t)}function _i(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ui(t)}qe=Qe,Ye=ti,Xe=Je;var Ti,Wi,Di="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Fi="undefined"!=typeof Map,Pi="undefined"!=typeof Set,Mi="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,zi=Di?Symbol.for("immer-nothing"):((Ti={})["immer-nothing"]=!0,Ti),ji=Di?Symbol.for("immer-draftable"):"__$immer_draftable",Bi=Di?Symbol.for("immer-state"):"__$immer_state",Ki=""+Object.prototype.constructor,Zi="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Hi=Object.getOwnPropertyDescriptors||function(t){var e={};return Zi(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},Gi={},Vi={get:function(t,e){if(e===Bi)return t;var i=di(t);if(!si(i,e))return function(t,e,i){var o,r=Ri(e,i);return r?"value"in r?r.value:null===(o=r.get)||void 0===o?void 0:o.call(t.k):void 0}(t,i,e);var o=i[e];return t.I||!ri(o)?o:o===ki(t.t,e)?(Ui(t),t.o[e]=Li(t.A.h,o,t)):o},has:function(t,e){return e in di(t)},ownKeys:function(t){return Reflect.ownKeys(di(t))},set:function(t,e,i){var o=Ri(di(t),e);if(null==o?void 0:o.set)return o.set.call(t.k,i),!0;if(!t.P){var r=ki(di(t),e),n=null==r?void 0:r[Bi];if(n&&n.t===i)return t.o[e]=i,t.R[e]=!1,!0;if(ci(i,r)&&(void 0!==i||si(t.t,e)))return!0;Ui(t),Ii(t)}return t.o[e]===i&&(void 0!==i||e in t.o)||Number.isNaN(i)&&Number.isNaN(t.o[e])||(t.o[e]=i,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==ki(t.t,e)||e in t.t?(t.R[e]=!1,Ui(t),Ii(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=di(t),o=Reflect.getOwnPropertyDescriptor(i,e);return o?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:o.enumerable,value:i[e]}:o},defineProperty:function(){ii(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ii(12)}},qi={};ni(Vi,(function(t,e){qi[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),qi.deleteProperty=function(t,e){return qi.set.call(this,t,e,void 0)},qi.set=function(t,e,i){return Vi.set.call(this,t[0],e,i,t[0])};var Yi=function(){function t(t){var e=this;this.O=Mi,this.D=!0,this.produce=function(t,i,o){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var n=e;return function(t){var e=this;void 0===t&&(t=r);for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return n.produce(t,(function(t){var o;return(o=i).call.apply(o,[e,t].concat(a))}))}}var a;if("function"!=typeof i&&ii(6),void 0!==o&&"function"!=typeof o&&ii(7),ri(t)){var s=Oi(e),l=Li(e,t,void 0),c=!0;try{a=i(l),c=!1}finally{c?xi(s):wi(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return mi(s,o),$i(t,s)}),(function(t){throw xi(s),t})):(mi(s,o),$i(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=i(t))&&(a=t),a===zi&&(a=void 0),e.D&&pi(a,!0),o){var h=[],f=[];bi("Patches").M(t,a,h,f),o(h,f)}return a}ii(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var o=arguments.length,r=Array(o>1?o-1:0),n=1;n<o;n++)r[n-1]=arguments[n];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var o,r,n=e.produce(t,i,(function(t,e){o=t,r=e}));return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return[t,o,r]})):[n,o,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){ri(t)||ii(8),oi(t)&&(t=Ai(t));var e=Oi(this),i=Li(this,t,void 0);return i[Bi].C=!0,wi(e),i},e.finishDraft=function(t,e){var i=(t&&t[Bi]).A;return mi(i,e),$i(void 0,i)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Mi&&ii(20),this.O=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var o=e[i];if(0===o.path.length&&"replace"===o.op){t=o.value;break}}i>-1&&(e=e.slice(i+1));var r=bi("Patches").$;return oi(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),Xi=new Yi,Ji=Xi.produce;function Qi(t){return Qi="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},Qi(t)}function to(t){var e=function(t,e){if("object"!==Qi(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!==Qi(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Qi(e)?e:String(e)}function eo(t,e,i){return(e=to(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function io(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function oo(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?io(Object(i),!0).forEach((function(e){eo(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):io(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function ro(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. "}Xi.produceWithPatches.bind(Xi),Xi.setAutoFreeze.bind(Xi),Xi.setUseProxies.bind(Xi),Xi.applyPatches.bind(Xi),Xi.createDraft.bind(Xi),Xi.finishDraft.bind(Xi);var no="function"==typeof Symbol&&Symbol.observable||"@@observable",ao=function(){return Math.random().toString(36).substring(7).split("").join(".")},so={INIT:"@@redux/INIT"+ao(),REPLACE:"@@redux/REPLACE"+ao(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ao()}};function lo(t,e,i){var o;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(ro(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(ro(1));return i(lo)(t,e)}if("function"!=typeof t)throw new Error(ro(2));var r=t,n=e,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(ro(3));return n}function f(t){if("function"!=typeof t)throw new Error(ro(4));if(l)throw new Error(ro(5));var e=!0;return c(),s.push(t),function(){if(e){if(l)throw new Error(ro(6));e=!1,c();var i=s.indexOf(t);s.splice(i,1),a=null}}}function d(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(ro(7));if(void 0===t.type)throw new Error(ro(8));if(l)throw new Error(ro(9));try{l=!0,n=r(n,t)}finally{l=!1}for(var e=a=s,i=0;i<e.length;i++){(0,e[i])()}return t}return d({type:so.INIT}),(o={dispatch:d,subscribe:f,getState:h,replaceReducer:function(t){if("function"!=typeof t)throw new Error(ro(10));r=t,d({type:so.REPLACE})}})[no]=function(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(ro(11));function i(){t.next&&t.next(h())}return i(),{unsubscribe:e(i)}}})[no]=function(){return this},t},o}function co(t){for(var e=Object.keys(t),i={},o=0;o<e.length;o++){var r=e[o];"function"==typeof t[r]&&(i[r]=t[r])}var n,a=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:so.INIT}))throw new Error(ro(12));if(void 0===i(void 0,{type:so.PROBE_UNKNOWN_ACTION()}))throw new Error(ro(13))}))}(i)}catch(t){n=t}return function(t,e){if(void 0===t&&(t={}),n)throw n;for(var o=!1,r={},s=0;s<a.length;s++){var l=a[s],c=i[l],h=t[l],f=c(h,e);if(void 0===f)throw e&&e.type,new Error(ro(14));r[l]=f,o=o||f!==h}return(o=o||a.length!==Object.keys(t).length)?r:t}}function ho(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];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 fo(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),o=function(){throw new Error(ro(15))},r={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},n=e.map((function(t){return t(r)}));return o=ho.apply(void 0,n)(i.dispatch),oo(oo({},i),{},{dispatch:o})}}}function uo(t){return function(e){var i=e.dispatch,o=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,o,t):e(r)}}}}var po=uo();po.withExtraArgument=uo;var yo,go=po,bo=(yo=function(t,e){return yo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},yo(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 i(){this.constructor=t}yo(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),vo=function(t,e){var i,o,r,n,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(r=2&n[0]?o.return:n[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,n[1])).done)return r;switch(o=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){a.label=n[1];break}if(6===n[0]&&a.label<r[1]){a.label=r[1],r=n;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(n);break}r[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],o=0}finally{i=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},mo=function(t,e){for(var i=0,o=e.length,r=t.length;i<o;i++,r++)t[r]=e[i];return t},xo=Object.defineProperty,wo=Object.defineProperties,Oo=Object.getOwnPropertyDescriptors,So=Object.getOwnPropertySymbols,$o=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable,Co=function(t,e,i){return e in t?xo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Eo=function(t,e){for(var i in e||(e={}))$o.call(e,i)&&Co(t,i,e[i]);if(So)for(var o=0,r=So(e);o<r.length;o++){i=r[o];No.call(e,i)&&Co(t,i,e[i])}return t},ko=function(t,e){return wo(t,Oo(e))},Ro="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ho:ho.apply(null,arguments)};var Io=function(t){function e(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return bo(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,mo([void 0],t[0].concat(this)))):new(e.bind.apply(e,mo([void 0],t.concat(this))))},e}(Array),Uo=function(t){function e(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return bo(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,mo([void 0],t[0].concat(this)))):new(e.bind.apply(e,mo([void 0],t.concat(this))))},e}(Array);function Lo(t){return ri(t)?Ji(t,(function(){})):t}function Ao(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var o=new Io;i&&(!function(t){return"boolean"==typeof t}(i)?o.push(go.withExtraArgument(i.extraArgument)):o.push(go));return o}(t)}}function _o(t){var e,i=Ao(),o=t||{},r=o.reducer,n=void 0===r?void 0:r,a=o.middleware,s=void 0===a?i():a,l=o.devTools,c=void 0===l||l,h=o.preloadedState,f=void 0===h?void 0:h,d=o.enhancers,u=void 0===d?void 0:d;if("function"==typeof n)e=n;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(n))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=co(n)}var p=s;"function"==typeof p&&(p=p(i));var y=fo.apply(void 0,p),g=ho;c&&(g=Ro(Eo({trace:!1},"object"==typeof c&&c)));var b=new Uo(y),v=b;return Array.isArray(u)?v=mo([y],u):"function"==typeof u&&(v=u(b)),lo(e,f,g.apply(void 0,v))}function To(t,e){function i(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Eo(Eo({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function Wo(t){var e,i={},o=[],r={addCase:function(t,e){var o="string"==typeof t?t:t.type;if(o in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[o]=e,r},addMatcher:function(t,e){return o.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,o,e]}function Do(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,o="function"==typeof t.initialState?t.initialState:Lo(t.initialState),r=t.reducers||{},n=Object.keys(r),a={},s={},l={};function c(){var e="function"==typeof t.extraReducers?Wo(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,n=e[1],a=void 0===n?[]:n,l=e[2],c=void 0===l?void 0:l,h=Eo(Eo({},r),s);return function(t,e,i,o){void 0===i&&(i=[]);var r,n="function"==typeof e?Wo(e):[e,i,o],a=n[0],s=n[1],l=n[2];if(function(t){return"function"==typeof t}(t))r=function(){return Lo(t())};else{var c=Lo(t);r=function(){return c}}function h(t,e){void 0===t&&(t=r());var i=mo([a[e.type]],s.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[l]),i.reduce((function(t,i){if(i){var o;if(oi(t))return void 0===(o=i(t,e))?t:o;if(ri(t))return Ji(t,(function(t){return i(t,e)}));if(void 0===(o=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return o}return t}),t)}return h.getInitialState=r,h}(o,(function(t){for(var e in h)t.addCase(e,h[e]);for(var i=0,o=a;i<o.length;i++){var r=o[i];t.addMatcher(r.matcher,r.reducer)}c&&t.addDefaultCase(c)}))}return n.forEach((function(t){var i,o,n=r[t],c=e+"/"+t;"reducer"in n?(i=n.reducer,o=n.prepare):i=n,a[t]=i,s[c]=i,l[t]=o?To(c,o):To(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:l,caseReducers:a,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var Fo=["name","message","stack","code"],Po=function(t,e){this.payload=t,this.meta=e},Mo=function(t,e){this.payload=t,this.meta=e},zo=function(t){if("object"==typeof t&&null!==t){for(var e={},i=0,o=Fo;i<o.length;i++){var r=o[i];"string"==typeof t[r]&&(e[r]=t[r])}return e}return{message:String(t)}};function jo(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,i){var o=To(t+"/fulfilled",(function(t,e,i,o){return{payload:t,meta:ko(Eo({},o||{}),{arg:i,requestId:e,requestStatus:"fulfilled"})}})),r=To(t+"/pending",(function(t,e,i){return{payload:void 0,meta:ko(Eo({},i||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),n=To(t+"/rejected",(function(t,e,o,r,n){return{payload:r,error:(i&&i.serializeError||zo)(t||"Rejected"),meta:ko(Eo({},n||{}),{arg:o,requestId:e,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="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(s,l,c){var h,f=(null==i?void 0:i.idGenerator)?i.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",i=t;i--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),d=new a;function u(t){h=t,d.abort()}var p=function(){return a=this,p=null,y=function(){var a,p,y,g,b,v;return vo(this,(function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),g=null==(a=null==i?void 0:i.condition)?void 0:a.call(i,t,{getState:l,extra:c}),null===(x=g)||"object"!=typeof x||"function"!=typeof x.then?[3,2]:[4,g];case 1:g=m.sent(),m.label=2;case 2:if(!1===g||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,e){return d.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:h||"Aborted"})}))})),s(r(f,t,null==(p=null==i?void 0:i.getPendingMeta)?void 0:p.call(i,{requestId:f,arg:t},{getState:l,extra:c}))),[4,Promise.race([b,Promise.resolve(e(t,{dispatch:s,getState:l,extra:c,requestId:f,signal:d.signal,abort:u,rejectWithValue:function(t,e){return new Po(t,e)},fulfillWithValue:function(t,e){return new Mo(t,e)}})).then((function(e){if(e instanceof Po)throw e;return e instanceof Mo?o(e.payload,f,t,e.meta):o(e,f,t)}))])];case 3:return y=m.sent(),[3,5];case 4:return v=m.sent(),y=v instanceof Po?n(null,f,t,v.payload,v.meta):n(v,f,t),[3,5];case 5:return i&&!i.dispatchConditionRejection&&n.match(y)&&y.meta.condition||s(y),[2,y]}var x}))},new Promise((function(t,e){var i=function(t){try{r(y.next(t))}catch(t){e(t)}},o=function(t){try{r(y.throw(t))}catch(t){e(t)}},r=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(i,o)};r((y=y.apply(a,p)).next())}));var a,p,y}();return Object.assign(p,{abort:u,requestId:f,arg:t,unwrap:function(){return p.then(jo)}})}}),{pending:r,rejected:n,fulfilled:o,typePrefix:t})}t.withTypes=function(){return t}}();var Bo="listenerMiddleware";To(Bo+"/add"),To(Bo+"/removeAll"),To(Bo+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var i=r[t];return i?i.enumerable=e:r[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[Bi];return Vi.get(e,t)},set:function(e){var i=this[Bi];Vi.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][Bi];if(!r.P)switch(r.i){case 5:o(r)&&Ii(r);break;case 4:i(r)&&Ii(r)}}}function i(t){for(var e=t.t,i=t.k,o=Zi(i),r=o.length-1;r>=0;r--){var n=o[r];if(n!==Bi){var a=e[n];if(void 0===a&&!si(e,n))return!0;var s=i[n],l=s&&s[Bi];if(l?l.t!==a:!ci(s,a))return!0}}var c=!!e[Bi];return o.length!==Zi(e).length+(c?0:1)}function o(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var o=0;o<e.length;o++)if(!e.hasOwnProperty(o))return!0;return!1}var r={};!function(t,e){Gi[t]||(Gi[t]=e)}("ES5",{J:function(e,i){var o=Array.isArray(e),r=function(e,i){if(e){for(var o=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(o,""+r,t(r,!0));return o}var n=Hi(i);delete n[Bi];for(var a=Zi(n),s=0;s<a.length;s++){var l=a[s];n[l]=t(l,e||!!n[l].enumerable)}return Object.create(Object.getPrototypeOf(i),n)}(o,e),n={i:o?5:4,A:i?i.A:vi(),P:!1,I:!1,R:{},l:i,t:e,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,Bi,{value:n,writable:!0}),r},S:function(t,i,r){r?oi(i)&&i[Bi].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[Bi];if(i){var r=i.t,n=i.k,a=i.R,s=i.i;if(4===s)ni(n,(function(e){e!==Bi&&(void 0!==r[e]||si(r,e)?a[e]||t(n[e]):(a[e]=!0,Ii(i)))})),ni(r,(function(t){void 0!==n[t]||si(n,t)||(a[t]=!1,Ii(i))}));else if(5===s){if(o(i)&&(Ii(i),a.length=!0),n.length<r.length)for(var l=n.length;l<r.length;l++)a[l]=!1;else for(var c=r.length;c<n.length;c++)a[c]=!0;for(var h=Math.min(n.length,r.length),f=0;f<h;f++)n.hasOwnProperty(f)||(a[f]=!0),void 0===a[f]&&t(n[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):o(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class Ko{static get(t){var e;const i="string"==typeof t?t:t.name,o="string"==typeof t?void 0:t,r=window.ftReduxStores[i];if(Ve(r))return r;if(null==o)return;const n=Do({...o,reducers:null!==(e=o.reducers)&&void 0!==e?e:{}}),a=_o({reducer:(t,e)=>{var i;switch(e.type){case"CLEAR_FT_REDUX_STORE":return n.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(i=e.overwrites)&&void 0!==i?i:{}};default:return n.reducer(t,e)}}});return window.ftReduxStores[o.name]=new Ko(n,a)}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,i)=>{const o=e,r=t[o];return r?(...t)=>{const e=r(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[o]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_STATE_FIELDS_VALUES_SETTER",overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}const Zo=t=>{const e=null!=t?t:{};return(t,i)=>{var o;const r={hasChanged:(t,e)=>!_(t,e),attribute:!1,...e};k(r)(t,i);const n=t;n.reduxProperties=n.reduxProperties||new Map,n.reduxProperties.set(i,{selector:null!==(o=e.selector)&&void 0!==o?o:t=>t[i],store:e.store})}},Ho=Symbol("elementInternals");function Go(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[Ho].form}constructor(...t){super(t),this[Ho]=this.attachInternals(),this[Ho].role=e}setFormValue(t){this[Ho].setFormValue(t)}}}var Vo,qo,Yo;const Xo=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Yo=null===(qo=null===(Vo=window.safari)||void 0===Vo?void 0:Vo.pushNotification)||void 0===qo?void 0:qo.toString())&&void 0!==Yo?Yo:"");var Jo;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(Jo||(Jo={}));var Qo=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class tr extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const er=Symbol("registerInterval");class ir extends(function(t){var e;class i 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[er]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[er]):this.dispatchEvent(new tr)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=er,Qo([R()],i.prototype,"stateManager",void 0),i}(ei)){}const or=Ee.extend("--ft-ripple-color","",Ae.colorContent),rr={color:or,backgroundColor:Ee.extend("--ft-ripple-background-color","",or),opacityContentOnSurfacePressed:Ee.external(Ae.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:Ee.external(Ae.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:Ee.external(Ae.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:Ee.external(Ae.opacityContentOnSurfaceSelected,"Design system"),borderRadius:Ee.create("--ft-ripple-border-radius","","SIZE","0px")},nr=Ee.extend("--ft-ripple-color","",Ae.colorPrimary),ar=nr,sr=Ee.extend("--ft-ripple-background-color","",nr),lr=Ee.extend("--ft-ripple-color","",Ae.colorSecondary),cr=lr,hr=Ee.extend("--ft-ripple-background-color","",lr),fr=Et`
|
|
126
|
+
`;class Ge{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);let r=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),r}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${String(t)}[\\=${i}]`;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 i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function Ve(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var qe,Ye,Xe;const Je=Symbol("internalReduxEventsUnsubscribers"),Qe=Symbol("internalStoresUnsubscribers"),ti=Symbol("internalStores");class ei extends Be{constructor(){super(...arguments),this[qe]=new Map,this[Ye]=new Map,this[Xe]=[]}update(t){var e;super.update(t),(null===(e=this.reduxReactiveProperties)||void 0===e?void 0:e.some((e=>t.has(e))))&&this.updateFromStores()}getUnnamedStore(){if(this[ti].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ti].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[ti].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:Ve(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[ti].delete(e)}setupStore(t,e){this[ti].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[ti].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(t.store?this[Qe].has(t.store):this[Qe].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[Qe].set(t,e.subscribe((()=>this.updateFromStores()))),Ve(e)&&e.eventBus&&(null===(i=this.reduxEventListeners)||void 0===i||i.forEach(((t,i)=>{if("function"==typeof this[i]&&(!t.store||e.name===t.store)){const o=t=>this[i](t);e.eventBus.addEventListener(t.eventName,o),this[Je].push((()=>e.eventBus.removeEventListener(t.eventName,o)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Qe].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[Je].forEach((t=>t())),this[Je]=[]}unsubscribeFromStore(t){this[Qe].has(t)&&this[Qe].get(t)(),this[Qe].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function ii(t){for(var e=arguments.length,i=Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function oi(t){return!!t&&!!t[Bi]}function ri(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 i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===Ki}(t)||Array.isArray(t)||!!t[ji]||!!(null===(e=t.constructor)||void 0===e?void 0:e[ji])||hi(t)||fi(t))}function ni(t,e,i){void 0===i&&(i=!1),0===ai(t)?(i?Object.keys:Zi)(t).forEach((function(o){i&&"symbol"==typeof o||e(o,t[o],t)})):t.forEach((function(i,o){return e(o,i,t)}))}function ai(t){var e=t[Bi];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:hi(t)?2:fi(t)?3:0}function si(t,e){return 2===ai(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function li(t,e,i){var o=ai(t);2===o?t.set(e,i):3===o?t.add(i):t[e]=i}function ci(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function hi(t){return Fi&&t instanceof Map}function fi(t){return Pi&&t instanceof Set}function di(t){return t.o||t.t}function ui(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Hi(t);delete e[Bi];for(var i=Zi(e),o=0;o<i.length;o++){var r=i[o],n=e[r];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(e[r]={configurable:!0,writable:!0,enumerable:n.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function pi(t,e){return void 0===e&&(e=!1),gi(t)||oi(t)||!ri(t)||(ai(t)>1&&(t.set=t.add=t.clear=t.delete=yi),Object.freeze(t),e&&ni(t,(function(t,e){return pi(e,!0)}),!0)),t}function yi(){ii(2)}function gi(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function bi(t){var e=Gi[t];return e||ii(18,t),e}function vi(){return Wi}function mi(t,e){e&&(bi("Patches"),t.u=[],t.s=[],t.v=e)}function xi(t){wi(t),t.p.forEach(Si),t.p=null}function wi(t){t===Wi&&(Wi=t.l)}function Oi(t){return Wi={p:[],l:Wi,h:t,m:!0,_:0}}function Si(t){var e=t[Bi];0===e.i||1===e.i?e.j():e.g=!0}function $i(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.h.O||bi("ES5").S(e,t,o),o?(i[Bi].P&&(xi(e),ii(4)),ri(t)&&(t=Ni(e,t),e.l||Ei(e,t)),e.u&&bi("Patches").M(i[Bi].t,t,e.u,e.s)):t=Ni(e,i,[]),xi(e),e.u&&e.v(e.u,e.s),t!==zi?t:void 0}function Ni(t,e,i){if(gi(e))return e;var o=e[Bi];if(!o)return ni(e,(function(r,n){return Ci(t,o,e,r,n,i)}),!0),e;if(o.A!==t)return e;if(!o.P)return Ei(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var r=4===o.i||5===o.i?o.o=ui(o.k):o.o,n=r,a=!1;3===o.i&&(n=new Set(r),r.clear(),a=!0),ni(n,(function(e,n){return Ci(t,o,r,e,n,i,a)})),Ei(t,r,!1),i&&t.u&&bi("Patches").N(o,i,t.u,t.s)}return o.o}function Ci(t,e,i,o,r,n,a){if(oi(r)){var s=Ni(t,r,n&&e&&3!==e.i&&!si(e.R,o)?n.concat(o):void 0);if(li(i,o,s),!oi(s))return;t.m=!1}else a&&i.add(r);if(ri(r)&&!gi(r)){if(!t.h.D&&t._<1)return;Ni(t,r),e&&e.A.l||Ei(t,r)}}function Ei(t,e,i){void 0===i&&(i=!1),!t.l&&t.h.D&&t.m&&pi(e,i)}function ki(t,e){var i=t[Bi];return(i?di(i):t)[e]}function Ri(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var o=Object.getOwnPropertyDescriptor(i,e);if(o)return o;i=Object.getPrototypeOf(i)}}function Ii(t){t.P||(t.P=!0,t.l&&Ii(t.l))}function Ui(t){t.o||(t.o=ui(t.t))}function Li(t,e,i){var o=hi(e)?bi("MapSet").F(e,i):fi(e)?bi("MapSet").T(e,i):t.O?function(t,e){var i=Array.isArray(t),o={i:i?1:0,A:e?e.A:vi(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},r=o,n=Vi;i&&(r=[o],n=qi);var a=Proxy.revocable(r,n),s=a.revoke,l=a.proxy;return o.k=l,o.j=s,l}(e,i):bi("ES5").J(e,i);return(i?i.A:vi()).p.push(o),o}function Ai(t){return oi(t)||ii(22,t),function t(e){if(!ri(e))return e;var i,o=e[Bi],r=ai(e);if(o){if(!o.P&&(o.i<4||!bi("ES5").K(o)))return o.t;o.I=!0,i=_i(e,r),o.I=!1}else i=_i(e,r);return ni(i,(function(e,r){o&&function(t,e){return 2===ai(t)?t.get(e):t[e]}(o.t,e)===r||li(i,e,t(r))})),3===r?new Set(i):i}(t)}function _i(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ui(t)}qe=Qe,Ye=ti,Xe=Je;var Ti,Wi,Di="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Fi="undefined"!=typeof Map,Pi="undefined"!=typeof Set,Mi="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,zi=Di?Symbol.for("immer-nothing"):((Ti={})["immer-nothing"]=!0,Ti),ji=Di?Symbol.for("immer-draftable"):"__$immer_draftable",Bi=Di?Symbol.for("immer-state"):"__$immer_state",Ki=""+Object.prototype.constructor,Zi="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Hi=Object.getOwnPropertyDescriptors||function(t){var e={};return Zi(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},Gi={},Vi={get:function(t,e){if(e===Bi)return t;var i=di(t);if(!si(i,e))return function(t,e,i){var o,r=Ri(e,i);return r?"value"in r?r.value:null===(o=r.get)||void 0===o?void 0:o.call(t.k):void 0}(t,i,e);var o=i[e];return t.I||!ri(o)?o:o===ki(t.t,e)?(Ui(t),t.o[e]=Li(t.A.h,o,t)):o},has:function(t,e){return e in di(t)},ownKeys:function(t){return Reflect.ownKeys(di(t))},set:function(t,e,i){var o=Ri(di(t),e);if(null==o?void 0:o.set)return o.set.call(t.k,i),!0;if(!t.P){var r=ki(di(t),e),n=null==r?void 0:r[Bi];if(n&&n.t===i)return t.o[e]=i,t.R[e]=!1,!0;if(ci(i,r)&&(void 0!==i||si(t.t,e)))return!0;Ui(t),Ii(t)}return t.o[e]===i&&(void 0!==i||e in t.o)||Number.isNaN(i)&&Number.isNaN(t.o[e])||(t.o[e]=i,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==ki(t.t,e)||e in t.t?(t.R[e]=!1,Ui(t),Ii(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=di(t),o=Reflect.getOwnPropertyDescriptor(i,e);return o?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:o.enumerable,value:i[e]}:o},defineProperty:function(){ii(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ii(12)}},qi={};ni(Vi,(function(t,e){qi[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),qi.deleteProperty=function(t,e){return qi.set.call(this,t,e,void 0)},qi.set=function(t,e,i){return Vi.set.call(this,t[0],e,i,t[0])};var Yi=function(){function t(t){var e=this;this.O=Mi,this.D=!0,this.produce=function(t,i,o){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var n=e;return function(t){var e=this;void 0===t&&(t=r);for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return n.produce(t,(function(t){var o;return(o=i).call.apply(o,[e,t].concat(a))}))}}var a;if("function"!=typeof i&&ii(6),void 0!==o&&"function"!=typeof o&&ii(7),ri(t)){var s=Oi(e),l=Li(e,t,void 0),c=!0;try{a=i(l),c=!1}finally{c?xi(s):wi(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return mi(s,o),$i(t,s)}),(function(t){throw xi(s),t})):(mi(s,o),$i(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=i(t))&&(a=t),a===zi&&(a=void 0),e.D&&pi(a,!0),o){var h=[],f=[];bi("Patches").M(t,a,h,f),o(h,f)}return a}ii(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var o=arguments.length,r=Array(o>1?o-1:0),n=1;n<o;n++)r[n-1]=arguments[n];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var o,r,n=e.produce(t,i,(function(t,e){o=t,r=e}));return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return[t,o,r]})):[n,o,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){ri(t)||ii(8),oi(t)&&(t=Ai(t));var e=Oi(this),i=Li(this,t,void 0);return i[Bi].C=!0,wi(e),i},e.finishDraft=function(t,e){var i=(t&&t[Bi]).A;return mi(i,e),$i(void 0,i)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Mi&&ii(20),this.O=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var o=e[i];if(0===o.path.length&&"replace"===o.op){t=o.value;break}}i>-1&&(e=e.slice(i+1));var r=bi("Patches").$;return oi(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),Xi=new Yi,Ji=Xi.produce;function Qi(t){return Qi="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},Qi(t)}function to(t){var e=function(t,e){if("object"!==Qi(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!==Qi(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Qi(e)?e:String(e)}function eo(t,e,i){return(e=to(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function io(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function oo(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?io(Object(i),!0).forEach((function(e){eo(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):io(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function ro(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. "}Xi.produceWithPatches.bind(Xi),Xi.setAutoFreeze.bind(Xi),Xi.setUseProxies.bind(Xi),Xi.applyPatches.bind(Xi),Xi.createDraft.bind(Xi),Xi.finishDraft.bind(Xi);var no="function"==typeof Symbol&&Symbol.observable||"@@observable",ao=function(){return Math.random().toString(36).substring(7).split("").join(".")},so={INIT:"@@redux/INIT"+ao(),REPLACE:"@@redux/REPLACE"+ao(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ao()}};function lo(t,e,i){var o;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(ro(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(ro(1));return i(lo)(t,e)}if("function"!=typeof t)throw new Error(ro(2));var r=t,n=e,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function h(){if(l)throw new Error(ro(3));return n}function f(t){if("function"!=typeof t)throw new Error(ro(4));if(l)throw new Error(ro(5));var e=!0;return c(),s.push(t),function(){if(e){if(l)throw new Error(ro(6));e=!1,c();var i=s.indexOf(t);s.splice(i,1),a=null}}}function d(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(ro(7));if(void 0===t.type)throw new Error(ro(8));if(l)throw new Error(ro(9));try{l=!0,n=r(n,t)}finally{l=!1}for(var e=a=s,i=0;i<e.length;i++){(0,e[i])()}return t}return d({type:so.INIT}),(o={dispatch:d,subscribe:f,getState:h,replaceReducer:function(t){if("function"!=typeof t)throw new Error(ro(10));r=t,d({type:so.REPLACE})}})[no]=function(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(ro(11));function i(){t.next&&t.next(h())}return i(),{unsubscribe:e(i)}}})[no]=function(){return this},t},o}function co(t){for(var e=Object.keys(t),i={},o=0;o<e.length;o++){var r=e[o];"function"==typeof t[r]&&(i[r]=t[r])}var n,a=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:so.INIT}))throw new Error(ro(12));if(void 0===i(void 0,{type:so.PROBE_UNKNOWN_ACTION()}))throw new Error(ro(13))}))}(i)}catch(t){n=t}return function(t,e){if(void 0===t&&(t={}),n)throw n;for(var o=!1,r={},s=0;s<a.length;s++){var l=a[s],c=i[l],h=t[l],f=c(h,e);if(void 0===f)throw e&&e.type,new Error(ro(14));r[l]=f,o=o||f!==h}return(o=o||a.length!==Object.keys(t).length)?r:t}}function ho(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];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 fo(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),o=function(){throw new Error(ro(15))},r={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},n=e.map((function(t){return t(r)}));return o=ho.apply(void 0,n)(i.dispatch),oo(oo({},i),{},{dispatch:o})}}}function uo(t){return function(e){var i=e.dispatch,o=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,o,t):e(r)}}}}var po=uo();po.withExtraArgument=uo;var yo,go=po,bo=(yo=function(t,e){return yo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},yo(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 i(){this.constructor=t}yo(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),vo=function(t,e){var i,o,r,n,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(r=2&n[0]?o.return:n[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,n[1])).done)return r;switch(o=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){a.label=n[1];break}if(6===n[0]&&a.label<r[1]){a.label=r[1],r=n;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(n);break}r[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],o=0}finally{i=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},mo=function(t,e){for(var i=0,o=e.length,r=t.length;i<o;i++,r++)t[r]=e[i];return t},xo=Object.defineProperty,wo=Object.defineProperties,Oo=Object.getOwnPropertyDescriptors,So=Object.getOwnPropertySymbols,$o=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable,Co=function(t,e,i){return e in t?xo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Eo=function(t,e){for(var i in e||(e={}))$o.call(e,i)&&Co(t,i,e[i]);if(So)for(var o=0,r=So(e);o<r.length;o++){i=r[o];No.call(e,i)&&Co(t,i,e[i])}return t},ko=function(t,e){return wo(t,Oo(e))},Ro="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ho:ho.apply(null,arguments)};var Io=function(t){function e(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return bo(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,mo([void 0],t[0].concat(this)))):new(e.bind.apply(e,mo([void 0],t.concat(this))))},e}(Array),Uo=function(t){function e(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return bo(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,mo([void 0],t[0].concat(this)))):new(e.bind.apply(e,mo([void 0],t.concat(this))))},e}(Array);function Lo(t){return ri(t)?Ji(t,(function(){})):t}function Ao(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var o=new Io;i&&(!function(t){return"boolean"==typeof t}(i)?o.push(go.withExtraArgument(i.extraArgument)):o.push(go));return o}(t)}}function _o(t){var e,i=Ao(),o=t||{},r=o.reducer,n=void 0===r?void 0:r,a=o.middleware,s=void 0===a?i():a,l=o.devTools,c=void 0===l||l,h=o.preloadedState,f=void 0===h?void 0:h,d=o.enhancers,u=void 0===d?void 0:d;if("function"==typeof n)e=n;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(n))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=co(n)}var p=s;"function"==typeof p&&(p=p(i));var y=fo.apply(void 0,p),g=ho;c&&(g=Ro(Eo({trace:!1},"object"==typeof c&&c)));var b=new Uo(y),v=b;return Array.isArray(u)?v=mo([y],u):"function"==typeof u&&(v=u(b)),lo(e,f,g.apply(void 0,v))}function To(t,e){function i(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Eo(Eo({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function Wo(t){var e,i={},o=[],r={addCase:function(t,e){var o="string"==typeof t?t:t.type;if(o in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[o]=e,r},addMatcher:function(t,e){return o.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,o,e]}function Do(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,o="function"==typeof t.initialState?t.initialState:Lo(t.initialState),r=t.reducers||{},n=Object.keys(r),a={},s={},l={};function c(){var e="function"==typeof t.extraReducers?Wo(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,n=e[1],a=void 0===n?[]:n,l=e[2],c=void 0===l?void 0:l,h=Eo(Eo({},r),s);return function(t,e,i,o){void 0===i&&(i=[]);var r,n="function"==typeof e?Wo(e):[e,i,o],a=n[0],s=n[1],l=n[2];if(function(t){return"function"==typeof t}(t))r=function(){return Lo(t())};else{var c=Lo(t);r=function(){return c}}function h(t,e){void 0===t&&(t=r());var i=mo([a[e.type]],s.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[l]),i.reduce((function(t,i){if(i){var o;if(oi(t))return void 0===(o=i(t,e))?t:o;if(ri(t))return Ji(t,(function(t){return i(t,e)}));if(void 0===(o=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return o}return t}),t)}return h.getInitialState=r,h}(o,(function(t){for(var e in h)t.addCase(e,h[e]);for(var i=0,o=a;i<o.length;i++){var r=o[i];t.addMatcher(r.matcher,r.reducer)}c&&t.addDefaultCase(c)}))}return n.forEach((function(t){var i,o,n=r[t],c=e+"/"+t;"reducer"in n?(i=n.reducer,o=n.prepare):i=n,a[t]=i,s[c]=i,l[t]=o?To(c,o):To(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:l,caseReducers:a,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var Fo=["name","message","stack","code"],Po=function(t,e){this.payload=t,this.meta=e},Mo=function(t,e){this.payload=t,this.meta=e},zo=function(t){if("object"==typeof t&&null!==t){for(var e={},i=0,o=Fo;i<o.length;i++){var r=o[i];"string"==typeof t[r]&&(e[r]=t[r])}return e}return{message:String(t)}};function jo(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,i){var o=To(t+"/fulfilled",(function(t,e,i,o){return{payload:t,meta:ko(Eo({},o||{}),{arg:i,requestId:e,requestStatus:"fulfilled"})}})),r=To(t+"/pending",(function(t,e,i){return{payload:void 0,meta:ko(Eo({},i||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),n=To(t+"/rejected",(function(t,e,o,r,n){return{payload:r,error:(i&&i.serializeError||zo)(t||"Rejected"),meta:ko(Eo({},n||{}),{arg:o,requestId:e,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="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(s,l,c){var h,f=(null==i?void 0:i.idGenerator)?i.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",i=t;i--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),d=new a;function u(t){h=t,d.abort()}var p=function(){return a=this,p=null,y=function(){var a,p,y,g,b,v;return vo(this,(function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),g=null==(a=null==i?void 0:i.condition)?void 0:a.call(i,t,{getState:l,extra:c}),null===(x=g)||"object"!=typeof x||"function"!=typeof x.then?[3,2]:[4,g];case 1:g=m.sent(),m.label=2;case 2:if(!1===g||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,e){return d.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:h||"Aborted"})}))})),s(r(f,t,null==(p=null==i?void 0:i.getPendingMeta)?void 0:p.call(i,{requestId:f,arg:t},{getState:l,extra:c}))),[4,Promise.race([b,Promise.resolve(e(t,{dispatch:s,getState:l,extra:c,requestId:f,signal:d.signal,abort:u,rejectWithValue:function(t,e){return new Po(t,e)},fulfillWithValue:function(t,e){return new Mo(t,e)}})).then((function(e){if(e instanceof Po)throw e;return e instanceof Mo?o(e.payload,f,t,e.meta):o(e,f,t)}))])];case 3:return y=m.sent(),[3,5];case 4:return v=m.sent(),y=v instanceof Po?n(null,f,t,v.payload,v.meta):n(v,f,t),[3,5];case 5:return i&&!i.dispatchConditionRejection&&n.match(y)&&y.meta.condition||s(y),[2,y]}var x}))},new Promise((function(t,e){var i=function(t){try{r(y.next(t))}catch(t){e(t)}},o=function(t){try{r(y.throw(t))}catch(t){e(t)}},r=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(i,o)};r((y=y.apply(a,p)).next())}));var a,p,y}();return Object.assign(p,{abort:u,requestId:f,arg:t,unwrap:function(){return p.then(jo)}})}}),{pending:r,rejected:n,fulfilled:o,typePrefix:t})}t.withTypes=function(){return t}}();var Bo="listenerMiddleware";To(Bo+"/add"),To(Bo+"/removeAll"),To(Bo+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var i=r[t];return i?i.enumerable=e:r[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[Bi];return Vi.get(e,t)},set:function(e){var i=this[Bi];Vi.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][Bi];if(!r.P)switch(r.i){case 5:o(r)&&Ii(r);break;case 4:i(r)&&Ii(r)}}}function i(t){for(var e=t.t,i=t.k,o=Zi(i),r=o.length-1;r>=0;r--){var n=o[r];if(n!==Bi){var a=e[n];if(void 0===a&&!si(e,n))return!0;var s=i[n],l=s&&s[Bi];if(l?l.t!==a:!ci(s,a))return!0}}var c=!!e[Bi];return o.length!==Zi(e).length+(c?0:1)}function o(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var o=0;o<e.length;o++)if(!e.hasOwnProperty(o))return!0;return!1}var r={};!function(t,e){Gi[t]||(Gi[t]=e)}("ES5",{J:function(e,i){var o=Array.isArray(e),r=function(e,i){if(e){for(var o=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(o,""+r,t(r,!0));return o}var n=Hi(i);delete n[Bi];for(var a=Zi(n),s=0;s<a.length;s++){var l=a[s];n[l]=t(l,e||!!n[l].enumerable)}return Object.create(Object.getPrototypeOf(i),n)}(o,e),n={i:o?5:4,A:i?i.A:vi(),P:!1,I:!1,R:{},l:i,t:e,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,Bi,{value:n,writable:!0}),r},S:function(t,i,r){r?oi(i)&&i[Bi].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[Bi];if(i){var r=i.t,n=i.k,a=i.R,s=i.i;if(4===s)ni(n,(function(e){e!==Bi&&(void 0!==r[e]||si(r,e)?a[e]||t(n[e]):(a[e]=!0,Ii(i)))})),ni(r,(function(t){void 0!==n[t]||si(n,t)||(a[t]=!1,Ii(i))}));else if(5===s){if(o(i)&&(Ii(i),a.length=!0),n.length<r.length)for(var l=n.length;l<r.length;l++)a[l]=!1;else for(var c=r.length;c<n.length;c++)a[c]=!0;for(var h=Math.min(n.length,r.length),f=0;f<h;f++)n.hasOwnProperty(f)||(a[f]=!0),void 0===a[f]&&t(n[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):o(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class Ko{static get(t){var e;const i="string"==typeof t?t:t.name,o="string"==typeof t?void 0:t,r=window.ftReduxStores[i];if(Ve(r))return r;if(null==o)return;const n=Do({...o,reducers:null!==(e=o.reducers)&&void 0!==e?e:{}}),a=_o({reducer:(t,e)=>{var i;switch(e.type){case"CLEAR_FT_REDUX_STORE":return n.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(i=e.overwrites)&&void 0!==i?i:{}};default:return n.reducer(t,e)}}});return window.ftReduxStores[o.name]=new Ko(n,a)}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,i)=>{const o=e,r=t[o];return r?(...t)=>{const e=r(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[o]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_STATE_FIELDS_VALUES_SETTER",overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}const Zo=t=>{const e=null!=t?t:{};return(t,i)=>{var o;const r={hasChanged:(t,e)=>!_(t,e),attribute:!1,...e};E(r)(t,i);const n=t;n.reduxProperties=n.reduxProperties||new Map,n.reduxProperties.set(i,{selector:null!==(o=e.selector)&&void 0!==o?o:t=>t[i],store:e.store})}},Ho=Symbol("elementInternals");function Go(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[Ho].form}constructor(...t){super(t),this[Ho]=this.attachInternals(),this[Ho].role=e}setFormValue(t){this[Ho].setFormValue(t)}}}var Vo,qo,Yo;const Xo=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Yo=null===(qo=null===(Vo=window.safari)||void 0===Vo?void 0:Vo.pushNotification)||void 0===qo?void 0:qo.toString())&&void 0!==Yo?Yo:"");var Jo;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(Jo||(Jo={}));var Qo=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class tr extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const er=Symbol("registerInterval");class ir extends(function(t){var e;class i 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[er]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[er]):this.dispatchEvent(new tr)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=er,Qo([k()],i.prototype,"stateManager",void 0),i}(ei)){}const or=Ee.extend("--ft-ripple-color","",Ae.colorContent),rr={color:or,backgroundColor:Ee.extend("--ft-ripple-background-color","",or),opacityContentOnSurfacePressed:Ee.external(Ae.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:Ee.external(Ae.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:Ee.external(Ae.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:Ee.external(Ae.opacityContentOnSurfaceSelected,"Design system"),borderRadius:Ee.create("--ft-ripple-border-radius","","SIZE","0px")},nr=Ee.extend("--ft-ripple-color","",Ae.colorPrimary),ar=nr,sr=Ee.extend("--ft-ripple-background-color","",nr),lr=Ee.extend("--ft-ripple-color","",Ae.colorSecondary),cr=lr,hr=Ee.extend("--ft-ripple-background-color","",lr),fr=Et`
|
|
127
127
|
:host {
|
|
128
128
|
display: contents;
|
|
129
129
|
}
|
|
@@ -678,7 +678,7 @@ let $e=class extends Bt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
678
678
|
</${Kn(this.element)}>
|
|
679
679
|
`:Hn`
|
|
680
680
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
681
|
-
`}}qn.styles=[Yr,Xr,Jr,Qr,tn,en,on,rn,nn,an,sn,...ln],Vn([
|
|
681
|
+
`}}qn.styles=[Yr,Xr,Jr,Qr,tn,en,on,rn,nn,an,sn,...ln],Vn([E()],qn.prototype,"element",void 0),Vn([E()],qn.prototype,"variant",void 0),T("ft-typography")(qn);
|
|
682
682
|
/**
|
|
683
683
|
* @license
|
|
684
684
|
* Copyright 2017 Google LLC
|
|
@@ -694,7 +694,7 @@ const Yn=1,Xn=2,Jn=t=>(...e)=>({_$litDirective$:t,values:e});class Qn{constructo
|
|
|
694
694
|
${ea(this.resolvedIcon)}
|
|
695
695
|
<slot ?hidden=${e}></slot>
|
|
696
696
|
</i>
|
|
697
|
-
`}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 i=this.value||this.textContent;switch(this.variant){case ra.file_format:this.resolvedIcon=null!==(t=oa[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case ra.material:this.resolvedIcon=this.value||fe;break;default:this.resolvedIcon=null!==(e=ia[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}aa.elementDefinitions={},aa.styles=dn,na([
|
|
697
|
+
`}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 i=this.value||this.textContent;switch(this.variant){case ra.file_format:this.resolvedIcon=null!==(t=oa[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case ra.material:this.resolvedIcon=this.value||fe;break;default:this.resolvedIcon=null!==(e=ia[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}aa.elementDefinitions={},aa.styles=dn,na([E()],aa.prototype,"variant",void 0),na([E()],aa.prototype,"value",void 0),na([k()],aa.prototype,"resolvedIcon",void 0),na([I("slot")],aa.prototype,"slottedContent",void 0),T("ft-icon")(aa);const sa=Ee.create("--ft-tooltip-distance","","SIZE","4px"),la=Ee.create("--ft-tooltip-color","","COLOR","#FFFFFF"),ca=Ee.create("--ft-tooltip-background-color","","COLOR","#666666"),ha=Ee.create("--ft-tooltip-z-index","","NUMBER","100"),fa=Ee.external(Ae.borderRadiusS,"Design system"),da=Ee.create("--ft-tooltip-max-width","","SIZE","150px"),ua=Et`
|
|
698
698
|
.ft-tooltip--container {
|
|
699
699
|
display: block;
|
|
700
700
|
}
|
|
@@ -723,7 +723,7 @@ const Yn=1,Xn=2,Jn=t=>(...e)=>({_$litDirective$:t,values:e});class Qn{constructo
|
|
|
723
723
|
position: relative;
|
|
724
724
|
word-break: break-word;
|
|
725
725
|
}
|
|
726
|
-
`;var pa=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class ya extends Be{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new
|
|
726
|
+
`;var pa=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class ya extends Be{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new L,this.revealDebouncer=new L}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return ce`
|
|
727
727
|
<div part="container"
|
|
728
728
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
729
729
|
@mouseenter=${this.onHover}
|
|
@@ -741,13 +741,13 @@ const Yn=1,Xn=2,Jn=t=>(...e)=>({_$litDirective$:t,values:e});class Qn{constructo
|
|
|
741
741
|
</div>
|
|
742
742
|
</div>
|
|
743
743
|
</div>
|
|
744
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,o=(t.offsetHeight-i)/2,r=(t.offsetWidth-e)/2;let n=0,a=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":a=t.offsetTop-i-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"bottom":a=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"left":a=t.offsetTop+o-this.tooltip.offsetTop,n=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":a=t.offsetTop+o-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const s=this.tooltip.style;s.left=n+"px",s.top=a+"px";const l=this.tooltip.getBoundingClientRect();let c=-l.x,h=l.x+l.width-window.innerWidth;s.left=n+Math.round(this.correctOutOfWindowPixels(c,h))+"px";let f=-l.y,d=l.y+l.height-window.innerHeight;s.top=a+Math.round(this.correctOutOfWindowPixels(f,d))+"px",s.maxWidth=`max(${t.offsetWidth}px, ${da})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}ya.elementDefinitions={"ft-typography":qn},ya.styles=ua,pa([
|
|
744
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,o=(t.offsetHeight-i)/2,r=(t.offsetWidth-e)/2;let n=0,a=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":a=t.offsetTop-i-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"bottom":a=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"left":a=t.offsetTop+o-this.tooltip.offsetTop,n=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":a=t.offsetTop+o-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const s=this.tooltip.style;s.left=n+"px",s.top=a+"px";const l=this.tooltip.getBoundingClientRect();let c=-l.x,h=l.x+l.width-window.innerWidth;s.left=n+Math.round(this.correctOutOfWindowPixels(c,h))+"px";let f=-l.y,d=l.y+l.height-window.innerHeight;s.top=a+Math.round(this.correctOutOfWindowPixels(f,d))+"px",s.maxWidth=`max(${t.offsetWidth}px, ${da})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}ya.elementDefinitions={"ft-typography":qn},ya.styles=ua,pa([E()],ya.prototype,"text",void 0),pa([E({type:Boolean})],ya.prototype,"manual",void 0),pa([E({type:Boolean})],ya.prototype,"inline",void 0),pa([E({type:Number})],ya.prototype,"delay",void 0),pa([E()],ya.prototype,"position",void 0),pa([U()],ya.prototype,"slotNodes",void 0),pa([I(".ft-tooltip--container")],ya.prototype,"container",void 0),pa([I(".ft-tooltip")],ya.prototype,"tooltip",void 0),pa([I(".ft-tooltip--content")],ya.prototype,"tooltipContent",void 0),pa([k()],ya.prototype,"visible",void 0),T("ft-tooltip")(ya);
|
|
745
745
|
/**
|
|
746
746
|
* @license
|
|
747
747
|
* Copyright 2018 Google LLC
|
|
748
748
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
749
749
|
*/
|
|
750
|
-
const ga=Jn(class extends Qn{constructor(t){if(super(t),t.type!==Yn||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.it)t in e||(i.remove(t),this.it.delete(t));for(const t in e){const o=!!e[t];o===this.it.has(t)||this.st?.has(t)||(o?(i.add(t),this.it.add(t)):(i.remove(t),this.it.delete(t)))}return rt}});var ba=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class va extends Be{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new
|
|
750
|
+
const ga=Jn(class extends Qn{constructor(t){if(super(t),t.type!==Yn||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.it)t in e||(i.remove(t),this.it.delete(t));for(const t in e){const o=!!e[t];o===this.it.has(t)||this.st?.has(t)||(o?(i.add(t),this.it.add(t)):(i.remove(t),this.it.delete(t)))}return rt}});var ba=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class va extends Be{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new L(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new L(10),this.moveRipple=t=>{var e,i;let{x:o,y:r}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=r?r-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return ce`
|
|
751
751
|
<style>
|
|
752
752
|
.ft-ripple .ft-ripple--effect {
|
|
753
753
|
left: ${this.originX}px;
|
|
@@ -758,7 +758,7 @@ const ga=Jn(class extends Qn{constructor(t){if(super(t),t.type!==Yn||"class"!==t
|
|
|
758
758
|
<div class="ft-ripple--background"></div>
|
|
759
759
|
<div class="ft-ripple--effect"></div>
|
|
760
760
|
</div>
|
|
761
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,r;return null!=e.x?({x:o,y:r}=e):null!=i.touches&&(o=i.touches[0].clientX,r=i.touches[0].clientY),{x:o,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}va.elementDefinitions={},va.styles=fr,ba([
|
|
761
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,r;return null!=e.x?({x:o,y:r}=e):null!=i.touches&&(o=i.touches[0].clientX,r=i.touches[0].clientY),{x:o,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}va.elementDefinitions={},va.styles=fr,ba([E({type:Boolean})],va.prototype,"primary",void 0),ba([E({type:Boolean})],va.prototype,"secondary",void 0),ba([E({type:Boolean})],va.prototype,"unbounded",void 0),ba([E({type:Boolean})],va.prototype,"activated",void 0),ba([E({type:Boolean})],va.prototype,"selected",void 0),ba([E({type:Boolean})],va.prototype,"disabled",void 0),ba([k()],va.prototype,"hovered",void 0),ba([k()],va.prototype,"focused",void 0),ba([k()],va.prototype,"pressed",void 0),ba([k()],va.prototype,"rippling",void 0),ba([k()],va.prototype,"originX",void 0),ba([k()],va.prototype,"originY",void 0),ba([I(".ft-ripple")],va.prototype,"ripple",void 0),ba([I(".ft-ripple--effect")],va.prototype,"rippleEffect",void 0),T("ft-ripple")(va);const ma={borderRadiusLeft:Ee.extend("--ft-switch-option-border-radius-left","",Ae.borderRadiusL),borderRadiusRight:Ee.extend("--ft-switch-option-border-radius-right","",Ae.borderRadiusL),borderWidthLeft:Ee.create("--ft-switch-option-border-width-left","","SIZE","1px"),borderWidthRight:Ee.create("--ft-switch-option-border-width-right","","SIZE","1px"),borderWidthVertical:Ee.create("--ft-switch-option-border-width-vertical","","SIZE","1px")},xa=Et`
|
|
762
762
|
.ft-switch-option {
|
|
763
763
|
position: relative;
|
|
764
764
|
display: inline-block;
|
|
@@ -866,7 +866,7 @@ const ga=Jn(class extends Qn{constructor(t){if(super(t),t.type!==Yn||"class"!==t
|
|
|
866
866
|
</ft-tooltip>
|
|
867
867
|
`}onChange(){this.selected=!this.unselectable||!this.selected,this.dispatchEvent(new Oa(this.selected))}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?ce`
|
|
868
868
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
869
|
-
`:fe}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}$a.elementDefinitions={"ft-ripple":va,"ft-typography":qn,"ft-tooltip":ya,"ft-icon":aa},$a.styles=[He,xa],wa([
|
|
869
|
+
`:fe}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}$a.elementDefinitions={"ft-ripple":va,"ft-typography":qn,"ft-tooltip":ya,"ft-icon":aa},$a.styles=[He,xa],wa([E()],$a.prototype,"value",void 0),wa([E()],$a.prototype,"icon",void 0),wa([E()],$a.prototype,"iconVariant",void 0),wa([E()],$a.prototype,"label",void 0),wa([E()],$a.prototype,"tooltipPosition",void 0),wa([E({type:Boolean,reflect:!0})],$a.prototype,"selected",void 0),wa([E({type:Boolean})],$a.prototype,"trailingIcon",void 0),wa([E({type:Boolean})],$a.prototype,"unselectable",void 0),wa([I(".ft-switch-option--content slot")],$a.prototype,"slottedContent",void 0),wa([I(".ft-switch-option--input")],$a.prototype,"input",void 0);var Na=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class Ca extends CustomEvent{constructor(t){super("change",{detail:t})}}class Ea extends Be{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}update(t){super.update(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach((t=>t.unselectable=this.unselectable))}render(){const t={"ft-switch":!0,"ft-switch--dense":this.dense};return ce`
|
|
870
870
|
<div @keydown=${this.onKeyDown} tabindex="0" class="${ga(t)}">
|
|
871
871
|
<slot @slotchange=${this.onSlotchange}
|
|
872
872
|
@option-change=${this.onOptionChangeByScript}
|
|
@@ -907,7 +907,7 @@ const ga=Jn(class extends Qn{constructor(t){if(super(t),t.type!==Yn||"class"!==t
|
|
|
907
907
|
--ft-switch-internal-vertical-padding: 2px;
|
|
908
908
|
--ft-switch-internal-horizontal-padding: 4px;
|
|
909
909
|
}
|
|
910
|
-
`,Na([
|
|
910
|
+
`,Na([E({type:Boolean})],Ea.prototype,"dense",void 0),Na([E({type:Boolean})],Ea.prototype,"unselectable",void 0),Na([I(".ft-switch slot")],Ea.prototype,"slottedContent",void 0),Na([k()],Ea.prototype,"selectedOption",void 0),Na([I(".ft-switch")],Ea.prototype,"ftSwitchDiv",void 0),T("ft-switch")(Ea),T("ft-switch-option")($a);const ka=Ee.external(Ae.colorOutline,"Design system"),Ra=Ee.external(Ae.colorOnSurfaceMedium,"Design system"),Ia=Et`
|
|
911
911
|
:host {
|
|
912
912
|
display: block;
|
|
913
913
|
}
|
|
@@ -936,7 +936,7 @@ const ga=Jn(class extends Qn{constructor(t){if(super(t),t.type!==Yn||"class"!==t
|
|
|
936
936
|
@touchstart=${this.initDragFromTouch}>
|
|
937
937
|
<ft-icon .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon>
|
|
938
938
|
</div>
|
|
939
|
-
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let i=this.fixedWidth+t-this.startX,o=this.fixedHeight+e-this.startY;this.dispatchEvent(new La(i,o))}}Aa.elementDefinitions={"ft-icon":aa},Aa.styles=[Ze,Ia],Ua([
|
|
939
|
+
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let i=this.fixedWidth+t-this.startX,o=this.fixedHeight+e-this.startY;this.dispatchEvent(new La(i,o))}}Aa.elementDefinitions={"ft-icon":aa},Aa.styles=[Ze,Ia],Ua([E({type:Number})],Aa.prototype,"initialWidth",void 0),Ua([E({type:Number})],Aa.prototype,"initialHeight",void 0),Ua([E()],Aa.prototype,"icon",void 0),Ua([E()],Aa.prototype,"iconVariant",void 0),Ua([E()],Aa.prototype,"cursor",void 0),Ua([k()],Aa.prototype,"dragging",void 0),T("ft-resizer")(Aa);const _a={fontSize:Ee.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:Ee.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:Ee.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:Ee.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:Ee.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:Ee.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:Ee.extend("--ft-input-label-border-color","",Ae.colorOutline),textColor:Ee.extend("--ft-input-label-text-color","",Ae.colorOnSurfaceMedium),disabledTextColor:Ee.extend("--ft-input-label-disabled-text-color","",Ae.colorOnSurfaceDisabled),colorSurface:Ee.external(Ae.colorSurface,"Design system"),borderRadiusS:Ee.external(Ae.borderRadiusS,"Design system"),colorError:Ee.external(Ae.colorError,"Design system")},Ta=Et`
|
|
940
940
|
.ft-input-label {
|
|
941
941
|
position: absolute;
|
|
942
942
|
inset: 0;
|
|
@@ -1067,7 +1067,7 @@ const ga=Jn(class extends Qn{constructor(t){if(super(t),t.type!==Yn||"class"!==t
|
|
|
1067
1067
|
</div>
|
|
1068
1068
|
`:null}
|
|
1069
1069
|
</div>
|
|
1070
|
-
`}}Da.elementDefinitions={},Da.styles=[on,Ta],Wa([
|
|
1070
|
+
`}}Da.elementDefinitions={},Da.styles=[on,Ta],Wa([E({type:String})],Da.prototype,"text",void 0),Wa([E({type:Boolean})],Da.prototype,"raised",void 0),Wa([E({type:Boolean})],Da.prototype,"outlined",void 0),Wa([E({type:Boolean})],Da.prototype,"disabled",void 0),Wa([E({type:Boolean})],Da.prototype,"error",void 0),T("ft-input-label")(Da);const Fa={fontSize:Ee.create("--ft-text-area-font-size","","SIZE","14px"),labelSize:Ee.create("--ft-text-area-label-size","","SIZE","11px"),verticalSpacing:Ee.create("--ft-text-area-vertical-spacing","","SIZE","4px"),horizontalSpacing:Ee.create("--ft-text-area-horizontal-spacing","","SIZE","16px"),helperColor:Ee.extend("--ft-text-area-helper-color","",Ae.colorOnSurfaceMedium),colorPrimary:Ee.external(Ae.colorPrimary,"Design system"),colorOnSurface:Ee.external(Ae.colorOnSurface,"Design system"),colorOnSurfaceDisabled:Ee.external(Ae.colorOnSurfaceDisabled,"Design system"),borderRadiusS:Ee.external(Ae.borderRadiusS,"Design system"),colorError:Ee.external(Ae.colorError,"Design system")},Pa=Et`
|
|
1071
1071
|
*:focus {
|
|
1072
1072
|
outline: none;
|
|
1073
1073
|
}
|
|
@@ -1209,7 +1209,7 @@ const ga=Jn(class extends Qn{constructor(t){if(super(t),t.type!==Yn||"class"!==t
|
|
|
1209
1209
|
${this.helper}
|
|
1210
1210
|
</ft-typography>`:void 0}
|
|
1211
1211
|
</div>
|
|
1212
|
-
`}setValue(t,e=!1){this.value=t,this.setFormValue(t),e&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}contentAvailableCallback(t){super.contentAvailableCallback(t),this.requestUpdate()}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}za.elementDefinitions={"ft-input-label":Da,"ft-resizer":Aa,"ft-ripple":va,"ft-typography":qn},za.styles=[tn,Pa],Ma([
|
|
1212
|
+
`}setValue(t,e=!1){this.value=t,this.setFormValue(t),e&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}contentAvailableCallback(t){super.contentAvailableCallback(t),this.requestUpdate()}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}za.elementDefinitions={"ft-input-label":Da,"ft-resizer":Aa,"ft-ripple":va,"ft-typography":qn},za.styles=[tn,Pa],Ma([E({type:String})],za.prototype,"label",void 0),Ma([E({reflect:!0})],za.prototype,"value",void 0),Ma([E({type:String})],za.prototype,"helper",void 0),Ma([E({type:Boolean})],za.prototype,"outlined",void 0),Ma([E({type:Boolean})],za.prototype,"disabled",void 0),Ma([E({type:Boolean})],za.prototype,"error",void 0),Ma([E({type:Number,reflect:!0})],za.prototype,"height",void 0),Ma([I("textarea")],za.prototype,"textarea",void 0),Ma([k()],za.prototype,"focused",void 0),T("ft-text-area")(za);
|
|
1213
1213
|
/**
|
|
1214
1214
|
* @license
|
|
1215
1215
|
* Copyright 2020 Google LLC
|
|
@@ -1250,7 +1250,7 @@ const{D:ja}=mt,Ba=()=>document.createComment(""),Ka=(t,e,i)=>{const o=t._$AA.par
|
|
|
1250
1250
|
</ft-tooltip>
|
|
1251
1251
|
`:t}resolveIcon(){return this.loading?ce`
|
|
1252
1252
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?ce`
|
|
1253
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:fe}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Ja.elementDefinitions={"ft-ripple":va,"ft-tooltip":ya,"ft-typography":qn,"ft-icon":aa,"ft-loader":Ya},Xa([
|
|
1253
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:fe}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Ja.elementDefinitions={"ft-ripple":va,"ft-tooltip":ya,"ft-typography":qn,"ft-icon":aa,"ft-loader":Ya},Xa([E({type:String,reflect:!0})],Ja.prototype,"role",void 0),Xa([E()],Ja.prototype,"type",void 0),Xa([E({type:Boolean})],Ja.prototype,"disabled",void 0),Xa([E()],Ja.prototype,"label",void 0),Xa([E()],Ja.prototype,"icon",void 0),Xa([E()],Ja.prototype,"iconVariant",void 0),Xa([E({type:Boolean})],Ja.prototype,"trailingIcon",void 0),Xa([E({type:Boolean})],Ja.prototype,"loading",void 0),Xa([E()],Ja.prototype,"tooltipPosition",void 0),Xa([E({type:Boolean})],Ja.prototype,"hideTooltip",void 0),Xa([E({type:Boolean})],Ja.prototype,"forceTooltip",void 0),Xa([I(".ft-button")],Ja.prototype,"button",void 0),Xa([I(".ft-button--label slot")],Ja.prototype,"slottedContent",void 0);var Qa=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class ts extends Ja{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}get typographyVariant(){return"button"}}ts.styles=[He,wn],Qa([E({type:Boolean})],ts.prototype,"primary",void 0),Qa([E({type:Boolean})],ts.prototype,"outlined",void 0),Qa([E({type:Boolean})],ts.prototype,"dense",void 0),Qa([E({type:Boolean})],ts.prototype,"round",void 0);const es=[Et`
|
|
1254
1254
|
:host {
|
|
1255
1255
|
display: inline-block;
|
|
1256
1256
|
max-width: 100%;
|
|
@@ -1468,15 +1468,15 @@ const{D:ja}=mt,Ba=()=>document.createComment(""),Ka=(t,e,i)=>{const o=t._$AA.par
|
|
|
1468
1468
|
width: ${Le.smallIconOnlyWidth};
|
|
1469
1469
|
padding: unset;
|
|
1470
1470
|
}
|
|
1471
|
-
`,Ze];var is=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class os extends Ja{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?Gn.caption1medium:Gn.body2medium}}os.styles=[He,es],is([
|
|
1471
|
+
`,Ze];var is=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class os extends Ja{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?Gn.caption1medium:Gn.body2medium}}os.styles=[He,es],is([E({type:Boolean})],os.prototype,"primary",void 0),is([E({type:Boolean})],os.prototype,"secondary",void 0),is([E({type:Boolean})],os.prototype,"tertiary",void 0),is([E({type:Boolean})],os.prototype,"neutral",void 0),is([E({type:Boolean})],os.prototype,"small",void 0),T("ft-button")(ts),T("ftds-button")(os);const rs=Et`
|
|
1472
1472
|
`,ns=Et`
|
|
1473
|
-
`,as=Ko.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 ss{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=as.getState(),o=null!=t?t:i;if(e&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,o,!0)}static get(t){var e;return null!=t?ss.build(t):null!==(e=ss.API)&&void 0!==e?e:ss.API=ss.build()}static await(t){return new Promise((e=>{let i=ss.get(t);if(i)e(i);else{const o=as.subscribe((()=>{i=ss.get(t),i&&(o(),e(i))}))}}))}}var ls;const cs=Symbol("clearAfterUnitTest");class hs{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new o,this.listeners={},this.currentUiLocale="",this[ls]=()=>{this.defaultMessages={},this.cache=new o,this.listeners={}},this.currentUiLocale=as.getState().uiLocale,as.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=as.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 i;if(t=t.toLowerCase(),Object.keys(e).length>0){const o={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};_(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var o,r,n;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(r=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==r?r:{};return new Ge(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},a).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,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=>A(0).then((()=>t())).catch((()=>null)))))}}ls=cs,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new hs((async(t,e)=>(await ss.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new hs((async(t,e)=>(await ss.await()).getCustomMessageContext(t,e))));const fs=window.FluidTopicsI18nService,ds=window.FluidTopicsCustomI18nService;var us=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class ps extends Be{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=()=>ss.get(),this.cache=new o,this.cleanSessionDebouncer=new
|
|
1473
|
+
`,as=Ko.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 ss{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=as.getState(),o=null!=t?t:i;if(e&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,o,!0)}static get(t){var e;return null!=t?ss.build(t):null!==(e=ss.API)&&void 0!==e?e:ss.API=ss.build()}static await(t){return new Promise((e=>{let i=ss.get(t);if(i)e(i);else{const o=as.subscribe((()=>{i=ss.get(t),i&&(o(),e(i))}))}}))}}var ls;const cs=Symbol("clearAfterUnitTest");class hs{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new o,this.listeners={},this.currentUiLocale="",this[ls]=()=>{this.defaultMessages={},this.cache=new o,this.listeners={}},this.currentUiLocale=as.getState().uiLocale,as.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=as.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 i;if(t=t.toLowerCase(),Object.keys(e).length>0){const o={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};_(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var o,r,n;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(r=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==r?r:{};return new Ge(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},a).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,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=>A(0).then((()=>t())).catch((()=>null)))))}}ls=cs,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new hs((async(t,e)=>(await ss.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new hs((async(t,e)=>(await ss.await()).getCustomMessageContext(t,e))));const fs=window.FluidTopicsI18nService,ds=window.FluidTopicsCustomI18nService;var us=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class ps extends Be{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=()=>ss.get(),this.cache=new o,this.cleanSessionDebouncer=new L}render(){return ce`
|
|
1474
1474
|
<slot></slot>
|
|
1475
|
-
`}update(t){super.update(t),t.has("baseUrl")&&as.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&as.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&as.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&as.actions.setNoCustom(this.noCustom),t.has("editorMode")&&as.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&as.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&as.actions.setSession(this.session),t.has("availableUiLocales")&&as.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>fs.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()))))}}ps.elementDefinitions={},ps.styles=ns,us([
|
|
1475
|
+
`}update(t){super.update(t),t.has("baseUrl")&&as.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&as.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&as.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&as.actions.setNoCustom(this.noCustom),t.has("editorMode")&&as.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&as.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&as.actions.setSession(this.session),t.has("availableUiLocales")&&as.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>fs.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()))))}}ps.elementDefinitions={},ps.styles=ns,us([E()],ps.prototype,"baseUrl",void 0),us([E()],ps.prototype,"apiIntegrationIdentifier",void 0),us([E()],ps.prototype,"uiLocale",void 0),us([W([])],ps.prototype,"availableUiLocales",void 0),us([E({type:Boolean})],ps.prototype,"editorMode",void 0),us([E({type:Boolean})],ps.prototype,"noCustom",void 0),us([E({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],ps.prototype,"noCustomComponent",void 0),us([E({type:Boolean})],ps.prototype,"withManualResources",void 0),us([W([])],ps.prototype,"messageContexts",void 0),us([W(void 0)],ps.prototype,"session",void 0),us([E({type:Object})],ps.prototype,"apiProvider",void 0);class ys{async listMySearches(){var t;return(null===(t=as.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await ss.await()).listMySearches(as.getState().session.profile.userId):[]}}const gs=new o;class bs{async listMyBookmarks(){return gs.get("bookmarks",(async()=>(await ss.await()).listMyBookmarks(as.getState().session.profile.userId)))}clearCache(){gs.clear("bookmarks")}}const vs=Ko.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});const ms=new class{constructor(){this.currentSession=as.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new bs,as.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=as.getState();_(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){vs.actions.savedSearches(void 0)}clearMyBookmarks(){vs.actions.bookmarks(void 0)}async reloadMySearches(){const t=new ys,e=await t.listMySearches();vs.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;vs.actions.bookmarks(e)}}};T("ft-app-context")(ps);var xs=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const ws=Symbol("i18nProperties"),Os=Symbol("i18nUnsubs");function Ss(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?ds:fs}i18n(t,e,...i){var o;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const r=null!==(o=t.args)&&void 0!==o?o:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[ws])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var e;super.update(t),null===(e=this[ws])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[ws]&&new Set([...this[ws].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Os].has(t)||this[Os].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[Os].forEach((t=>t())),this[Os].clear()}}return e=Os,xs([E({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class $s extends(Ss(Be)){}class Ns extends(Ss(ei)){}var Cs=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class Es extends Ns{constructor(){super(),this.editorMode=!1,this.addStore(as)}render(){return this.key&&this.context?ce`
|
|
1476
1476
|
<span class="ft-i18n">
|
|
1477
1477
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1478
1478
|
</span>
|
|
1479
|
-
`:this.editorMode?"Select a context and a label key.":fe}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}Es.elementDefinitions={},Es.styles=rs,Cs([Zo()],Es.prototype,"editorMode",void 0),Cs([
|
|
1479
|
+
`:this.editorMode?"Select a context and a label key.":fe}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}Es.elementDefinitions={},Es.styles=rs,Cs([Zo()],Es.prototype,"editorMode",void 0),Cs([E()],Es.prototype,"context",void 0),Cs([E()],Es.prototype,"key",void 0),Cs([W([])],Es.prototype,"args",void 0),Cs([E()],Es.prototype,"defaultMessage",void 0);class ks{static build(t){return new ks(t)}static fromGwt(t){return new ks(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)=>fs.resolveMessage(this.name,e,...t)})}}const Rs=(t,e)=>(i,o)=>{var r,n;i.constructor.createProperty(o,null!=e?e:{attribute:!1,type:String});const a={...t,key:null!==(r=t.key)&&void 0!==r?r:o};i[ws]=null!==(n=i[ws])&&void 0!==n?n:new Map,i[ws].set(o,a)};T("ft-i18n")(Es);const Is=ks.build("integratedFeedbackComponent"),Us={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",feedbackfromEmail:"Your email",feedbackfromEmailInvalid:"Please enter a valid email address",okButton:"Send feedback",cancelButton:"Cancel",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later.",mapFeedbackMainTitle:"Send feedback",mapRatingSectionTitle:"Rate this document",mapDichotomousRatingSectionTitle:"Did it solve your problem?",mapFeedbackSectionTitle:"Write your review",topicFeedbackMainTitle:"Send feedback",topicRatingSectionTitle:"Rate this content",topicDichotomousRatingSectionTitle:"Did this content solve your problem?",topicFeedbackSectionTitle:"Write your review"},Ls=ks.build("inDesignerFeedbackComponent"),As={ratingNotConfigured:"Rating unavailable: no rating configured for this content.",missingRatingRole:"Rating unavailable: missing role RATING_USER.",missingFeedbackRole:"Feedback unavailable: missing role FEEDBACK_USER.",inDesignerOnlyNotice:"This notice will not appear outside this designer.",feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."},_s={fontSize:Ee.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:Ee.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:Ee.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:Ee.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:Ee.extend("--ft-text-field-helper-color","",Ae.colorOnSurfaceMedium),colorPrimary:Ee.external(Ae.colorPrimary,"Design system"),colorOnSurface:Ee.external(Ae.colorOnSurface,"Design system"),colorOnSurfaceDisabled:Ee.external(Ae.colorOnSurfaceDisabled,"Design system"),borderRadiusS:Ee.external(Ae.borderRadiusS,"Design system"),colorError:Ee.external(Ae.colorError,"Design system"),prefixColor:Ee.extend("--ft-text-field-prefix-color","",Ae.colorOnSurfaceMedium),iconColor:Ee.extend("--ft-text-field-icon-color","",Ae.colorOnSurfaceMedium),floatingZIndex:Ee.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),colorSurface:Ee.external(Ae.colorSurface,"Design system"),colorOutline:Ee.external(Ae.colorOutline,"Design system"),elevation02:Ee.external(Ae.elevation02,"Design system"),suggestSize:Ee.create("--ft-text-field-suggest-size","","SIZE","300px")},Ts=Et`
|
|
1480
1480
|
*:focus {
|
|
1481
1481
|
outline: none;
|
|
1482
1482
|
}
|
|
@@ -1683,7 +1683,7 @@ const{D:ja}=mt,Ba=()=>document.createComment(""),Ka=(t,e,i)=>{const o=t._$AA.par
|
|
|
1683
1683
|
.variant=${this.iconVariant}
|
|
1684
1684
|
.value=${this.icon}
|
|
1685
1685
|
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}></ft-icon>
|
|
1686
|
-
`:fe}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}Ds.elementDefinitions={"ft-input-label":Da,"ft-ripple":va,"ft-typography":qn,"ft-icon":aa},Ds.styles=[tn,Ts],Ws([
|
|
1686
|
+
`:fe}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}Ds.elementDefinitions={"ft-input-label":Da,"ft-ripple":va,"ft-typography":qn,"ft-icon":aa},Ds.styles=[tn,Ts],Ws([E()],Ds.prototype,"label",void 0),Ws([E({noAccessor:!0})],Ds.prototype,"value",null),Ws([k()],Ds.prototype,"dispatchedValue",void 0),Ws([E()],Ds.prototype,"helper",void 0),Ws([E({type:Boolean})],Ds.prototype,"outlined",void 0),Ws([E({type:Boolean})],Ds.prototype,"disabled",void 0),Ws([E({type:Boolean})],Ds.prototype,"error",void 0),Ws([E()],Ds.prototype,"prefix",void 0),Ws([E()],Ds.prototype,"icon",void 0),Ws([E()],Ds.prototype,"passwordHiddenIcon",void 0),Ws([E()],Ds.prototype,"passwordRevealedIcon",void 0),Ws([E()],Ds.prototype,"iconVariant",void 0),Ws([E({type:Boolean})],Ds.prototype,"filterSuggestions",void 0),Ws([E({type:Number})],Ds.prototype,"maxLength",void 0),Ws([E({type:Boolean})],Ds.prototype,"password",void 0),Ws([k()],Ds.prototype,"focused",void 0),Ws([k()],Ds.prototype,"hidePassword",void 0),Ws([k()],Ds.prototype,"suggestionsOnTop",void 0),Ws([k()],Ds.prototype,"hideSuggestions",void 0),Ws([k()],Ds.prototype,"visibleSuggestions",void 0),Ws([I(".ft-text-field--main-panel")],Ds.prototype,"mainPanel",void 0),Ws([I(".ft-text-field--input")],Ds.prototype,"input",void 0),Ws([I(".ft-text-field--suggestions")],Ds.prototype,"suggestionsContainer",void 0),Ws([function(t){return(e,i)=>{const{slot:o,selector:r}=t??{},n="slot"+(o?`[name=${o}]`:":not([name])");return R(0,0,{get(){const e=this.renderRoot?.querySelector(n),i=e?.assignedElements(t)??[];return void 0===r?i:i.filter((t=>t.matches(r)))}})}}({selector:"ft-text-field-suggestion"})],Ds.prototype,"suggestions",void 0);const Fs=Et`
|
|
1687
1687
|
.ft-text-field-suggestion {
|
|
1688
1688
|
position: relative;
|
|
1689
1689
|
padding: 8px 16px;
|
|
@@ -1720,15 +1720,15 @@ const{D:ja}=mt,Ba=()=>document.createComment(""),Ka=(t,e,i)=>{const o=t._$AA.par
|
|
|
1720
1720
|
<slot></slot>
|
|
1721
1721
|
</ft-typography>
|
|
1722
1722
|
</div>
|
|
1723
|
-
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Ms(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}zs.elementDefinitions={"ft-ripple":va,"ft-typography":qn,"ft-icon":aa},zs.styles=Fs,Ps([k()],zs.prototype,"value",void 0),Ps([U(".ft-text-field-suggestion")],zs.prototype,"container",void 0),Ps([L()],zs.prototype,"assignedNodes",void 0),T("ft-text-field")(Ds),T("ft-text-field-suggestion")(zs);class js{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,e,i){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,i)),null==t.tocId?this.extractPagesToc(t.children,e,i):[{tocId:t.tocId,title:t.title,depth:e,children:this.extractPagesToc(t.children,e+1,t.tocId)}])))}convertNodes(t,e,i){return t.flatMap((t=>{var o,r,n;if(null==t.tocId)return[...this.convertSectionNodes(null!==(o=t.pageToc)&&void 0!==o?o:[],e,t.tocId),...this.convertNodes(t.children,e,t.tocId)];let a=null===(r=t.prettyUrl)||void 0===r?void 0:r.replace(/^\//,"");const s={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,origin:t.origin,prettyUrl:a,depth:e,parentTocId:i,children:[]};this.register(s);const l=this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],e+1,t.tocId),c=this.convertNodes(t.children,e+1,s.tocId);return s.children=[...l,...c],[s]}))}convertSectionNodes(t,e,i){return t.flatMap((t=>{var o;let r=null===(o=t.prettyUrl)||void 0===o?void 0:o.replace(/^\//,"");const n={...t,prettyUrl:r,depth:e,parentTocId:i,children:[]};return this.register(n),n.children=this.convertSectionNodes(t.children,e+1,t.tocId),[n]}))}buildPage(t,e){var i,o,r,n,a,s;const l={number:this.pages.length+1,title:null!==(i=t.title)&&void 0!==i?i:"",rootTocId:null!==(o=t.tocId)&&void 0!==o?o:"root",toc:(null!==(r=t.pageToc)&&void 0!==r?r:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:e?this.buildBreadcrumb(this.nodeByTocId[e]):[]},c=(t,e)=>(e?l.topics:l.hiddenTopics).push(t),h=null!==(a=null===(n=t.pageConfiguration)||void 0===n?void 0:n.parentsVisibility)&&void 0!==a?a:[];return l.breadcrumb.forEach(((t,e)=>{c(t,h[e])})),t.tocId&&c(t.tocId,t.pageConfiguration.isVisible),l.topics.push(...this.tocIds(null!==(s=t.pageToc)&&void 0!==s?s:[])),l}registerPage(t){for(let e of[...t.topics,...t.hiddenTopics])this.pageByTocId[e]||(this.pageByTocId[e]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const e=[t.tocId];for(;null==t?void 0:t.parentTocId;)e.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return e}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class Bs{convertPaginatedToc(t){return new js(t).build()}}class Ks{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,e,i,o){this.converter=t,this.api=e,this.cache=i,this._mapId=o,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.withMapId((t=>this.fetchMap(t))))),this.cache.register("enrichedToc",(()=>this.withMapId((t=>this.fetchPages(t).then((t=>this.converter.convertPaginatedToc(t))))))),this.cache.register("ratingSummary",(()=>{var t,e;return zn(null!==(e=null===(t=as.getState().session)||void 0===t?void 0:t.profile.roles)&&void 0!==e?e:[],"RATING_USER")?this.withMapId((t=>this.fetchMapRating(t))):Promise.resolve()}))}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var e;return null===(e=this.enrichedToc)||void 0===e?void 0:e.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,(()=>this.fetchTopicMetadata(t)))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,(()=>this.fetchTopicHTMLContent(t)))}getLink(t,e,i){const o=this.getNavigationData(t,e,i),r=this.getReaderLinkPrefix()+(o.prettyUrl?o.prettyUrl:`${o.mapId}/${o.tocId}`),n=new URL(r,this.api.tenantBaseUrl);return null!=o.page&&n.searchParams.set("page",`${o.page}`),o.prettyUrlDuplicated&&n.searchParams.set("tocId",o.tocId),null!=o.section&&n.searchParams.set("section",o.section),n.href}getNavigationData(t,e,i){var o,r;t=t||"root";const n=this.enrichedToc,a=null==n?void 0:n.pageByTocId[t],s=null==n?void 0:n.nodeByTocId[t],l=null==s?void 0:s.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(o=null==s?void 0:s.title)&&void 0!==o?o:"",page:e&&a&&a.number!==e?e:void 0,prettyUrl:null!=l?l.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(r=null==n?void 0:n.duplicatedPrettyUrls.has(null!=l?l:""))&&void 0!==r&&r,section:i}}async getAccurateNavigationData(t,e,i){return await this.getEnrichedToc(),this.getNavigationData(t,e,i)}getRatingSummary(){return this.cache.get("ratingSummary")}getMapRating(){return this.getRatingSummary().then((t=>null==t?void 0:t.publication))}getTopicRating(t){return this.getRatingSummary().then((e=>{var i;return e?{type:e.topics.type,rating:null===(i=e.topics)||void 0===i?void 0:i.ratings.find((e=>e.tocId===t))}:void 0}))}rateMap(t,e){return this.makeRateMapRequest(t,e).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.makeUnrateMapRequest().then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t,e){return this.makeMapFeedbackRequest(t,e)}rateTopic(t,e,i){return this.makeRateTopicRequest(t,e,i).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.makeUnrateTopicRequest(t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){const t=as.getState().session;(null==t?void 0:t.sessionAuthenticated)&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,e,i){return this.makeTopicFeedbackRequest(t,e,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t){let e=this.getTocNodeNow(t),i=[{tocId:e.tocId,title:e.title}],o=this.getTocNodeNow(e.parentTocId);for(;o;)i.unshift({tocId:o.tocId,title:o.title}),o=this.getTocNodeNow(o.parentTocId);return i}isFeatureAccessible(t,{session:e,ratingType:i}){if(!this.isFeatureAvailable(t))return!1;switch(t){case Jo.FEEDBACK:return zn(null!=e?e:[],Fn.FEEDBACK_USER);case Jo.RATING:return zn(null!=e?e:[],Fn.RATING_USER)&&null!=i&&i!==kn.NO_RATING;case Jo.PRINT:return zn(null!=e?e:[],Fn.PRINT_USER);case Jo.BOOKMARK:return!!(null==e?void 0:e.sessionAuthenticated);case Jo.COLLECTIONS:return zn(null!=e?e:[],Fn.COLLECTION_USER);case Jo.PERSONAL_BOOKS:return zn(null!=e?e:[],Fn.PERSONAL_BOOK_USER);default:return!1}}}class Zs extends Ks{static async build(t){return new Zs(new Bs,await ss.await(),new o,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t){var e;const i=await this.api.getMap(t);return this.fingerprint=null===(e=i.lastPublication)||void 0===e?void 0:e.replace(/\D/g,""),i}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t){return await this.getMap(),this.api.getPages(t,this.fingerprint)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}makeMapFeedbackRequest(t,e){return this.api.sendMapFeedback(this.mapId,t,e)}makeRateMapRequest(t,e){return this.api.rateMap(this.mapId,t,e)}makeRateTopicRequest(t,e,i){return this.api.rateTopic(this.mapId,t,e,i)}makeTopicFeedbackRequest(t,e,i){return this.api.sendTopicFeedback(this.mapId,t,e,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}}class Hs{static build(t,e){return new Hs((t=>Ko.get({name:"ft-reader-"+t,initialState:{mapId:void 0,visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0}}))(t.trim()||"context"),null!=e?e:Zs.build)}constructor(t,e){this.store=t,this.reloadDebouncer=new r(10),this.initService(e)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){for(;null==this.service;)await A(5);return this.service}async navigateToTopic(t,e,i){const o=await this.awaitService(),r=await(null!=i?o.getPage(i):o.getPageByTocId(null!=t?t:"root"));this.store.actions.currentPage(r),this.store.actions.scrollTarget({tocId:this.resolveValidNonRootTocId(t,r),section:e})}resolveValidNonRootTocId(t,e){var i,o,r;let n=null!==(i="root"===t?void 0:t)&&void 0!==i?i:e.rootTocId;return e.topics.includes(n)?n:null!==(r=null!==(o=e.topics[0])&&void 0!==o?o:e.hiddenTopics[0])&&void 0!==r?r:"root"}async navigateToPage(t){const e=await this.awaitService();let i=await e.getPage(t);this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async reload(){var t,e;this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),null===(t=this.service)||void 0===t||t.clear(),(null===(e=this.service)||void 0===e?void 0:e.mapId)&&await this.reloadDebouncer.run((()=>this.fetchData()))}async fetchData(){var t,i,o,r,n;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.configuration(t))),null===(i=this.service)||void 0===i?void 0:i.getMap().then((t=>this.store.actions.map(t))),null===(o=this.service)||void 0===o?void 0:o.getToc().then((t=>this.store.actions.toc(t))),null===(r=this.service)||void 0===r?void 0:r.getPagesToc().then((t=>this.store.actions.pagesToc(t))),null===(n=this.service)||void 0===n?void 0:n.getPaginationConfiguration().then((t=>this.store.actions.paginationConfiguration(t)))])}catch(t){!this.errorHandler||t instanceof e||this.errorHandler(t)}}setSearchInDocumentQuery(t){this.store.actions.searchInDocumentQuery(t)}}const Gs=Et`
|
|
1724
|
-
`;class Vs extends CustomEvent{constructor(t,e){super("ft-reader-map-loaded",{detail:{map:t,toc:e}})}}class qs extends CustomEvent{constructor(t,e){super("ft-reader-visible-topics-change",{detail:{visibleTopics:e}})}}class Ys extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}}class Xs extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}}class Js extends Event{constructor(){super("ft-reader-map-not-found")}}class Qs extends Event{constructor(){super("ft-reader-map-unauthorized")}}var tl=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class el extends ei{constructor(){super(),this.visibleTopics=[],this.scrollToTargetDebouncer=new
|
|
1723
|
+
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Ms(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}zs.elementDefinitions={"ft-ripple":va,"ft-typography":qn,"ft-icon":aa},zs.styles=Fs,Ps([E()],zs.prototype,"value",void 0),Ps([I(".ft-text-field-suggestion")],zs.prototype,"container",void 0),Ps([U()],zs.prototype,"assignedNodes",void 0),T("ft-text-field")(Ds),T("ft-text-field-suggestion")(zs);class js{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,e,i){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,i)),null==t.tocId?this.extractPagesToc(t.children,e,i):[{tocId:t.tocId,title:t.title,depth:e,children:this.extractPagesToc(t.children,e+1,t.tocId)}])))}convertNodes(t,e,i){return t.flatMap((t=>{var o,r,n;if(null==t.tocId)return[...this.convertSectionNodes(null!==(o=t.pageToc)&&void 0!==o?o:[],e,t.tocId),...this.convertNodes(t.children,e,t.tocId)];let a=null===(r=t.prettyUrl)||void 0===r?void 0:r.replace(/^\//,"");const s={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,origin:t.origin,prettyUrl:a,depth:e,parentTocId:i,children:[]};this.register(s);const l=this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],e+1,t.tocId),c=this.convertNodes(t.children,e+1,s.tocId);return s.children=[...l,...c],[s]}))}convertSectionNodes(t,e,i){return t.flatMap((t=>{var o;let r=null===(o=t.prettyUrl)||void 0===o?void 0:o.replace(/^\//,"");const n={...t,prettyUrl:r,depth:e,parentTocId:i,children:[]};return this.register(n),n.children=this.convertSectionNodes(t.children,e+1,t.tocId),[n]}))}buildPage(t,e){var i,o,r,n,a,s;const l={number:this.pages.length+1,title:null!==(i=t.title)&&void 0!==i?i:"",rootTocId:null!==(o=t.tocId)&&void 0!==o?o:"root",toc:(null!==(r=t.pageToc)&&void 0!==r?r:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:e?this.buildBreadcrumb(this.nodeByTocId[e]):[]},c=(t,e)=>(e?l.topics:l.hiddenTopics).push(t),h=null!==(a=null===(n=t.pageConfiguration)||void 0===n?void 0:n.parentsVisibility)&&void 0!==a?a:[];return l.breadcrumb.forEach(((t,e)=>{c(t,h[e])})),t.tocId&&c(t.tocId,t.pageConfiguration.isVisible),l.topics.push(...this.tocIds(null!==(s=t.pageToc)&&void 0!==s?s:[])),l}registerPage(t){for(let e of[...t.topics,...t.hiddenTopics])this.pageByTocId[e]||(this.pageByTocId[e]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const e=[t.tocId];for(;null==t?void 0:t.parentTocId;)e.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return e}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class Bs{convertPaginatedToc(t){return new js(t).build()}}class Ks{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,e,i,o){this.converter=t,this.api=e,this.cache=i,this._mapId=o,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.withMapId((t=>this.fetchMap(t))))),this.cache.register("enrichedToc",(()=>this.withMapId((t=>this.fetchPages(t).then((t=>this.converter.convertPaginatedToc(t))))))),this.cache.register("ratingSummary",(()=>{var t,e;return zn(null!==(e=null===(t=as.getState().session)||void 0===t?void 0:t.profile.roles)&&void 0!==e?e:[],"RATING_USER")?this.withMapId((t=>this.fetchMapRating(t))):Promise.resolve()}))}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var e;return null===(e=this.enrichedToc)||void 0===e?void 0:e.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,(()=>this.fetchTopicMetadata(t)))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,(()=>this.fetchTopicHTMLContent(t)))}getLink(t,e,i){const o=this.getNavigationData(t,e,i),r=this.getReaderLinkPrefix()+(o.prettyUrl?o.prettyUrl:`${o.mapId}/${o.tocId}`),n=new URL(r,this.api.tenantBaseUrl);return null!=o.page&&n.searchParams.set("page",`${o.page}`),o.prettyUrlDuplicated&&n.searchParams.set("tocId",o.tocId),null!=o.section&&n.searchParams.set("section",o.section),n.href}getNavigationData(t,e,i){var o,r;t=t||"root";const n=this.enrichedToc,a=null==n?void 0:n.pageByTocId[t],s=null==n?void 0:n.nodeByTocId[t],l=null==s?void 0:s.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(o=null==s?void 0:s.title)&&void 0!==o?o:"",page:e&&a&&a.number!==e?e:void 0,prettyUrl:null!=l?l.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(r=null==n?void 0:n.duplicatedPrettyUrls.has(null!=l?l:""))&&void 0!==r&&r,section:i}}async getAccurateNavigationData(t,e,i){return await this.getEnrichedToc(),this.getNavigationData(t,e,i)}getRatingSummary(){return this.cache.get("ratingSummary")}getMapRating(){return this.getRatingSummary().then((t=>null==t?void 0:t.publication))}getTopicRating(t){return this.getRatingSummary().then((e=>{var i;return e?{type:e.topics.type,rating:null===(i=e.topics)||void 0===i?void 0:i.ratings.find((e=>e.tocId===t))}:void 0}))}rateMap(t,e){return this.makeRateMapRequest(t,e).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.makeUnrateMapRequest().then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t,e){return this.makeMapFeedbackRequest(t,e)}rateTopic(t,e,i){return this.makeRateTopicRequest(t,e,i).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.makeUnrateTopicRequest(t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){const t=as.getState().session;(null==t?void 0:t.sessionAuthenticated)&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,e,i){return this.makeTopicFeedbackRequest(t,e,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t){let e=this.getTocNodeNow(t),i=[{tocId:e.tocId,title:e.title}],o=this.getTocNodeNow(e.parentTocId);for(;o;)i.unshift({tocId:o.tocId,title:o.title}),o=this.getTocNodeNow(o.parentTocId);return i}isFeatureAccessible(t,{session:e,ratingType:i}){if(!this.isFeatureAvailable(t))return!1;switch(t){case Jo.FEEDBACK:return zn(null!=e?e:[],Fn.FEEDBACK_USER);case Jo.RATING:return zn(null!=e?e:[],Fn.RATING_USER)&&null!=i&&i!==kn.NO_RATING;case Jo.PRINT:return zn(null!=e?e:[],Fn.PRINT_USER);case Jo.BOOKMARK:return!!(null==e?void 0:e.sessionAuthenticated);case Jo.COLLECTIONS:return zn(null!=e?e:[],Fn.COLLECTION_USER);case Jo.PERSONAL_BOOKS:return zn(null!=e?e:[],Fn.PERSONAL_BOOK_USER);default:return!1}}}class Zs extends Ks{static async build(t){return new Zs(new Bs,await ss.await(),new o,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t){var e;const i=await this.api.getMap(t);return this.fingerprint=null===(e=i.lastPublication)||void 0===e?void 0:e.replace(/\D/g,""),i}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t){return await this.getMap(),this.api.getPages(t,this.fingerprint)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}makeMapFeedbackRequest(t,e){return this.api.sendMapFeedback(this.mapId,t,e)}makeRateMapRequest(t,e){return this.api.rateMap(this.mapId,t,e)}makeRateTopicRequest(t,e,i){return this.api.rateTopic(this.mapId,t,e,i)}makeTopicFeedbackRequest(t,e,i){return this.api.sendTopicFeedback(this.mapId,t,e,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}}class Hs{static build(t,e){return new Hs((t=>Ko.get({name:"ft-reader-"+t,initialState:{mapId:void 0,visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0}}))(t.trim()||"context"),null!=e?e:Zs.build)}constructor(t,e){this.store=t,this.reloadDebouncer=new L(10),this.initService(e)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){for(;null==this.service;)await A(5);return this.service}async navigateToTopic(t,e,i){const o=await this.awaitService(),r=await(null!=i?o.getPage(i):o.getPageByTocId(null!=t?t:"root"));this.store.actions.currentPage(r),this.store.actions.scrollTarget({tocId:this.resolveValidNonRootTocId(t,r),section:e})}resolveValidNonRootTocId(t,e){var i,o,r;let n=null!==(i="root"===t?void 0:t)&&void 0!==i?i:e.rootTocId;return e.topics.includes(n)?n:null!==(r=null!==(o=e.topics[0])&&void 0!==o?o:e.hiddenTopics[0])&&void 0!==r?r:"root"}async navigateToPage(t){const e=await this.awaitService();let i=await e.getPage(t);this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async reload(){var t,e;this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),null===(t=this.service)||void 0===t||t.clear(),(null===(e=this.service)||void 0===e?void 0:e.mapId)&&await this.reloadDebouncer.run((()=>this.fetchData()))}async fetchData(){var t,i,o,r,n;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.configuration(t))),null===(i=this.service)||void 0===i?void 0:i.getMap().then((t=>this.store.actions.map(t))),null===(o=this.service)||void 0===o?void 0:o.getToc().then((t=>this.store.actions.toc(t))),null===(r=this.service)||void 0===r?void 0:r.getPagesToc().then((t=>this.store.actions.pagesToc(t))),null===(n=this.service)||void 0===n?void 0:n.getPaginationConfiguration().then((t=>this.store.actions.paginationConfiguration(t)))])}catch(t){!this.errorHandler||t instanceof e||this.errorHandler(t)}}setSearchInDocumentQuery(t){this.store.actions.searchInDocumentQuery(t)}}const Gs=Et`
|
|
1724
|
+
`;class Vs extends CustomEvent{constructor(t,e){super("ft-reader-map-loaded",{detail:{map:t,toc:e}})}}class qs extends CustomEvent{constructor(t,e){super("ft-reader-visible-topics-change",{detail:{visibleTopics:e}})}}class Ys extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}}class Xs extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}}class Js extends Event{constructor(){super("ft-reader-map-not-found")}}class Qs extends Event{constructor(){super("ft-reader-map-unauthorized")}}var tl=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class el extends ei{constructor(){super(),this.visibleTopics=[],this.scrollToTargetDebouncer=new L(5),this.navigationDebouncer=new L(10),this.addStore(as)}render(){return ce`
|
|
1725
1725
|
${this.importStyleIfNeeded()}
|
|
1726
1726
|
<slot @register-ft-reader-component=${this.registerComponent}></slot>
|
|
1727
1727
|
`}importStyleIfNeeded(){var t,e;const i=null===(t=this.stateManager.service)||void 0===t?void 0:t.themeStylesheet();return!i||window.location.href.startsWith(null!==(e=this.baseUrl)&&void 0!==e?e:"")?fe:ce`
|
|
1728
1728
|
<style>
|
|
1729
1729
|
@import "${i}"
|
|
1730
1730
|
</style>
|
|
1731
|
-
`}get stateManager(){return null==this._stateManager&&(this._stateManager=Hs.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0"),this.readerServiceProvider),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then((t=>{const e=t.fontsStylesheet();if(e&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${e}"]`)){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.head.append(t)}}))}update(t){super.update(t),t.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),t.has("mapId")&&this.mapId&&this.stateManager.setMapId(this.mapId),t.has("searchInDocumentQuery")&&null!=this.searchInDocumentQuery&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId"].some((e=>t.has(e)))&&this.mapId&&this.navigateToTarget()}contentAvailableCallback(t){var e;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.map&&this.toc&&this.dispatchEvent(new Vs(this.map,this.toc)),t.has("scrollTarget")&&null==(null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)){const e=t.get("scrollTarget");null!=(null==e?void 0:e.tocId)&&this.scrollToTargetDebouncer.run((()=>{var t;return this.stateManager.service.getAccurateNavigationData(e.tocId,null===(t=this.currentPage)||void 0===t?void 0:t.number,e.section).then((t=>this.dispatchEvent(new Ys(t))))}))}t.has("visibleTopics")&&Promise.all(this.visibleTopics.map((t=>{var e;return this.stateManager.service.getAccurateNavigationData(t,null===(e=this.currentPage)||void 0===e?void 0:e.number)}))).then((t=>{let e=t.filter((t=>null!=t&&""!==t.topicTitle)).map((t=>{var e;return{tocId:t.tocId,title:t.topicTitle,page:t.page,prettyUrl:t.prettyUrl,prettyUrlDuplicated:t.prettyUrlDuplicated,breadcrumb:null===(e=this.stateManager.service)||void 0===e?void 0:e.buildBreadcrumb(t.tocId)}}));this.dispatchEvent(new qs(this.map,e))}))}async reload(){await this.stateManager.reload(),this.navigateToTarget()}navigateToTarget(){this.navigationDebouncer.run((()=>{null!=this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):null!=this.page&&this.stateManager.navigateToPage(this.page)}))}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){const e=t;404===e.status?this.dispatchEvent(new Js):401===e.status?this.dispatchEvent(new Qs):this.dispatchEvent(new Xs(t))}reloadBookmarks(){ms.reloadBookmarks()}}var il;el.styles=Gs,tl([Zo({store:as.name})],el.prototype,"baseUrl",void 0),tl([
|
|
1731
|
+
`}get stateManager(){return null==this._stateManager&&(this._stateManager=Hs.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0"),this.readerServiceProvider),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then((t=>{const e=t.fontsStylesheet();if(e&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${e}"]`)){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.head.append(t)}}))}update(t){super.update(t),t.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),t.has("mapId")&&this.mapId&&this.stateManager.setMapId(this.mapId),t.has("searchInDocumentQuery")&&null!=this.searchInDocumentQuery&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId"].some((e=>t.has(e)))&&this.mapId&&this.navigateToTarget()}contentAvailableCallback(t){var e;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.map&&this.toc&&this.dispatchEvent(new Vs(this.map,this.toc)),t.has("scrollTarget")&&null==(null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)){const e=t.get("scrollTarget");null!=(null==e?void 0:e.tocId)&&this.scrollToTargetDebouncer.run((()=>{var t;return this.stateManager.service.getAccurateNavigationData(e.tocId,null===(t=this.currentPage)||void 0===t?void 0:t.number,e.section).then((t=>this.dispatchEvent(new Ys(t))))}))}t.has("visibleTopics")&&Promise.all(this.visibleTopics.map((t=>{var e;return this.stateManager.service.getAccurateNavigationData(t,null===(e=this.currentPage)||void 0===e?void 0:e.number)}))).then((t=>{let e=t.filter((t=>null!=t&&""!==t.topicTitle)).map((t=>{var e;return{tocId:t.tocId,title:t.topicTitle,page:t.page,prettyUrl:t.prettyUrl,prettyUrlDuplicated:t.prettyUrlDuplicated,breadcrumb:null===(e=this.stateManager.service)||void 0===e?void 0:e.buildBreadcrumb(t.tocId)}}));this.dispatchEvent(new qs(this.map,e))}))}async reload(){await this.stateManager.reload(),this.navigateToTarget()}navigateToTarget(){this.navigationDebouncer.run((()=>{null!=this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):null!=this.page&&this.stateManager.navigateToPage(this.page)}))}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){const e=t;404===e.status?this.dispatchEvent(new Js):401===e.status?this.dispatchEvent(new Qs):this.dispatchEvent(new Xs(t))}reloadBookmarks(){ms.reloadBookmarks()}}var il;el.styles=Gs,tl([Zo({store:as.name})],el.prototype,"baseUrl",void 0),tl([E()],el.prototype,"mapId",void 0),tl([E()],el.prototype,"tocId",void 0),tl([E()],el.prototype,"section",void 0),tl([E()],el.prototype,"searchInDocumentQuery",void 0),tl([E({type:Number,converter:{fromAttribute:t=>+(null!=t?t:"NaN")>0?+t:il}})],el.prototype,"page",void 0),tl([Zo({store:"reader"})],el.prototype,"map",void 0),tl([Zo({store:"reader"})],el.prototype,"toc",void 0),tl([Zo({store:"reader"})],el.prototype,"visibleTopics",void 0),tl([Zo({store:"reader"})],el.prototype,"currentPage",void 0),tl([Zo({store:"reader"})],el.prototype,"scrollTarget",void 0),tl([E({attribute:!1})],el.prototype,"readerServiceProvider",void 0),T("ft-reader-context")(el);var ol=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class rl extends(Ss(ir)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.ratingAllowed=!1,this.from="",this.feedbackMessage="",this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.addI18nContext(Is,Us),this.addI18nContext(Ls,As)}get canAccessFeedback(){var t;return null===(t=this.service)||void 0===t?void 0:t.isFeatureAccessible(Jo.FEEDBACK,{session:this.session})}get canAccessRating(){var t,e;return null===(t=this.service)||void 0===t?void 0:t.isFeatureAccessible(Jo.RATING,{session:this.session,ratingType:null===(e=this.ratingSummary)||void 0===e?void 0:e.type})}get userHasRatingRole(){return this.session&&zn(this.session,"RATING_USER")}get configuredRatingType(){var t,e;return null!==(e=this.ratingAllowed?null===(t=this.ratingSummary)||void 0===t?void 0:t.type:"NO_RATING")&&void 0!==e?e:"NO_RATING"}get ratingType(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.type)&&void 0!==i?i:"NO_RATING"}get ratingValue(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.value)&&void 0!==i?i:-1}get ratingDate(){var t,e;const i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.date;return"string"==typeof i?((o=i).match(/^\d{4}-\d{2}-\d{2}$/)&&(o=o.replace(/-/g,"/")),o=o.replace(" ","T").replace(/^(.+)(\+\d{2})(\d{2})$/,((t,e,i,o)=>e+i+":"+o)),new Date(o)):i;var o}render(){return this.editorMode||this.canAccessFeedback||this.canAccessRating?ce`
|
|
1732
1732
|
<div class="ft-reader-feedback">
|
|
1733
1733
|
${this.hideTitle?fe:ce`
|
|
1734
1734
|
<ft-typography variant="title" part="main-title">
|
|
@@ -1833,7 +1833,7 @@ const{D:ja}=mt,Ba=()=>document.createComment(""),Ka=(t,e,i)=>{const o=t._$AA.par
|
|
|
1833
1833
|
<ft-icon>INFO</ft-icon>
|
|
1834
1834
|
</ft-tooltip>
|
|
1835
1835
|
</div>
|
|
1836
|
-
`:fe}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}rl.elementDefinitions={"ft-button":ts,"ft-typography":qn,"ft-icon":aa,"ft-tooltip":ya,"ft-switch":Ea,"ft-switch-option":$a,"ft-text-area":za,"ft-text-field":Ds},rl.styles=$n,ol([
|
|
1836
|
+
`:fe}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}rl.elementDefinitions={"ft-button":ts,"ft-typography":qn,"ft-icon":aa,"ft-tooltip":ya,"ft-switch":Ea,"ft-switch-option":$a,"ft-text-area":za,"ft-text-field":Ds},rl.styles=$n,ol([E({type:Boolean})],rl.prototype,"editorMode",void 0),ol([E({type:Boolean})],rl.prototype,"hideTitle",void 0),ol([E({type:Boolean})],rl.prototype,"ratingAllowed",void 0),ol([E({attribute:!1})],rl.prototype,"i18nProperties",void 0),ol([E({attribute:!1})],rl.prototype,"ratingSummary",void 0),ol([E({attribute:!1})],rl.prototype,"session",void 0),ol([I(".ft-reader-feedback--feedback-input")],rl.prototype,"feedbackInput",void 0),ol([k()],rl.prototype,"from",void 0),ol([k()],rl.prototype,"feedbackMessage",void 0),ol([E()],rl.prototype,"iconVariant",void 0),ol([E()],rl.prototype,"emptyStarIcon",void 0),ol([E()],rl.prototype,"filledStarIcon",void 0),ol([E()],rl.prototype,"emptyLikeIcon",void 0),ol([E()],rl.prototype,"filledLikeIcon",void 0),ol([E()],rl.prototype,"emptyDislikeIcon",void 0),ol([E()],rl.prototype,"filledDislikeIcon",void 0),ol([Zo({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],rl.prototype,"configuration",void 0),ol([E()],rl.prototype,"feedbackMailLinkBuilder",void 0);const nl=ks.fromGwt("server");class al{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(t,e,i,o,r){var n;this.subject=t,this.url=e,this.configuration=o,this.isAuthenticated=r,this.subjectMetadata=this.filterMetadata(i,o.subjectMetadataIds).map((t=>"["+t.values[t.values.length-1]+"]")).join(""),this.bodyMetadata=this.filterMetadata(i,null!==(n=o.bodyMetadataIds)&&void 0!==n?n:[]).map((t=>"["+t.values.join(", ")+"]")).join(" ")}filterMetadata(t,e){return e.map((e=>t.find((t=>t.key===e)))).filter((t=>null!=t&&t.values.length>0))}build(t){var e,i,o;if(0===t.length||this.isAuthenticated&&(null==this.configuration||(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopics))||(null===(i=this.configuration)||void 0===i?void 0:i.mailsSentByFluidTopicsForUnauthenticatedUsers))return;const r=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`\n${this.bodyMetadata}\n${this.url}\n_________________________________________________________________\n\n${t}\n\n_________________________________________________________________\n${nl.messages["mail.feedback.disclaimer"]()}`);return`mailto:${null===(o=this.configuration)||void 0===o?void 0:o.recipients.join(",")}?subject=${r}&body=${n}`}}var sl=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class ll extends(Ss(ir)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=ra.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new al,this.i18nProperties={feedbackMainTitle:Is.properties.mapFeedbackMainTitle(),ratingSectionTitle:Is.properties.mapRatingSectionTitle(),dichotomousRatingSectionTitle:Is.properties.mapDichotomousRatingSectionTitle(),feedbackSectionTitle:Is.properties.mapFeedbackSectionTitle()},this.updateDebouncer=new L(100),this.sendRatingDebouncer=new L(500),this.addStore(as)}render(){return this.map&&(this.editorMode||this.componentVisible)?ce`
|
|
1837
1837
|
<ft-reader-feedback
|
|
1838
1838
|
ratingAllowed
|
|
1839
1839
|
.i18nProperties=${this.i18nProperties}
|
|
@@ -1859,7 +1859,7 @@ const{D:ja}=mt,Ba=()=>document.createComment(""),Ka=(t,e,i)=>{const o=t._$AA.par
|
|
|
1859
1859
|
display: none !important;
|
|
1860
1860
|
}
|
|
1861
1861
|
</style>
|
|
1862
|
-
`}get componentVisible(){var t,e,i;return(null===(t=this.service)||void 0===t?void 0:t.isFeatureAccessible(Jo.FEEDBACK,{session:this.session}))||(null===(e=this.service)||void 0===e?void 0:e.isFeatureAccessible(Jo.RATING,{session:this.session,ratingType:null===(i=this.ratingSummary)||void 0===i?void 0:i.type}))}update(t){var e,i,o,r;super.update(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(r=null===(o=this.session)||void 0===o?void 0:o.profile)||void 0===r?void 0:r.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e,i;this.map&&((null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(i=this.service)||void 0===i?void 0:i.getMapRating()))}))}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,o;if(!this.editorMode&&this.ratingSummary){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateMap()):await(null===(i=this.service)||void 0===i?void 0:i.rateMap(null===(o=this.ratingSummary)||void 0===o?void 0:o.type,t))}catch{this.dispatchEvent(new _e({type:"error",message:Is.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new _e({type:"info",message:Ls.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{this.editorMode?this.dispatchEvent(new _e({type:"info",message:Ls.messages.feedbackAndRatingDisabledInEditor()})):(await(null===(e=this.service)||void 0===e?void 0:e.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new _e({type:"info",message:Is.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new _e({type:"error",message:Is.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0}))}}ll.elementDefinitions={"ft-reader-feedback":rl},sl([Zo({store:as.name})],ll.prototype,"session",void 0),sl([Zo({store:"reader"})],ll.prototype,"map",void 0),sl([Zo({store:as.name})],ll.prototype,"editorMode",void 0),sl([Zo({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],ll.prototype,"configuration",void 0),sl([
|
|
1862
|
+
`}get componentVisible(){var t,e,i;return(null===(t=this.service)||void 0===t?void 0:t.isFeatureAccessible(Jo.FEEDBACK,{session:this.session}))||(null===(e=this.service)||void 0===e?void 0:e.isFeatureAccessible(Jo.RATING,{session:this.session,ratingType:null===(i=this.ratingSummary)||void 0===i?void 0:i.type}))}update(t){var e,i,o,r;super.update(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(r=null===(o=this.session)||void 0===o?void 0:o.profile)||void 0===r?void 0:r.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e,i;this.map&&((null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(i=this.service)||void 0===i?void 0:i.getMapRating()))}))}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,o;if(!this.editorMode&&this.ratingSummary){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateMap()):await(null===(i=this.service)||void 0===i?void 0:i.rateMap(null===(o=this.ratingSummary)||void 0===o?void 0:o.type,t))}catch{this.dispatchEvent(new _e({type:"error",message:Is.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new _e({type:"info",message:Ls.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{this.editorMode?this.dispatchEvent(new _e({type:"info",message:Ls.messages.feedbackAndRatingDisabledInEditor()})):(await(null===(e=this.service)||void 0===e?void 0:e.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new _e({type:"info",message:Is.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new _e({type:"error",message:Is.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0}))}}ll.elementDefinitions={"ft-reader-feedback":rl},sl([Zo({store:as.name})],ll.prototype,"session",void 0),sl([Zo({store:"reader"})],ll.prototype,"map",void 0),sl([Zo({store:as.name})],ll.prototype,"editorMode",void 0),sl([Zo({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],ll.prototype,"configuration",void 0),sl([k()],ll.prototype,"ratingSummary",void 0),sl([E({type:Boolean})],ll.prototype,"hideTitle",void 0),sl([E()],ll.prototype,"iconVariant",void 0),sl([E()],ll.prototype,"emptyStarIcon",void 0),sl([E()],ll.prototype,"filledStarIcon",void 0),sl([E()],ll.prototype,"emptyLikeIcon",void 0),sl([E()],ll.prototype,"filledLikeIcon",void 0),sl([E()],ll.prototype,"emptyDislikeIcon",void 0),sl([E()],ll.prototype,"filledDislikeIcon",void 0),sl([I("ft-reader-feedback")],ll.prototype,"readerFeedback",void 0),sl([Rs(nl.properties["mail.map_feedback.subject"]((t=>{var e;return[null===(e=t.map)||void 0===e?void 0:e.title]})))],ll.prototype,"mailSubject",void 0);var cl=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class hl extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const fl=Symbol("registerInterval");class dl extends(function(t){var e;class i extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[fl]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[fl]):this.dispatchEvent(new hl)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=fl,cl([k()],i.prototype,"tocNode",void 0),cl([k()],i.prototype,"disableContextInteractions",void 0),i}(ir)){}var ul=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class pl extends(Ss(dl)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=ra.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new al,this.i18nProperties={feedbackMainTitle:Is.properties.topicFeedbackMainTitle(),ratingSectionTitle:Is.properties.topicRatingSectionTitle(),dichotomousRatingSectionTitle:Is.properties.topicDichotomousRatingSectionTitle(),feedbackSectionTitle:Is.properties.topicFeedbackSectionTitle()},this.updateDebouncer=new L(100),this.sendRatingDebouncer=new L(500),this.addStore(as)}render(){return this.map&&this.tocNode&&(this.editorMode||this.componentVisible)?ce`
|
|
1863
1863
|
<ft-reader-feedback
|
|
1864
1864
|
.i18nProperties=${this.i18nProperties}
|
|
1865
1865
|
?ratingAllowed=${this.tocNode.hasRating}
|
|
@@ -1885,4 +1885,4 @@ const{D:ja}=mt,Ba=()=>document.createComment(""),Ka=(t,e,i)=>{const o=t._$AA.par
|
|
|
1885
1885
|
display: none !important;
|
|
1886
1886
|
}
|
|
1887
1887
|
</style>
|
|
1888
|
-
`}get componentVisible(){var t,e,i;return(null===(t=this.service)||void 0===t?void 0:t.isFeatureAccessible(Jo.FEEDBACK,{session:this.session}))||(null===(e=this.service)||void 0===e?void 0:e.isFeatureAccessible(Jo.RATING,{session:this.session,ratingType:null===(i=this.ratingSummary)||void 0===i?void 0:i.type}))}update(t){var e,i,o,r;super.update(t),["tocNode","user"].some((e=>t.has(e)))&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(r=null===(o=this.session)||void 0===o?void 0:o.profile)||void 0===r?void 0:r.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e,i;this.tocNode&&((null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(i=this.service)||void 0===i?void 0:i.getTopicRating(this.tocNode.tocId)))}))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,o;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateTopic(this.tocNode.tocId)):await(null===(i=this.service)||void 0===i?void 0:i.rateTopic(this.tocNode.tocId,null===(o=this.ratingSummary)||void 0===o?void 0:o.type,t))}catch{this.dispatchEvent(new _e({type:"error",message:Is.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new _e({type:"info",message:Ls.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{!this.editorMode&&this.tocNode?(await(null===(e=this.service)||void 0===e?void 0:e.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new _e({type:"info",message:Is.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new _e({type:"info",message:Ls.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new _e({type:"error",message:Is.messages.feedbackFailure()}))}}onMailerFeedbackSent(){const t=this.tocNode;this.dispatchEvent(new CustomEvent("ft-reader-mailer-topic-feedback",{detail:{topic:t},composed:!0,bubbles:!0}))}}pl.elementDefinitions={"ft-reader-feedback":rl},ul([Zo({store:as.name})],pl.prototype,"session",void 0),ul([Zo({store:"reader"})],pl.prototype,"map",void 0),ul([Zo({store:as.name})],pl.prototype,"editorMode",void 0),ul([Zo({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],pl.prototype,"configuration",void 0),ul([
|
|
1888
|
+
`}get componentVisible(){var t,e,i;return(null===(t=this.service)||void 0===t?void 0:t.isFeatureAccessible(Jo.FEEDBACK,{session:this.session}))||(null===(e=this.service)||void 0===e?void 0:e.isFeatureAccessible(Jo.RATING,{session:this.session,ratingType:null===(i=this.ratingSummary)||void 0===i?void 0:i.type}))}update(t){var e,i,o,r;super.update(t),["tocNode","user"].some((e=>t.has(e)))&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(r=null===(o=this.session)||void 0===o?void 0:o.profile)||void 0===r?void 0:r.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e,i;this.tocNode&&((null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(i=this.service)||void 0===i?void 0:i.getTopicRating(this.tocNode.tocId)))}))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,o;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateTopic(this.tocNode.tocId)):await(null===(i=this.service)||void 0===i?void 0:i.rateTopic(this.tocNode.tocId,null===(o=this.ratingSummary)||void 0===o?void 0:o.type,t))}catch{this.dispatchEvent(new _e({type:"error",message:Is.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new _e({type:"info",message:Ls.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{!this.editorMode&&this.tocNode?(await(null===(e=this.service)||void 0===e?void 0:e.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new _e({type:"info",message:Is.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new _e({type:"info",message:Ls.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new _e({type:"error",message:Is.messages.feedbackFailure()}))}}onMailerFeedbackSent(){const t=this.tocNode;this.dispatchEvent(new CustomEvent("ft-reader-mailer-topic-feedback",{detail:{topic:t},composed:!0,bubbles:!0}))}}pl.elementDefinitions={"ft-reader-feedback":rl},ul([Zo({store:as.name})],pl.prototype,"session",void 0),ul([Zo({store:"reader"})],pl.prototype,"map",void 0),ul([Zo({store:as.name})],pl.prototype,"editorMode",void 0),ul([Zo({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],pl.prototype,"configuration",void 0),ul([k()],pl.prototype,"ratingSummary",void 0),ul([E({type:Boolean})],pl.prototype,"hideTitle",void 0),ul([E()],pl.prototype,"iconVariant",void 0),ul([E()],pl.prototype,"emptyStarIcon",void 0),ul([E()],pl.prototype,"filledStarIcon",void 0),ul([E()],pl.prototype,"emptyLikeIcon",void 0),ul([E()],pl.prototype,"filledLikeIcon",void 0),ul([E()],pl.prototype,"emptyDislikeIcon",void 0),ul([E()],pl.prototype,"filledDislikeIcon",void 0),ul([I("ft-reader-feedback")],pl.prototype,"readerFeedback",void 0),ul([Rs(nl.properties["mail.feedback.subject"]((t=>{var e,i;return[null===(e=t.tocNode)||void 0===e?void 0:e.title,null===(i=t.map)||void 0===i?void 0:i.title]})))],pl.prototype,"mailSubject",void 0),T("ft-reader-map-feedback")(ll),T("ft-reader-topic-feedback")(pl),t.FtReaderFeedbackCssVariables=Sn,t.FtReaderMapFeedback=ll,t.FtReaderTopicFeedback=pl,t.styles=$n}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-feedback",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Feedback forms for a map and its topics in an integrated reader",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-app-context": "1.1.
|
|
23
|
-
"@fluid-topics/ft-reader-context": "1.1.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-app-context": "1.1.3",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "1.1.3",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "1.1.3",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@fluid-topics/public-api": "1.0.51"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "0d44a470e710f185c37e42ee87be4481a3bdf793"
|
|
31
31
|
}
|