@fluid-topics/ft-reader-attachments 2.1.1 → 2.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var
|
|
1
|
+
"use strict";(()=>{var Ia=Object.create;var An=Object.defineProperty;var Ma=Object.getOwnPropertyDescriptor;var ka=Object.getOwnPropertyNames;var Ua=Object.getPrototypeOf,Ha=Object.prototype.hasOwnProperty;var Ie=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var $a=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ka(t))!Ha.call(e,i)&&i!==r&&An(e,i,{get:()=>t[i],enumerable:!(n=Ma(t,i))||n.enumerable});return e};var g=(e,t,r)=>(r=e!=null?Ia(Ua(e)):{},$a(t||!e||!e.__esModule?An(r,"default",{value:e,enumerable:!0}):r,e));var C=Ie((Yo,xn)=>{xn.exports=ftGlobals.wcUtils});var $=Ie((Xo,bn)=>{bn.exports=ftGlobals.lit});var B=Ie((Jo,En)=>{En.exports=ftGlobals.litDecorators});var Un=Ie((au,kn)=>{kn.exports=ftGlobals.litRepeat});var Vs=Ie((Wp,js)=>{js.exports=ftGlobals.litUnsafeHTML});var yn=Ie((wf,Oa)=>{Oa.exports=ftGlobals.litClassMap});var Da=g(C());var Pe=g($()),at=g(B()),Ae=g(C());var Pn=g($()),T=g(C());var Rn=g($()),N=g(C()),Sn=N.FtCssVariableFactory.extend("--ft-ripple-color","",N.designSystemVariables.colorContent),re={color:Sn,backgroundColor:N.FtCssVariableFactory.extend("--ft-ripple-background-color","",Sn),opacityContentOnSurfacePressed:N.FtCssVariableFactory.external(N.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:N.FtCssVariableFactory.external(N.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:N.FtCssVariableFactory.external(N.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:N.FtCssVariableFactory.external(N.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:N.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Cn=N.FtCssVariableFactory.extend("--ft-ripple-color","",N.designSystemVariables.colorPrimary),On={color:Cn,backgroundColor:N.FtCssVariableFactory.extend("--ft-ripple-background-color","",Cn)},Tn=N.FtCssVariableFactory.extend("--ft-ripple-color","",N.designSystemVariables.colorSecondary),_n={color:Tn,backgroundColor:N.FtCssVariableFactory.extend("--ft-ripple-background-color","",Tn)},wn=Rn.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -225,10 +225,10 @@
|
|
|
225
225
|
.hide-download-icon [part="download-link"] {
|
|
226
226
|
display: none;
|
|
227
227
|
}
|
|
228
|
-
`;var Lt=g(C()),In=g(B());var Rt;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change",e.requestedTopicNotFound="requested-topic-not-found"})(Rt||(Rt={}));var Mn;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Mn||(Mn={}));var Ba=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},mr=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},hr=Symbol("registerInterval"),ja=(0,Lt.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var i;return(i=this.stateManager)===null||i===void 0?void 0:i.service}connectedCallback(){super.connectedCallback(),this[hr]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[hr]):this.dispatchEvent(new mr)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=hr,Ba([(0,In.state)()],r.prototype,"stateManager",void 0),r}),wt=class extends ja(Lt.FtLitElementRedux){};var La=g(Un());var jr=g(B());var Hn=g(B(),1);var yr=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function $n(e,t){return(0,Hn.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return ct(e);try{return JSON.parse(r)}catch{return ct(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:dt,...t??{}})}function Va(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Nt(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Nt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=a=>Object.keys(a).filter(o=>a[o]!=null),s=i(e);if(r=s.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){let a=s[n];if(!Nt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Nt(e,t){try{return Va(e,t)}catch{return!1}}function dt(e,t){return!Nt(e,t)}function ct(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Pt(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var Bn=g(B(),1);var vr=e=>{let t=e??{};return(r,n)=>{var i;let s={hasChanged:dt,attribute:!1,...t};(0,Bn.property)(s)(r,n);let a=r.constructor;a.reduxProperties=new Map(a.reduxProperties),a.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(o=>o[n]),store:t.store})}};var Dt=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var xe=g(B(),1);var Mt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let a of n)try{await a()}catch(o){i(o);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Vn=g($(),1);var It=globalThis,Ka=It.ShadowRoot&&(It.ShadyCSS===void 0||It.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var jn=(e,t)=>{if(Ka)e.adoptedStyleSheets=t.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of t){let n=document.createElement("style"),i=It.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var kt=class extends Vn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return jn(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){yr(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Kn(e,t,...r){var n;let i=e.querySelector(t);for(let s of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var ke=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},zn,Fn=Symbol("constructorPrototype"),Gn=Symbol("constructorName"),qn=Symbol("exportpartsDebouncer"),Wn=Symbol("dynamicDependenciesLoaded"),Ie=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Ie.eventName="exportparts-updated";var ne=class extends kt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[zn]=new Mt(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[qn].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Gn]=this.constructor.name,this[Fn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Gn]&&Object.setPrototypeOf(this,this[Fn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[Wn]||(r[Wn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Ie.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Ie.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Ie)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];r=Kn(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var r,n,i,s,a,o;let u=p=>p!=null&&p.trim().length>0,l=t.filter(u).map(p=>p.trim());if(l.length===0){this.exportparts=void 0;return}let c=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let y=(s=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],h=(o=(a=p.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(b=>b.split(":")[1]))!==null&&o!==void 0?o:[],v=[...y,...h].filter(u).map(b=>b.trim());for(let b of v)c.add(b)}if(c.size===0){this.exportparts=void 0;return}let d=[...c.values()].flatMap(p=>l.map(y=>`${p}:${y}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};zn=qn;ke([(0,xe.property)()],ne.prototype,"exportpartsPrefix",void 0);ke([$n([])],ne.prototype,"exportpartsPrefixes",void 0);ke([(0,xe.property)({reflect:!0})],ne.prototype,"exportparts",void 0);ke([(0,xe.property)()],ne.prototype,"customStylesheet",void 0);ke([(0,xe.property)()],ne.prototype,"elementToFocus",void 0);ke([(0,xe.state)()],ne.prototype,"useAdoptedStyleSheets",void 0);function Ut(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var pt=Symbol("internalReduxEventsUnsubscribers"),de=Symbol("internalStoresUnsubscribers"),be=Symbol("internalStores"),Fa=Pt(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(a){super.willUpdate(a),[...this.reduxConstructor.reduxReactiveProperties].some(o=>a.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[be].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[be].values()][0]}getStore(a){return a==null?this.getUnnamedStore():this[be].get(a)}addStore(a,o){var u;o=(u=o??a.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(o),this[be].set(o,a),this.subscribeToStore(o,a),this.updateFromStores()}removeStore(a){let o=typeof a=="string"?a:a.name;this.unsubscribeFromStore(o),this[be].delete(o)}setupStores(){this.unsubscribeFromStores(),this[be].forEach((a,o)=>this.subscribeToStore(o,a)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((a,o)=>{let u=this.constructor.getPropertyOptions(o);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:o)){let l=this.getStore(a.store);l&&(a.store?this[de].has(a.store):this[de].size>0)&&(this[o]=a.selector(l.getState(),this))}})}subscribeToStore(a,o){var u;this[de].set(a,o.subscribe(()=>this.updateFromStores())),this[pt].set(a,[]),Ut(o)&&o.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((l,c)=>{if(typeof this[c]=="function"&&(!l.store||o.name===l.store)){let d=p=>this[c](p);o.addEventListener(l.eventName,d),this[pt].get(a).push(()=>o.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(a)}unsubscribeFromStores(){this[de].forEach((a,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(a){var o;this[de].has(a)&&this[de].get(a)(),this[de].delete(a),(o=this[pt].get(a))===null||o===void 0||o.forEach(u=>u()),this[pt].delete(a)}onStoreAvailable(a){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=de,r=be,n=pt,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Yn=class extends Fa(ne){};function z(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(a){return"'"+a+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ae(e){return!!e&&!!e[_]}function ee(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Qa})(e)||Array.isArray(e)||!!e[ri]||!!(!((t=e.constructor)===null||t===void 0)&&t[ri])||Tr(e)||_r(e))}function Ee(e,t,r){r===void 0&&(r=!1),$e(e)===0?(r?Object.keys:He)(e).forEach((function(n){r&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,i){return t(i,n,e)}))}function $e(e){var t=e[_];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Tr(e)?2:_r(e)?3:0}function Ue(e,t){return $e(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ga(e,t){return $e(e)===2?e.get(t):e[t]}function ni(e,t,r){var n=$e(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ii(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Tr(e){return Xa&&e instanceof Map}function _r(e){return Ja&&e instanceof Set}function pe(e){return e.o||e.t}function Rr(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=oi(e);delete t[_];for(var r=He(t),n=0;n<r.length;n++){var i=r[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function wr(e,t){return t===void 0&&(t=!1),Lr(e)||ae(e)||!ee(e)||($e(e)>1&&(e.set=e.add=e.clear=e.delete=Wa),Object.freeze(e),t&&Ee(e,(function(r,n){return wr(n,!0)}),!0)),e}function Wa(){z(2)}function Lr(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ie(e){var t=Or[e];return t||z(18,e),t}function za(e,t){Or[e]||(Or[e]=t)}function Er(){return ht}function gr(e,t){t&&(ie("Patches"),e.u=[],e.s=[],e.v=t)}function Ht(e){Sr(e),e.p.forEach(qa),e.p=null}function Sr(e){e===ht&&(ht=e.l)}function Xn(e){return ht={p:[],l:ht,h:e,m:!0,_:0}}function qa(e){var t=e[_];t.i===0||t.i===1?t.j():t.g=!0}function Ar(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||ie("ES5").S(t,e,n),n?(r[_].P&&(Ht(t),z(4)),ee(e)&&(e=$t(t,e),t.l||Bt(t,e)),t.u&&ie("Patches").M(r[_].t,e,t.u,t.s)):e=$t(t,r,[]),Ht(t),t.u&&t.v(t.u,t.s),e!==ai?e:void 0}function $t(e,t,r){if(Lr(t))return t;var n=t[_];if(!n)return Ee(t,(function(o,u){return Jn(e,n,t,o,u,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return Bt(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Rr(n.k):n.o,s=i,a=!1;n.i===3&&(s=new Set(i),i.clear(),a=!0),Ee(s,(function(o,u){return Jn(e,n,i,o,u,r,a)})),Bt(e,i,!1),r&&e.u&&ie("Patches").N(n,r,e.u,e.s)}return n.o}function Jn(e,t,r,n,i,s,a){if(ae(i)){var o=$t(e,i,s&&t&&t.i!==3&&!Ue(t.R,n)?s.concat(n):void 0);if(ni(r,n,o),!ae(o))return;e.m=!1}else a&&r.add(i);if(ee(i)&&!Lr(i)){if(!e.h.D&&e._<1)return;$t(e,i),t&&t.A.l||Bt(e,i)}}function Bt(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&wr(t,r)}function xr(e,t){var r=e[_];return(r?pe(r):e)[t]}function Qn(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function fe(e){e.P||(e.P=!0,e.l&&fe(e.l))}function br(e){e.o||(e.o=Rr(e.t))}function Cr(e,t,r){var n=Tr(t)?ie("MapSet").F(t,r):_r(t)?ie("MapSet").T(t,r):e.O?(function(i,s){var a=Array.isArray(i),o={i:a?1:0,A:s?s.A:Er(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},u=o,l=mt;a&&(u=[o],l=ft);var c=Proxy.revocable(u,l),d=c.revoke,p=c.proxy;return o.k=p,o.j=d,p})(t,r):ie("ES5").J(t,r);return(r?r.A:Er()).p.push(n),n}function Ya(e){return ae(e)||z(22,e),(function t(r){if(!ee(r))return r;var n,i=r[_],s=$e(r);if(i){if(!i.P&&(i.i<4||!ie("ES5").K(i)))return i.t;i.I=!0,n=Zn(r,s),i.I=!1}else n=Zn(r,s);return Ee(n,(function(a,o){i&&Ga(i.t,a)===o||ni(n,a,t(o))})),s===3?new Set(n):n})(e)}function Zn(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Rr(e)}function si(){function e(a,o){var u=s[a];return u?u.enumerable=o:s[a]=u={configurable:!0,enumerable:o,get:function(){var l=this[_];return mt.get(l,a)},set:function(l){var c=this[_];mt.set(c,a,l)}},u}function t(a){for(var o=a.length-1;o>=0;o--){var u=a[o][_];if(!u.P)switch(u.i){case 5:n(u)&&fe(u);break;case 4:r(u)&&fe(u)}}}function r(a){for(var o=a.t,u=a.k,l=He(u),c=l.length-1;c>=0;c--){var d=l[c];if(d!==_){var p=o[d];if(p===void 0&&!Ue(o,d))return!0;var y=u[d],h=y&&y[_];if(h?h.t!==p:!ii(y,p))return!0}}var v=!!o[_];return l.length!==He(o).length+(v?0:1)}function n(a){var o=a.k;if(o.length!==a.t.length)return!0;var u=Object.getOwnPropertyDescriptor(o,o.length-1);if(u&&!u.get)return!0;for(var l=0;l<o.length;l++)if(!o.hasOwnProperty(l))return!0;return!1}function i(a){a.g&&z(3,JSON.stringify(pe(a)))}var s={};za("ES5",{J:function(a,o){var u=Array.isArray(a),l=(function(d,p){if(d){for(var y=Array(p.length),h=0;h<p.length;h++)Object.defineProperty(y,""+h,e(h,!0));return y}var v=oi(p);delete v[_];for(var b=He(v),E=0;E<b.length;E++){var S=b[E];v[S]=e(S,d||!!v[S].enumerable)}return Object.create(Object.getPrototypeOf(p),v)})(u,a),c={i:u?5:4,A:o?o.A:Er(),P:!1,I:!1,R:{},l:o,t:a,k:l,o:null,g:!1,C:!1};return Object.defineProperty(l,_,{value:c,writable:!0}),l},S:function(a,o,u){u?ae(o)&&o[_].A===a&&t(a.p):(a.u&&(function l(c){if(c&&typeof c=="object"){var d=c[_];if(d){var p=d.t,y=d.k,h=d.R,v=d.i;if(v===4)Ee(y,(function(O){O!==_&&(p[O]!==void 0||Ue(p,O)?h[O]||l(y[O]):(h[O]=!0,fe(d)))})),Ee(p,(function(O){y[O]!==void 0||Ue(y,O)||(h[O]=!1,fe(d))}));else if(v===5){if(n(d)&&(fe(d),h.length=!0),y.length<p.length)for(var b=y.length;b<p.length;b++)h[b]=!1;else for(var E=p.length;E<y.length;E++)h[E]=!0;for(var S=Math.min(y.length,p.length),R=0;R<S;R++)y.hasOwnProperty(R)||(h[R]=!0),h[R]===void 0&&l(y[R])}}}})(a.p[0]),t(a.p))},K:function(a){return a.i===4?r(a):n(a)}})}var ei,ht,Nr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Xa=typeof Map<"u",Ja=typeof Set<"u",ti=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ai=Nr?Symbol.for("immer-nothing"):((ei={})["immer-nothing"]=!0,ei),ri=Nr?Symbol.for("immer-draftable"):"__$immer_draftable",_=Nr?Symbol.for("immer-state"):"__$immer_state";var Qa=""+Object.prototype.constructor,He=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,oi=Object.getOwnPropertyDescriptors||function(e){var t={};return He(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Or={},mt={get:function(e,t){if(t===_)return e;var r=pe(e);if(!Ue(r,t))return(function(i,s,a){var o,u=Qn(s,a);return u?"value"in u?u.value:(o=u.get)===null||o===void 0?void 0:o.call(i.k):void 0})(e,r,t);var n=r[t];return e.I||!ee(n)?n:n===xr(e.t,t)?(br(e),e.o[t]=Cr(e.A.h,n,e)):n},has:function(e,t){return t in pe(e)},ownKeys:function(e){return Reflect.ownKeys(pe(e))},set:function(e,t,r){var n=Qn(pe(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=xr(pe(e),t),s=i?.[_];if(s&&s.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(ii(r,i)&&(r!==void 0||Ue(e.t,t)))return!0;br(e),fe(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return xr(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,br(e),fe(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=pe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){z(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){z(12)}},ft={};Ee(mt,(function(e,t){ft[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),ft.deleteProperty=function(e,t){return ft.set.call(this,e,t,void 0)},ft.set=function(e,t,r){return mt.set.call(this,e[0],t,r,e[0])};var Za=(function(){function e(r){var n=this;this.O=ti,this.D=!0,this.produce=function(i,s,a){if(typeof i=="function"&&typeof s!="function"){var o=s;s=i;var u=n;return function(v){var b=this;v===void 0&&(v=o);for(var E=arguments.length,S=Array(E>1?E-1:0),R=1;R<E;R++)S[R-1]=arguments[R];return u.produce(v,(function(O){var ce;return(ce=s).call.apply(ce,[b,O].concat(S))}))}}var l;if(typeof s!="function"&&z(6),a!==void 0&&typeof a!="function"&&z(7),ee(i)){var c=Xn(n),d=Cr(n,i,void 0),p=!0;try{l=s(d),p=!1}finally{p?Ht(c):Sr(c)}return typeof Promise<"u"&&l instanceof Promise?l.then((function(v){return gr(c,a),Ar(v,c)}),(function(v){throw Ht(c),v})):(gr(c,a),Ar(l,c))}if(!i||typeof i!="object"){if((l=s(i))===void 0&&(l=i),l===ai&&(l=void 0),n.D&&wr(l,!0),a){var y=[],h=[];ie("Patches").M(i,l,y,h),a(y,h)}return l}z(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(l){for(var c=arguments.length,d=Array(c>1?c-1:0),p=1;p<c;p++)d[p-1]=arguments[p];return n.produceWithPatches(l,(function(y){return i.apply(void 0,[y].concat(d))}))};var a,o,u=n.produce(i,s,(function(l,c){a=l,o=c}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(l){return[l,a,o]})):[u,a,o]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){ee(r)||z(8),ae(r)&&(r=Ya(r));var n=Xn(this),i=Cr(this,r,void 0);return i[_].C=!0,Sr(n),i},t.finishDraft=function(r,n){var i=r&&r[_],s=i.A;return gr(s,n),Ar(void 0,s)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!ti&&z(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){r=s.value;break}}i>-1&&(n=n.slice(i+1));var a=ie("Patches").$;return ae(r)?a(r,n):this.produce(r,(function(o){return a(o,n)}))},e})(),j=new Za,eo=j.produce,Nu=j.produceWithPatches.bind(j),Pu=j.setAutoFreeze.bind(j),Du=j.setUseProxies.bind(j),Mu=j.applyPatches.bind(j),Iu=j.createDraft.bind(j),ku=j.finishDraft.bind(j),jt=eo;function Se(e){"@babel/helpers - typeof";return Se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Se(e)}function ui(e,t){if(Se(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Se(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function li(e){var t=ui(e,"string");return Se(t)=="symbol"?t:t+""}function ci(e,t,r){return(t=li(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function di(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?di(Object(r),!0).forEach(function(n){ci(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):di(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function I(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var pi=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Dr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Vt={INIT:"@@redux/INIT"+Dr(),REPLACE:"@@redux/REPLACE"+Dr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Dr()}};function to(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Mr(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(I(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(I(1));return r(Mr)(e,t)}if(typeof e!="function")throw new Error(I(2));var i=e,s=t,a=[],o=a,u=!1;function l(){o===a&&(o=a.slice())}function c(){if(u)throw new Error(I(3));return s}function d(v){if(typeof v!="function")throw new Error(I(4));if(u)throw new Error(I(5));var b=!0;return l(),o.push(v),function(){if(b){if(u)throw new Error(I(6));b=!1,l();var S=o.indexOf(v);o.splice(S,1),a=null}}}function p(v){if(!to(v))throw new Error(I(7));if(typeof v.type>"u")throw new Error(I(8));if(u)throw new Error(I(9));try{u=!0,s=i(s,v)}finally{u=!1}for(var b=a=o,E=0;E<b.length;E++){var S=b[E];S()}return v}function y(v){if(typeof v!="function")throw new Error(I(10));i=v,p({type:Vt.REPLACE})}function h(){var v,b=d;return v={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(I(11));function R(){S.next&&S.next(c())}R();var O=b(R);return{unsubscribe:O}}},v[pi]=function(){return this},v}return p({type:Vt.INIT}),n={dispatch:p,subscribe:d,getState:c,replaceReducer:y},n[pi]=h,n}function ro(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:Vt.INIT});if(typeof n>"u")throw new Error(I(12));if(typeof r(void 0,{type:Vt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(I(13))})}function fi(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var s=Object.keys(r),a,o;try{ro(r)}catch(u){o=u}return function(l,c){if(l===void 0&&(l={}),o)throw o;if(0)var d;for(var p=!1,y={},h=0;h<s.length;h++){var v=s[h],b=r[v],E=l[v],S=b(E,c);if(typeof S>"u"){var R=c&&c.type;throw new Error(I(14))}y[v]=S,p=p||S!==E}return p=p||s.length!==Object.keys(l).length,p?y:l}}function Be(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function hi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error(I(15))},a={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},o=t.map(function(u){return u(a)});return s=Be.apply(void 0,o)(i.dispatch),Pr(Pr({},i),{},{dispatch:s})}}}function mi(e){var t=function(n){var i=n.dispatch,s=n.getState;return function(a){return function(o){return typeof o=="function"?o(i,s,e):a(o)}}};return t}var yi=mi();yi.withExtraArgument=mi;var Ir=yi;var bi=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),no=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}s[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},je=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},io=Object.defineProperty,so=Object.defineProperties,ao=Object.getOwnPropertyDescriptors,vi=Object.getOwnPropertySymbols,oo=Object.prototype.hasOwnProperty,uo=Object.prototype.propertyIsEnumerable,gi=function(e,t,r){return t in e?io(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},he=function(e,t){for(var r in t||(t={}))oo.call(t,r)&&gi(e,r,t[r]);if(vi)for(var n=0,i=vi(t);n<i.length;n++){var r=i[n];uo.call(t,r)&&gi(e,r,t[r])}return e},kr=function(e,t){return so(e,ao(t))},lo=function(e,t,r){return new Promise(function(n,i){var s=function(u){try{o(r.next(u))}catch(l){i(l)}},a=function(u){try{o(r.throw(u))}catch(l){i(l)}},o=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(s,a)};o((r=r.apply(e,t)).next())})};var co=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Be:Be.apply(null,arguments)},el=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function po(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function me(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return he(he({type:e,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}var fo=(function(e){bi(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,je([void 0],r[0].concat(this)))):new(t.bind.apply(t,je([void 0],r.concat(this))))},t})(Array),ho=(function(e){bi(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,je([void 0],r[0].concat(this)))):new(t.bind.apply(t,je([void 0],r.concat(this))))},t})(Array);function $r(e){return ee(e)?jt(e,function(){}):e}function mo(e){return typeof e=="boolean"}function yo(){return function(t){return vo(t)}}function vo(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,s=e.serializableCheck,a=s===void 0?!0:s,o=e.actionCreatorCheck,u=o===void 0?!0:o,l=new fo;if(r&&(mo(r)?l.push(Ir):l.push(Ir.withExtraArgument(r.extraArgument))),0){if(i)var c;if(a)var d;if(u)var p}return l}var Ur=!0;function Ei(e){var t=yo(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,s=r.middleware,a=s===void 0?t():s,o=r.devTools,u=o===void 0?!0:o,l=r.preloadedState,c=l===void 0?void 0:l,d=r.enhancers,p=d===void 0?void 0:d,y;if(typeof i=="function")y=i;else if(po(i))y=fi(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var h=a;if(typeof h=="function"&&(h=h(t),!Ur&&!Array.isArray(h)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ur&&h.some(function(O){return typeof O!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=hi.apply(void 0,h),b=Be;u&&(b=co(he({trace:!Ur},typeof u=="object"&&u)));var E=new ho(v),S=E;Array.isArray(p)?S=je([v],p):typeof p=="function"&&(S=p(E));var R=b.apply(void 0,S);return Mr(y,c,R)}function Si(e){var t={},r=[],n,i={addCase:function(s,a){var o=typeof s=="string"?s:s.type;if(!o)throw new Error("`builder.addCase` cannot be called with an empty action type");if(o in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[o]=a,i},addMatcher:function(s,a){return r.push({matcher:s,reducer:a}),i},addDefaultCase:function(s){return n=s,i}};return e(i),[t,r,n]}function go(e){return typeof e=="function"}function Ao(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?Si(t):[t,r,n],s=i[0],a=i[1],o=i[2],u;if(go(e))u=function(){return $r(e())};else{var l=$r(e);u=function(){return l}}function c(d,p){d===void 0&&(d=u());var y=je([s[p.type]],a.filter(function(h){var v=h.matcher;return v(p)}).map(function(h){var v=h.reducer;return v}));return y.filter(function(h){return!!h}).length===0&&(y=[o]),y.reduce(function(h,v){if(v)if(ae(h)){var b=h,E=v(b,p);return E===void 0?h:E}else{if(ee(h))return jt(h,function(S){return v(S,p)});var E=v(h,p);if(E===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return h},d)}return c.getInitialState=u,c}function xo(e,t){return e+"/"+t}function Ci(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:$r(e.initialState),n=e.reducers||{},i=Object.keys(n),s={},a={},o={};i.forEach(function(c){var d=n[c],p=xo(t,c),y,h;"reducer"in d?(y=d.reducer,h=d.prepare):y=d,s[c]=y,a[p]=y,o[c]=h?me(p,h):me(p)});function u(){var c=typeof e.extraReducers=="function"?Si(e.extraReducers):[e.extraReducers],d=c[0],p=d===void 0?{}:d,y=c[1],h=y===void 0?[]:y,v=c[2],b=v===void 0?void 0:v,E=he(he({},p),a);return Ao(r,function(S){for(var R in E)S.addCase(R,E[R]);for(var O=0,ce=h;O<ce.length;O++){var se=ce[O];S.addMatcher(se.matcher,se.reducer)}b&&S.addDefaultCase(b)})}var l;return{name:t,reducer:function(c,d){return l||(l=u()),l(c,d)},actions:o,caseReducers:s,getInitialState:function(){return l||(l=u()),l.getInitialState()}}}var bo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Eo=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=bo[Math.random()*64|0];return t},So=["name","message","stack","code"],Hr=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Ai=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Co=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=So;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},il=(function(){function e(t,r,n){var i=me(t+"/fulfilled",function(c,d,p,y){return{payload:c,meta:kr(he({},y||{}),{arg:p,requestId:d,requestStatus:"fulfilled"})}}),s=me(t+"/pending",function(c,d,p){return{payload:void 0,meta:kr(he({},p||{}),{arg:d,requestId:c,requestStatus:"pending"})}}),a=me(t+"/rejected",function(c,d,p,y,h){return{payload:y,error:(n&&n.serializeError||Co)(c||"Rejected"),meta:kr(he({},h||{}),{arg:p,requestId:d,rejectedWithValue:!!y,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"})}}),o=!1,u=typeof AbortController<"u"?AbortController:(function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c})();function l(c){return function(d,p,y){var h=n?.idGenerator?n.idGenerator(c):Eo(),v=new u,b,E=!1;function S(O){b=O,v.abort()}var R=(function(){return lo(this,null,function(){var O,ce,se,ot,vn,ut,gn;return no(this,function(De){switch(De.label){case 0:return De.trys.push([0,4,,5]),ot=(O=n?.condition)==null?void 0:O.call(n,c,{getState:p,extra:y}),To(ot)?[4,ot]:[3,2];case 1:ot=De.sent(),De.label=2;case 2:if(ot===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,vn=new Promise(function(Q,lt){return v.signal.addEventListener("abort",function(){return lt({name:"AbortError",message:b||"Aborted"})})}),d(s(h,c,(ce=n?.getPendingMeta)==null?void 0:ce.call(n,{requestId:h,arg:c},{getState:p,extra:y}))),[4,Promise.race([vn,Promise.resolve(r(c,{dispatch:d,getState:p,extra:y,requestId:h,signal:v.signal,abort:S,rejectWithValue:function(Q,lt){return new Hr(Q,lt)},fulfillWithValue:function(Q,lt){return new Ai(Q,lt)}})).then(function(Q){if(Q instanceof Hr)throw Q;return Q instanceof Ai?i(Q.payload,h,c,Q.meta):i(Q,h,c)})])];case 3:return se=De.sent(),[3,5];case 4:return ut=De.sent(),se=ut instanceof Hr?a(null,h,c,ut.payload,ut.meta):a(ut,h,c),[3,5];case 5:return gn=n&&!n.dispatchConditionRejection&&a.match(se)&&se.meta.condition,gn||d(se),[2,se]}})})})();return Object.assign(R,{abort:S,requestId:h,arg:c,unwrap:function(){return R.then(Oo)}})}}return Object.assign(l,{pending:s,rejected:a,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e})();function Oo(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function To(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Oi="listener",Ti="completed",_i="cancelled",sl="task-"+_i,al="task-"+Ti,ol=Oi+"-"+_i,ul=Oi+"-"+Ti;var Br="listenerMiddleware";var ll=me(Br+"/add"),cl=me(Br+"/removeAll"),dl=me(Br+"/remove");var xi,pl=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(xi||(xi=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},_o=function(e){return function(t){setTimeout(t,e)}},fl=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:_o(10);si();var Ro=Pt(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),Kt=class extends Ro(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ri=class e extends Kt{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Ut(s))return s;if(i==null)return;let a=Ci({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),o=Ei({reducer:(u,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let c=ct(a.getInitialState());for(let d of l.keeping)c[d]=(u??c)[d];return c}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...l.overwrites};return a.reducer(u,l)}});return window.ftReduxStores[i.name]=new e(a,o,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Dt;let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,a,o)=>{let u=a,l=s[u];return l?(...c)=>{let d=l(...c.map(i));return this.reduxStore.dispatch(d),d}:c=>{this.setState({[u]:i(c)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),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()}};var Ft=class{static format(t,r,n,i,s){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,r,n,i,!!s)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i,s){let a=typeof t=="string"?new Date(t):t,o=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(a),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return s?u:i?`${o} ${u}`:o}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Gt=g(C()),wo="ft-app-info",Ve=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ve.eventName="authentication-change";var yt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};yt.eventName="ui-locale-changed";var Lo={session:(e,t)=>{(0,Gt.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>x.dispatchEvent(new Ve(t.payload)),0))}},x=Gt.FtReduxStore.get({name:wo,reducers:Lo,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var wi=g(C()),Wt=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},jl=(0,wi.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(x)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(o=>o.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?o=>Ft.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Wt([(0,jr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Wt([(0,jr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Wt([vr({store:x.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Wt([vr({store:x.name})],t.prototype,"uiLocale",void 0),t});var Li;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Li||(Li={}));var Ni;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Ni||(Ni={}));var Pi;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Pi||(Pi={}));var Di;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Di||(Di={}));var Mi;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Mi||(Mi={}));var Ii;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Ii||(Ii={}));var ki;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(ki||(ki={}));var Ui;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Ui||(Ui={}));var Hi;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Hi||(Hi={}));var $i;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})($i||($i={}));var Bi;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(Bi||(Bi={}));var ji;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(ji||(ji={}));var Vi;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Vi||(Vi={}));var Ki;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Ki||(Ki={}));var Fi;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Fi||(Fi={}));var Gi;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Gi||(Gi={}));var Wi;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Wi||(Wi={}));var zi;(function(e){e.ASC="ASC",e.DESC="DESC"})(zi||(zi={}));var qi;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(qi||(qi={}));var Yi;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Yi||(Yi={}));var Xi;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Xi||(Xi={}));var Ji;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Ji||(Ji={}));var Qi;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Qi||(Qi={}));var Zi;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Zi||(Zi={}));var es;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(es||(es={}));var ts;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ts||(ts={}));var rs;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(rs||(rs={}));var P;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(P||(P={}));var q;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(q||(q={}));var ns;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(ns||(ns={}));var is;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(is||(is={}));var ss;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(ss||(ss={}));var as;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(as||(as={}));var os;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(os||(os={}));var us;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(us||(us={}));var ls;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(ls||(ls={}));var cs;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(cs||(cs={}));var ds;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(ds||(ds={}));var ps;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(ps||(ps={}));var fs;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(fs||(fs={}));var hs;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(hs||(hs={}));var No={[P.PERSONAL_BOOK_SHARE_USER]:[P.PERSONAL_BOOK_USER],[P.HTML_EXPORT_USER]:[P.PERSONAL_BOOK_USER],[P.PDF_EXPORT_USER]:[P.PERSONAL_BOOK_USER],[P.KHUB_ADMIN]:[P.CONTENT_PUBLISHER],[P.ADMIN]:[P.KHUB_ADMIN,P.USERS_ADMIN,P.PORTAL_ADMIN,P.BEHAVIOR_DATA_USER],[P.GENERATIVE_AI_EXPORT_USER]:[P.GENERATIVE_AI_USER]};function ms(e,t){return e===t||(No[e]??[]).some(r=>ms(r,t))}function ys(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>ms(n,t))}var Jt=g(C());var Vr=g(C());var Ce=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=x.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=x.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var Ke=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ce.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ce.await()}};var V=class extends Ke{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(s,a)=>typeof a!="object"||a==null||Array.isArray(a)?a:Object.fromEntries(Object.entries(a).sort(([o],[u])=>o.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Vr.CacheRegistry,this.cache=t?i.commonCache:new Vr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var zt=class extends V{async listMySearches(){let{session:t}=x.getState();return ys(t,P.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var qt=class extends V{async listMyBookmarks(){let t=x.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Yt=class extends V{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=x.getState().session;return!!t?.sessionAuthenticated}};var Xt=class extends V{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=x.getState().session;return!!t?.sessionAuthenticated}};var Po="ft-user-assets",Do={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(q).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:i}=t.payload;Fr(e,r,[...Kr(e,r),i]),vs(e,r,1,n),gs(e,i)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Fr(e,r,Kr(e,r).map(i=>i.id===n.id?n:i)),gs(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:i}=t.payload;Fr(e,r,Kr(e,r).filter(s=>s.id!==i)),vs(e,r,-1,n)}},As={[q.SEARCHES]:"savedSearches",[q.BOOKMARKS]:"bookmarks",[q.BOOKS]:void 0,[q.COLLECTIONS]:void 0},Kr=(e,t)=>{var r;let n=As[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Fr=(e,t,r)=>{let n=As[t];n&&(e[n]=r)},vs=(e,t,r,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+r),t===q.BOOKMARKS&&n)){let s=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,s+r)}},gs=(e,t)=>{let r=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},U=Jt.FtReduxStore.get({name:Po,reducers:Do,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(q).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Gr=class{constructor(t=new Yt,r=new Xt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=x.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new qt,this.savedSearchesService=new zt,x.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=x.getState();(0,Jt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),U.actions.clearAssetCount(),U.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),U.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),U.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();U.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();U.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&U.getState().assetCounts.allAsset[t]!==r.count&&U.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&U.getState().assetCounts.bookmarkByMap[t]!==r.count&&U.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(U.getState().assetCounts.bookmarkByMap).length!==0;t===q.BOOKMARKS&&r&&U.actions.clearBookmarkCountByMap(),U.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;U.actions.bookmarks(r)}}},Mo=new Gr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Mo);var Wr=class{addCommand(t,r=!1){x.commands.add(t,r)}consumeCommand(t){return x.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Wr;var Y=g(C());var xs,Fe=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Io=Symbol("clearAfterUnitTest"),Qt=class extends(0,Y.withEventBus)(V){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[xs]=()=>{this.defaultMessages={},this.cache=new Y.CacheRegistry,this.listeners={}},this.currentUiLocale=x.getState().uiLocale,x.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=x.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,Y.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let s=t.toLowerCase(),a=this.resolveContext(s);return new Y.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},a).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof Y.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Fe({loadedContexts:t})),this.dispatchEvent(new Fe({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Fe({loadedContexts:[t]})),this.dispatchEvent(new Fe({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Y.delay)(0).then(()=>n()).catch(()=>null)))}};xs=Io;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Qt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Qt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Ge=window.FluidTopicsI18nService,Zt=window.FluidTopicsCustomI18nService;var bs=g(C()),zr=class{highlightHtml(t,r,n){(0,bs.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new zr;var Es=g(C());var qr=class{isDate(t){var r,n,i,s;return(s=(i=((n=(r=x.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,r){var n,i,s,a;if(t==null)return"";try{return Es.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:x.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(a=r?.onlyTime)!==null&&a!==void 0?a:!1)}catch(o){throw console.error(`Date ${JSON.stringify(t)} is not valid`,o),o}}};window.FluidTopicsDateService=new qr;var Ss=g(C());var vt=class{static get(t,r){var n,i;let s=x.getState(),{lang:a,region:o}=(i=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Ss.SearchPlaceConverter(s.baseUrl,t??20,s.searchInAllLanguagesAllowed,r??`${a}-${o}`)}};var Yr=class{urlToSearchRequest(t){return vt.get().parse(t)}searchRequestToUrl(t){return vt.get().serialize(t)}};window.FluidTopicsUrlService=new Yr;var oe=g(C());var Oe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Oe.eventName="change";var Xr=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Cs=new Xr;var er=class e extends oe.WithEventBus{static build(){return new e(window.history,Cs,()=>window.location,!1)}constructor(t,r,n,i){var s,a;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(a=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&a!==void 0?a:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,oe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Oe(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[s,a,o])=>{let u=r(),l={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:typeof o=="string"?o:(o??this.windowLocation()).href};n.apply(i,[l,a,o]),this.setCurrentState(l,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Oe.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Oe.eventName,t)}currentItem(){return(0,oe.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,oe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,oe.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,oe.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=er.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Os=g($());var Ts=Os.css`
|
|
228
|
+
`;var Lt=g(C()),Mn=g(B());var Rt;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change",e.requestedTopicNotFound="requested-topic-not-found"})(Rt||(Rt={}));var In;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(In||(In={}));var Ba=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},mr=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},hr=Symbol("registerInterval"),ja=(0,Lt.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var i;return(i=this.stateManager)===null||i===void 0?void 0:i.service}connectedCallback(){super.connectedCallback(),this[hr]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[hr]):this.dispatchEvent(new mr)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=hr,Ba([(0,Mn.state)()],r.prototype,"stateManager",void 0),r}),wt=class extends ja(Lt.FtLitElementRedux){};var La=g(Un());var jr=g(B());var Hn=g(B(),1);var yr=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function $n(e,t){return(0,Hn.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return ct(e);try{return JSON.parse(r)}catch{return ct(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:dt,...t??{}})}function Va(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Nt(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Nt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=a=>Object.keys(a).filter(o=>a[o]!=null),s=i(e);if(r=s.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){let a=s[n];if(!Nt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Nt(e,t){try{return Va(e,t)}catch{return!1}}function dt(e,t){return!Nt(e,t)}function ct(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Pt(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var Bn=g(B(),1);var vr=e=>{let t=e??{};return(r,n)=>{var i;let s={hasChanged:dt,attribute:!1,...t};(0,Bn.property)(s)(r,n);let a=r.constructor;a.reduxProperties=new Map(a.reduxProperties),a.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(o=>o[n]),store:t.store})}};var Dt=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var xe=g(B(),1);var It=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let a of n)try{await a()}catch(o){i(o);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Vn=g($(),1);var Mt=globalThis,Ka=Mt.ShadowRoot&&(Mt.ShadyCSS===void 0||Mt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var jn=(e,t)=>{if(Ka)e.adoptedStyleSheets=t.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of t){let n=document.createElement("style"),i=Mt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var kt=class extends Vn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return jn(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){yr(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Kn(e,t,...r){var n;let i=e.querySelector(t);for(let s of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var ke=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},zn,Fn=Symbol("constructorPrototype"),Gn=Symbol("constructorName"),qn=Symbol("exportpartsDebouncer"),Wn=Symbol("dynamicDependenciesLoaded"),Me=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Me.eventName="exportparts-updated";var ne=class extends kt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[zn]=new It(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[qn].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Gn]=this.constructor.name,this[Fn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Gn]&&Object.setPrototypeOf(this,this[Fn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[Wn]||(r[Wn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Me.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Me.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Me)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];r=Kn(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var r,n,i,s,a,o;let u=p=>p!=null&&p.trim().length>0,l=t.filter(u).map(p=>p.trim());if(l.length===0){this.exportparts=void 0;return}let c=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let y=(s=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],h=(o=(a=p.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(b=>b.split(":")[1]))!==null&&o!==void 0?o:[],v=[...y,...h].filter(u).map(b=>b.trim());for(let b of v)c.add(b)}if(c.size===0){this.exportparts=void 0;return}let d=[...c.values()].flatMap(p=>l.map(y=>`${p}:${y}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};zn=qn;ke([(0,xe.property)()],ne.prototype,"exportpartsPrefix",void 0);ke([$n([])],ne.prototype,"exportpartsPrefixes",void 0);ke([(0,xe.property)({reflect:!0})],ne.prototype,"exportparts",void 0);ke([(0,xe.property)()],ne.prototype,"customStylesheet",void 0);ke([(0,xe.property)()],ne.prototype,"elementToFocus",void 0);ke([(0,xe.state)()],ne.prototype,"useAdoptedStyleSheets",void 0);function Ut(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var pt=Symbol("internalReduxEventsUnsubscribers"),de=Symbol("internalStoresUnsubscribers"),be=Symbol("internalStores"),Fa=Pt(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(a){super.willUpdate(a),[...this.reduxConstructor.reduxReactiveProperties].some(o=>a.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[be].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[be].values()][0]}getStore(a){return a==null?this.getUnnamedStore():this[be].get(a)}addStore(a,o){var u;o=(u=o??a.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(o),this[be].set(o,a),this.subscribeToStore(o,a),this.updateFromStores()}removeStore(a){let o=typeof a=="string"?a:a.name;this.unsubscribeFromStore(o),this[be].delete(o)}setupStores(){this.unsubscribeFromStores(),this[be].forEach((a,o)=>this.subscribeToStore(o,a)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((a,o)=>{let u=this.constructor.getPropertyOptions(o);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:o)){let l=this.getStore(a.store);l&&(a.store?this[de].has(a.store):this[de].size>0)&&(this[o]=a.selector(l.getState(),this))}})}subscribeToStore(a,o){var u;this[de].set(a,o.subscribe(()=>this.updateFromStores())),this[pt].set(a,[]),Ut(o)&&o.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((l,c)=>{if(typeof this[c]=="function"&&(!l.store||o.name===l.store)){let d=p=>this[c](p);o.addEventListener(l.eventName,d),this[pt].get(a).push(()=>o.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(a)}unsubscribeFromStores(){this[de].forEach((a,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(a){var o;this[de].has(a)&&this[de].get(a)(),this[de].delete(a),(o=this[pt].get(a))===null||o===void 0||o.forEach(u=>u()),this[pt].delete(a)}onStoreAvailable(a){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=de,r=be,n=pt,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Yn=class extends Fa(ne){};function z(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(a){return"'"+a+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ae(e){return!!e&&!!e[_]}function ee(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Qa})(e)||Array.isArray(e)||!!e[ri]||!!(!((t=e.constructor)===null||t===void 0)&&t[ri])||Tr(e)||_r(e))}function Ee(e,t,r){r===void 0&&(r=!1),$e(e)===0?(r?Object.keys:He)(e).forEach((function(n){r&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,i){return t(i,n,e)}))}function $e(e){var t=e[_];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Tr(e)?2:_r(e)?3:0}function Ue(e,t){return $e(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ga(e,t){return $e(e)===2?e.get(t):e[t]}function ni(e,t,r){var n=$e(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ii(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Tr(e){return Xa&&e instanceof Map}function _r(e){return Ja&&e instanceof Set}function pe(e){return e.o||e.t}function Rr(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=oi(e);delete t[_];for(var r=He(t),n=0;n<r.length;n++){var i=r[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function wr(e,t){return t===void 0&&(t=!1),Lr(e)||ae(e)||!ee(e)||($e(e)>1&&(e.set=e.add=e.clear=e.delete=Wa),Object.freeze(e),t&&Ee(e,(function(r,n){return wr(n,!0)}),!0)),e}function Wa(){z(2)}function Lr(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ie(e){var t=Or[e];return t||z(18,e),t}function za(e,t){Or[e]||(Or[e]=t)}function Er(){return ht}function gr(e,t){t&&(ie("Patches"),e.u=[],e.s=[],e.v=t)}function Ht(e){Sr(e),e.p.forEach(qa),e.p=null}function Sr(e){e===ht&&(ht=e.l)}function Xn(e){return ht={p:[],l:ht,h:e,m:!0,_:0}}function qa(e){var t=e[_];t.i===0||t.i===1?t.j():t.g=!0}function Ar(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||ie("ES5").S(t,e,n),n?(r[_].P&&(Ht(t),z(4)),ee(e)&&(e=$t(t,e),t.l||Bt(t,e)),t.u&&ie("Patches").M(r[_].t,e,t.u,t.s)):e=$t(t,r,[]),Ht(t),t.u&&t.v(t.u,t.s),e!==ai?e:void 0}function $t(e,t,r){if(Lr(t))return t;var n=t[_];if(!n)return Ee(t,(function(o,u){return Jn(e,n,t,o,u,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return Bt(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Rr(n.k):n.o,s=i,a=!1;n.i===3&&(s=new Set(i),i.clear(),a=!0),Ee(s,(function(o,u){return Jn(e,n,i,o,u,r,a)})),Bt(e,i,!1),r&&e.u&&ie("Patches").N(n,r,e.u,e.s)}return n.o}function Jn(e,t,r,n,i,s,a){if(ae(i)){var o=$t(e,i,s&&t&&t.i!==3&&!Ue(t.R,n)?s.concat(n):void 0);if(ni(r,n,o),!ae(o))return;e.m=!1}else a&&r.add(i);if(ee(i)&&!Lr(i)){if(!e.h.D&&e._<1)return;$t(e,i),t&&t.A.l||Bt(e,i)}}function Bt(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&wr(t,r)}function xr(e,t){var r=e[_];return(r?pe(r):e)[t]}function Qn(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function fe(e){e.P||(e.P=!0,e.l&&fe(e.l))}function br(e){e.o||(e.o=Rr(e.t))}function Cr(e,t,r){var n=Tr(t)?ie("MapSet").F(t,r):_r(t)?ie("MapSet").T(t,r):e.O?(function(i,s){var a=Array.isArray(i),o={i:a?1:0,A:s?s.A:Er(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},u=o,l=mt;a&&(u=[o],l=ft);var c=Proxy.revocable(u,l),d=c.revoke,p=c.proxy;return o.k=p,o.j=d,p})(t,r):ie("ES5").J(t,r);return(r?r.A:Er()).p.push(n),n}function Ya(e){return ae(e)||z(22,e),(function t(r){if(!ee(r))return r;var n,i=r[_],s=$e(r);if(i){if(!i.P&&(i.i<4||!ie("ES5").K(i)))return i.t;i.I=!0,n=Zn(r,s),i.I=!1}else n=Zn(r,s);return Ee(n,(function(a,o){i&&Ga(i.t,a)===o||ni(n,a,t(o))})),s===3?new Set(n):n})(e)}function Zn(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Rr(e)}function si(){function e(a,o){var u=s[a];return u?u.enumerable=o:s[a]=u={configurable:!0,enumerable:o,get:function(){var l=this[_];return mt.get(l,a)},set:function(l){var c=this[_];mt.set(c,a,l)}},u}function t(a){for(var o=a.length-1;o>=0;o--){var u=a[o][_];if(!u.P)switch(u.i){case 5:n(u)&&fe(u);break;case 4:r(u)&&fe(u)}}}function r(a){for(var o=a.t,u=a.k,l=He(u),c=l.length-1;c>=0;c--){var d=l[c];if(d!==_){var p=o[d];if(p===void 0&&!Ue(o,d))return!0;var y=u[d],h=y&&y[_];if(h?h.t!==p:!ii(y,p))return!0}}var v=!!o[_];return l.length!==He(o).length+(v?0:1)}function n(a){var o=a.k;if(o.length!==a.t.length)return!0;var u=Object.getOwnPropertyDescriptor(o,o.length-1);if(u&&!u.get)return!0;for(var l=0;l<o.length;l++)if(!o.hasOwnProperty(l))return!0;return!1}function i(a){a.g&&z(3,JSON.stringify(pe(a)))}var s={};za("ES5",{J:function(a,o){var u=Array.isArray(a),l=(function(d,p){if(d){for(var y=Array(p.length),h=0;h<p.length;h++)Object.defineProperty(y,""+h,e(h,!0));return y}var v=oi(p);delete v[_];for(var b=He(v),E=0;E<b.length;E++){var S=b[E];v[S]=e(S,d||!!v[S].enumerable)}return Object.create(Object.getPrototypeOf(p),v)})(u,a),c={i:u?5:4,A:o?o.A:Er(),P:!1,I:!1,R:{},l:o,t:a,k:l,o:null,g:!1,C:!1};return Object.defineProperty(l,_,{value:c,writable:!0}),l},S:function(a,o,u){u?ae(o)&&o[_].A===a&&t(a.p):(a.u&&(function l(c){if(c&&typeof c=="object"){var d=c[_];if(d){var p=d.t,y=d.k,h=d.R,v=d.i;if(v===4)Ee(y,(function(O){O!==_&&(p[O]!==void 0||Ue(p,O)?h[O]||l(y[O]):(h[O]=!0,fe(d)))})),Ee(p,(function(O){y[O]!==void 0||Ue(y,O)||(h[O]=!1,fe(d))}));else if(v===5){if(n(d)&&(fe(d),h.length=!0),y.length<p.length)for(var b=y.length;b<p.length;b++)h[b]=!1;else for(var E=p.length;E<y.length;E++)h[E]=!0;for(var S=Math.min(y.length,p.length),R=0;R<S;R++)y.hasOwnProperty(R)||(h[R]=!0),h[R]===void 0&&l(y[R])}}}})(a.p[0]),t(a.p))},K:function(a){return a.i===4?r(a):n(a)}})}var ei,ht,Nr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Xa=typeof Map<"u",Ja=typeof Set<"u",ti=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ai=Nr?Symbol.for("immer-nothing"):((ei={})["immer-nothing"]=!0,ei),ri=Nr?Symbol.for("immer-draftable"):"__$immer_draftable",_=Nr?Symbol.for("immer-state"):"__$immer_state";var Qa=""+Object.prototype.constructor,He=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,oi=Object.getOwnPropertyDescriptors||function(e){var t={};return He(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Or={},mt={get:function(e,t){if(t===_)return e;var r=pe(e);if(!Ue(r,t))return(function(i,s,a){var o,u=Qn(s,a);return u?"value"in u?u.value:(o=u.get)===null||o===void 0?void 0:o.call(i.k):void 0})(e,r,t);var n=r[t];return e.I||!ee(n)?n:n===xr(e.t,t)?(br(e),e.o[t]=Cr(e.A.h,n,e)):n},has:function(e,t){return t in pe(e)},ownKeys:function(e){return Reflect.ownKeys(pe(e))},set:function(e,t,r){var n=Qn(pe(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=xr(pe(e),t),s=i?.[_];if(s&&s.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(ii(r,i)&&(r!==void 0||Ue(e.t,t)))return!0;br(e),fe(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return xr(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,br(e),fe(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=pe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){z(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){z(12)}},ft={};Ee(mt,(function(e,t){ft[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),ft.deleteProperty=function(e,t){return ft.set.call(this,e,t,void 0)},ft.set=function(e,t,r){return mt.set.call(this,e[0],t,r,e[0])};var Za=(function(){function e(r){var n=this;this.O=ti,this.D=!0,this.produce=function(i,s,a){if(typeof i=="function"&&typeof s!="function"){var o=s;s=i;var u=n;return function(v){var b=this;v===void 0&&(v=o);for(var E=arguments.length,S=Array(E>1?E-1:0),R=1;R<E;R++)S[R-1]=arguments[R];return u.produce(v,(function(O){var ce;return(ce=s).call.apply(ce,[b,O].concat(S))}))}}var l;if(typeof s!="function"&&z(6),a!==void 0&&typeof a!="function"&&z(7),ee(i)){var c=Xn(n),d=Cr(n,i,void 0),p=!0;try{l=s(d),p=!1}finally{p?Ht(c):Sr(c)}return typeof Promise<"u"&&l instanceof Promise?l.then((function(v){return gr(c,a),Ar(v,c)}),(function(v){throw Ht(c),v})):(gr(c,a),Ar(l,c))}if(!i||typeof i!="object"){if((l=s(i))===void 0&&(l=i),l===ai&&(l=void 0),n.D&&wr(l,!0),a){var y=[],h=[];ie("Patches").M(i,l,y,h),a(y,h)}return l}z(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(l){for(var c=arguments.length,d=Array(c>1?c-1:0),p=1;p<c;p++)d[p-1]=arguments[p];return n.produceWithPatches(l,(function(y){return i.apply(void 0,[y].concat(d))}))};var a,o,u=n.produce(i,s,(function(l,c){a=l,o=c}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(l){return[l,a,o]})):[u,a,o]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){ee(r)||z(8),ae(r)&&(r=Ya(r));var n=Xn(this),i=Cr(this,r,void 0);return i[_].C=!0,Sr(n),i},t.finishDraft=function(r,n){var i=r&&r[_],s=i.A;return gr(s,n),Ar(void 0,s)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!ti&&z(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){r=s.value;break}}i>-1&&(n=n.slice(i+1));var a=ie("Patches").$;return ae(r)?a(r,n):this.produce(r,(function(o){return a(o,n)}))},e})(),j=new Za,eo=j.produce,Nu=j.produceWithPatches.bind(j),Pu=j.setAutoFreeze.bind(j),Du=j.setUseProxies.bind(j),Iu=j.applyPatches.bind(j),Mu=j.createDraft.bind(j),ku=j.finishDraft.bind(j),jt=eo;function Se(e){"@babel/helpers - typeof";return Se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Se(e)}function ui(e,t){if(Se(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Se(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function li(e){var t=ui(e,"string");return Se(t)=="symbol"?t:t+""}function ci(e,t,r){return(t=li(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function di(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?di(Object(r),!0).forEach(function(n){ci(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):di(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var pi=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Dr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Vt={INIT:"@@redux/INIT"+Dr(),REPLACE:"@@redux/REPLACE"+Dr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Dr()}};function to(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ir(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(M(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(M(1));return r(Ir)(e,t)}if(typeof e!="function")throw new Error(M(2));var i=e,s=t,a=[],o=a,u=!1;function l(){o===a&&(o=a.slice())}function c(){if(u)throw new Error(M(3));return s}function d(v){if(typeof v!="function")throw new Error(M(4));if(u)throw new Error(M(5));var b=!0;return l(),o.push(v),function(){if(b){if(u)throw new Error(M(6));b=!1,l();var S=o.indexOf(v);o.splice(S,1),a=null}}}function p(v){if(!to(v))throw new Error(M(7));if(typeof v.type>"u")throw new Error(M(8));if(u)throw new Error(M(9));try{u=!0,s=i(s,v)}finally{u=!1}for(var b=a=o,E=0;E<b.length;E++){var S=b[E];S()}return v}function y(v){if(typeof v!="function")throw new Error(M(10));i=v,p({type:Vt.REPLACE})}function h(){var v,b=d;return v={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(M(11));function R(){S.next&&S.next(c())}R();var O=b(R);return{unsubscribe:O}}},v[pi]=function(){return this},v}return p({type:Vt.INIT}),n={dispatch:p,subscribe:d,getState:c,replaceReducer:y},n[pi]=h,n}function ro(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:Vt.INIT});if(typeof n>"u")throw new Error(M(12));if(typeof r(void 0,{type:Vt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(M(13))})}function fi(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var s=Object.keys(r),a,o;try{ro(r)}catch(u){o=u}return function(l,c){if(l===void 0&&(l={}),o)throw o;if(0)var d;for(var p=!1,y={},h=0;h<s.length;h++){var v=s[h],b=r[v],E=l[v],S=b(E,c);if(typeof S>"u"){var R=c&&c.type;throw new Error(M(14))}y[v]=S,p=p||S!==E}return p=p||s.length!==Object.keys(l).length,p?y:l}}function Be(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function hi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error(M(15))},a={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},o=t.map(function(u){return u(a)});return s=Be.apply(void 0,o)(i.dispatch),Pr(Pr({},i),{},{dispatch:s})}}}function mi(e){var t=function(n){var i=n.dispatch,s=n.getState;return function(a){return function(o){return typeof o=="function"?o(i,s,e):a(o)}}};return t}var yi=mi();yi.withExtraArgument=mi;var Mr=yi;var bi=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),no=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}s[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},je=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},io=Object.defineProperty,so=Object.defineProperties,ao=Object.getOwnPropertyDescriptors,vi=Object.getOwnPropertySymbols,oo=Object.prototype.hasOwnProperty,uo=Object.prototype.propertyIsEnumerable,gi=function(e,t,r){return t in e?io(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},he=function(e,t){for(var r in t||(t={}))oo.call(t,r)&&gi(e,r,t[r]);if(vi)for(var n=0,i=vi(t);n<i.length;n++){var r=i[n];uo.call(t,r)&&gi(e,r,t[r])}return e},kr=function(e,t){return so(e,ao(t))},lo=function(e,t,r){return new Promise(function(n,i){var s=function(u){try{o(r.next(u))}catch(l){i(l)}},a=function(u){try{o(r.throw(u))}catch(l){i(l)}},o=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(s,a)};o((r=r.apply(e,t)).next())})};var co=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Be:Be.apply(null,arguments)},el=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function po(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function me(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return he(he({type:e,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}var fo=(function(e){bi(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,je([void 0],r[0].concat(this)))):new(t.bind.apply(t,je([void 0],r.concat(this))))},t})(Array),ho=(function(e){bi(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,je([void 0],r[0].concat(this)))):new(t.bind.apply(t,je([void 0],r.concat(this))))},t})(Array);function $r(e){return ee(e)?jt(e,function(){}):e}function mo(e){return typeof e=="boolean"}function yo(){return function(t){return vo(t)}}function vo(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,s=e.serializableCheck,a=s===void 0?!0:s,o=e.actionCreatorCheck,u=o===void 0?!0:o,l=new fo;if(r&&(mo(r)?l.push(Mr):l.push(Mr.withExtraArgument(r.extraArgument))),0){if(i)var c;if(a)var d;if(u)var p}return l}var Ur=!0;function Ei(e){var t=yo(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,s=r.middleware,a=s===void 0?t():s,o=r.devTools,u=o===void 0?!0:o,l=r.preloadedState,c=l===void 0?void 0:l,d=r.enhancers,p=d===void 0?void 0:d,y;if(typeof i=="function")y=i;else if(po(i))y=fi(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var h=a;if(typeof h=="function"&&(h=h(t),!Ur&&!Array.isArray(h)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ur&&h.some(function(O){return typeof O!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=hi.apply(void 0,h),b=Be;u&&(b=co(he({trace:!Ur},typeof u=="object"&&u)));var E=new ho(v),S=E;Array.isArray(p)?S=je([v],p):typeof p=="function"&&(S=p(E));var R=b.apply(void 0,S);return Ir(y,c,R)}function Si(e){var t={},r=[],n,i={addCase:function(s,a){var o=typeof s=="string"?s:s.type;if(!o)throw new Error("`builder.addCase` cannot be called with an empty action type");if(o in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[o]=a,i},addMatcher:function(s,a){return r.push({matcher:s,reducer:a}),i},addDefaultCase:function(s){return n=s,i}};return e(i),[t,r,n]}function go(e){return typeof e=="function"}function Ao(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?Si(t):[t,r,n],s=i[0],a=i[1],o=i[2],u;if(go(e))u=function(){return $r(e())};else{var l=$r(e);u=function(){return l}}function c(d,p){d===void 0&&(d=u());var y=je([s[p.type]],a.filter(function(h){var v=h.matcher;return v(p)}).map(function(h){var v=h.reducer;return v}));return y.filter(function(h){return!!h}).length===0&&(y=[o]),y.reduce(function(h,v){if(v)if(ae(h)){var b=h,E=v(b,p);return E===void 0?h:E}else{if(ee(h))return jt(h,function(S){return v(S,p)});var E=v(h,p);if(E===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return h},d)}return c.getInitialState=u,c}function xo(e,t){return e+"/"+t}function Ci(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:$r(e.initialState),n=e.reducers||{},i=Object.keys(n),s={},a={},o={};i.forEach(function(c){var d=n[c],p=xo(t,c),y,h;"reducer"in d?(y=d.reducer,h=d.prepare):y=d,s[c]=y,a[p]=y,o[c]=h?me(p,h):me(p)});function u(){var c=typeof e.extraReducers=="function"?Si(e.extraReducers):[e.extraReducers],d=c[0],p=d===void 0?{}:d,y=c[1],h=y===void 0?[]:y,v=c[2],b=v===void 0?void 0:v,E=he(he({},p),a);return Ao(r,function(S){for(var R in E)S.addCase(R,E[R]);for(var O=0,ce=h;O<ce.length;O++){var se=ce[O];S.addMatcher(se.matcher,se.reducer)}b&&S.addDefaultCase(b)})}var l;return{name:t,reducer:function(c,d){return l||(l=u()),l(c,d)},actions:o,caseReducers:s,getInitialState:function(){return l||(l=u()),l.getInitialState()}}}var bo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Eo=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=bo[Math.random()*64|0];return t},So=["name","message","stack","code"],Hr=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Ai=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Co=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=So;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},il=(function(){function e(t,r,n){var i=me(t+"/fulfilled",function(c,d,p,y){return{payload:c,meta:kr(he({},y||{}),{arg:p,requestId:d,requestStatus:"fulfilled"})}}),s=me(t+"/pending",function(c,d,p){return{payload:void 0,meta:kr(he({},p||{}),{arg:d,requestId:c,requestStatus:"pending"})}}),a=me(t+"/rejected",function(c,d,p,y,h){return{payload:y,error:(n&&n.serializeError||Co)(c||"Rejected"),meta:kr(he({},h||{}),{arg:p,requestId:d,rejectedWithValue:!!y,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"})}}),o=!1,u=typeof AbortController<"u"?AbortController:(function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c})();function l(c){return function(d,p,y){var h=n?.idGenerator?n.idGenerator(c):Eo(),v=new u,b,E=!1;function S(O){b=O,v.abort()}var R=(function(){return lo(this,null,function(){var O,ce,se,ot,vn,ut,gn;return no(this,function(De){switch(De.label){case 0:return De.trys.push([0,4,,5]),ot=(O=n?.condition)==null?void 0:O.call(n,c,{getState:p,extra:y}),To(ot)?[4,ot]:[3,2];case 1:ot=De.sent(),De.label=2;case 2:if(ot===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,vn=new Promise(function(Q,lt){return v.signal.addEventListener("abort",function(){return lt({name:"AbortError",message:b||"Aborted"})})}),d(s(h,c,(ce=n?.getPendingMeta)==null?void 0:ce.call(n,{requestId:h,arg:c},{getState:p,extra:y}))),[4,Promise.race([vn,Promise.resolve(r(c,{dispatch:d,getState:p,extra:y,requestId:h,signal:v.signal,abort:S,rejectWithValue:function(Q,lt){return new Hr(Q,lt)},fulfillWithValue:function(Q,lt){return new Ai(Q,lt)}})).then(function(Q){if(Q instanceof Hr)throw Q;return Q instanceof Ai?i(Q.payload,h,c,Q.meta):i(Q,h,c)})])];case 3:return se=De.sent(),[3,5];case 4:return ut=De.sent(),se=ut instanceof Hr?a(null,h,c,ut.payload,ut.meta):a(ut,h,c),[3,5];case 5:return gn=n&&!n.dispatchConditionRejection&&a.match(se)&&se.meta.condition,gn||d(se),[2,se]}})})})();return Object.assign(R,{abort:S,requestId:h,arg:c,unwrap:function(){return R.then(Oo)}})}}return Object.assign(l,{pending:s,rejected:a,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e})();function Oo(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function To(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Oi="listener",Ti="completed",_i="cancelled",sl="task-"+_i,al="task-"+Ti,ol=Oi+"-"+_i,ul=Oi+"-"+Ti;var Br="listenerMiddleware";var ll=me(Br+"/add"),cl=me(Br+"/removeAll"),dl=me(Br+"/remove");var xi,pl=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(xi||(xi=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},_o=function(e){return function(t){setTimeout(t,e)}},fl=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:_o(10);si();var Ro=Pt(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),Kt=class extends Ro(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ri=class e extends Kt{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Ut(s))return s;if(i==null)return;let a=Ci({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),o=Ei({reducer:(u,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let c=ct(a.getInitialState());for(let d of l.keeping)c[d]=(u??c)[d];return c}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...l.overwrites};return a.reducer(u,l)}});return window.ftReduxStores[i.name]=new e(a,o,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Dt;let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,a,o)=>{let u=a,l=s[u];return l?(...c)=>{let d=l(...c.map(i));return this.reduxStore.dispatch(d),d}:c=>{this.setState({[u]:i(c)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),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()}};var Ft=class{static format(t,r,n,i,s){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,r,n,i,!!s)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i,s){let a=typeof t=="string"?new Date(t):t,o=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(a),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return s?u:i?`${o} ${u}`:o}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Gt=g(C()),wo="ft-app-info",Ve=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ve.eventName="authentication-change";var yt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};yt.eventName="ui-locale-changed";var Lo={session:(e,t)=>{(0,Gt.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>x.dispatchEvent(new Ve(t.payload)),0))}},x=Gt.FtReduxStore.get({name:wo,reducers:Lo,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var wi=g(C()),Wt=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},jl=(0,wi.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(x)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(o=>o.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?o=>Ft.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Wt([(0,jr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Wt([(0,jr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Wt([vr({store:x.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Wt([vr({store:x.name})],t.prototype,"uiLocale",void 0),t});var Li;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Li||(Li={}));var Ni;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Ni||(Ni={}));var Pi;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Pi||(Pi={}));var Di;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Di||(Di={}));var Ii;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ii||(Ii={}));var Mi;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Mi||(Mi={}));var ki;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(ki||(ki={}));var Ui;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Ui||(Ui={}));var Hi;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Hi||(Hi={}));var $i;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})($i||($i={}));var Bi;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(Bi||(Bi={}));var ji;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(ji||(ji={}));var Vi;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Vi||(Vi={}));var Ki;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Ki||(Ki={}));var Fi;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Fi||(Fi={}));var Gi;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Gi||(Gi={}));var Wi;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Wi||(Wi={}));var zi;(function(e){e.ASC="ASC",e.DESC="DESC"})(zi||(zi={}));var qi;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(qi||(qi={}));var Yi;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Yi||(Yi={}));var Xi;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Xi||(Xi={}));var Ji;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Ji||(Ji={}));var Qi;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Qi||(Qi={}));var Zi;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Zi||(Zi={}));var es;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(es||(es={}));var ts;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ts||(ts={}));var rs;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(rs||(rs={}));var P;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(P||(P={}));var q;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(q||(q={}));var ns;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(ns||(ns={}));var is;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(is||(is={}));var ss;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(ss||(ss={}));var as;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(as||(as={}));var os;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(os||(os={}));var us;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(us||(us={}));var ls;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(ls||(ls={}));var cs;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(cs||(cs={}));var ds;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(ds||(ds={}));var ps;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(ps||(ps={}));var fs;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(fs||(fs={}));var hs;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(hs||(hs={}));var No={[P.PERSONAL_BOOK_SHARE_USER]:[P.PERSONAL_BOOK_USER],[P.HTML_EXPORT_USER]:[P.PERSONAL_BOOK_USER],[P.PDF_EXPORT_USER]:[P.PERSONAL_BOOK_USER],[P.KHUB_ADMIN]:[P.CONTENT_PUBLISHER],[P.ADMIN]:[P.KHUB_ADMIN,P.USERS_ADMIN,P.PORTAL_ADMIN,P.BEHAVIOR_DATA_USER],[P.GENERATIVE_AI_EXPORT_USER]:[P.GENERATIVE_AI_USER]};function ms(e,t){return e===t||(No[e]??[]).some(r=>ms(r,t))}function ys(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>ms(n,t))}var Jt=g(C());var Vr=g(C());var Ce=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=x.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=x.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var Ke=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ce.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ce.await()}};var V=class extends Ke{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(s,a)=>typeof a!="object"||a==null||Array.isArray(a)?a:Object.fromEntries(Object.entries(a).sort(([o],[u])=>o.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Vr.CacheRegistry,this.cache=t?i.commonCache:new Vr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var zt=class extends V{async listMySearches(){let{session:t}=x.getState();return ys(t,P.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var qt=class extends V{async listMyBookmarks(){let t=x.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Yt=class extends V{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=x.getState().session;return!!t?.sessionAuthenticated}};var Xt=class extends V{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=x.getState().session;return!!t?.sessionAuthenticated}};var Po="ft-user-assets",Do={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(q).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:i}=t.payload;Fr(e,r,[...Kr(e,r),i]),vs(e,r,1,n),gs(e,i)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Fr(e,r,Kr(e,r).map(i=>i.id===n.id?n:i)),gs(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:i}=t.payload;Fr(e,r,Kr(e,r).filter(s=>s.id!==i)),vs(e,r,-1,n)}},As={[q.SEARCHES]:"savedSearches",[q.BOOKMARKS]:"bookmarks",[q.BOOKS]:void 0,[q.COLLECTIONS]:void 0},Kr=(e,t)=>{var r;let n=As[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Fr=(e,t,r)=>{let n=As[t];n&&(e[n]=r)},vs=(e,t,r,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+r),t===q.BOOKMARKS&&n)){let s=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,s+r)}},gs=(e,t)=>{let r=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},U=Jt.FtReduxStore.get({name:Po,reducers:Do,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(q).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Gr=class{constructor(t=new Yt,r=new Xt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=x.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new qt,this.savedSearchesService=new zt,x.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=x.getState();(0,Jt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),U.actions.clearAssetCount(),U.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),U.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),U.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();U.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();U.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&U.getState().assetCounts.allAsset[t]!==r.count&&U.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&U.getState().assetCounts.bookmarkByMap[t]!==r.count&&U.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(U.getState().assetCounts.bookmarkByMap).length!==0;t===q.BOOKMARKS&&r&&U.actions.clearBookmarkCountByMap(),U.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;U.actions.bookmarks(r)}}},Io=new Gr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Io);var Wr=class{addCommand(t,r=!1){x.commands.add(t,r)}consumeCommand(t){return x.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Wr;var Y=g(C());var xs,Fe=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Mo=Symbol("clearAfterUnitTest"),Qt=class extends(0,Y.withEventBus)(V){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[xs]=()=>{this.defaultMessages={},this.cache=new Y.CacheRegistry,this.listeners={}},this.currentUiLocale=x.getState().uiLocale,x.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=x.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,Y.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let s=t.toLowerCase(),a=this.resolveContext(s);return new Y.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},a).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof Y.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Fe({loadedContexts:t})),this.dispatchEvent(new Fe({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Fe({loadedContexts:[t]})),this.dispatchEvent(new Fe({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Y.delay)(0).then(()=>n()).catch(()=>null)))}};xs=Mo;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Qt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Qt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Ge=window.FluidTopicsI18nService,Zt=window.FluidTopicsCustomI18nService;var bs=g(C()),zr=class{highlightHtml(t,r,n){(0,bs.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new zr;var Es=g(C());var qr=class{isDate(t){var r,n,i,s;return(s=(i=((n=(r=x.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,r){var n,i,s,a;if(t==null)return"";try{return Es.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:x.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(a=r?.onlyTime)!==null&&a!==void 0?a:!1)}catch(o){throw console.error(`Date ${JSON.stringify(t)} is not valid`,o),o}}};window.FluidTopicsDateService=new qr;var Ss=g(C());var vt=class{static get(t,r){var n,i;let s=x.getState(),{lang:a,region:o}=(i=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Ss.SearchPlaceConverter(s.baseUrl,t??20,s.searchInAllLanguagesAllowed,r??`${a}-${o}`)}};var Yr=class{urlToSearchRequest(t){return vt.get().parse(t)}searchRequestToUrl(t){return vt.get().serialize(t)}};window.FluidTopicsUrlService=new Yr;var oe=g(C());var Oe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Oe.eventName="change";var Xr=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Cs=new Xr;var er=class e extends oe.WithEventBus{static build(){return new e(window.history,Cs,()=>window.location,!1)}constructor(t,r,n,i){var s,a;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(a=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&a!==void 0?a:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,oe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Oe(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[s,a,o])=>{let u=r(),l={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:typeof o=="string"?o:(o??this.windowLocation()).href};n.apply(i,[l,a,o]),this.setCurrentState(l,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Oe.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Oe.eventName,t)}currentItem(){return(0,oe.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,oe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,oe.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,oe.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=er.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Os=g($());var Ts=Os.css`
|
|
229
229
|
`;var ws=g($()),K=g(B()),Re=g(C());var Te=g(C());function _s(e,t){let{authenticationRequired:r,session:n}=x.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var tr=class extends Ke{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Jr=class e extends Te.FtStateManager{static build(t){return new e(x,t)}constructor(t,r){super(),this.store=t,this.cache=new Te.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new tr,this.cleanSessionDebouncer=new Te.Debouncer,this.reloadDebouncer=new Te.Debouncer(500),this.apiProvider=r??(()=>Ce.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(Ve.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>_s(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){var r,n,i,s,a;this.localesConfiguration=t,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((r=this.localesConfiguration.availableUiLocales)!==null&&r!==void 0?r:[]),this.store.actions.searchInAllLanguagesAllowed((n=this.localesConfiguration.allLanguagesAllowed)!==null&&n!==void 0?n:!1),this.store.actions.searchLanguageSetsUiLanguage((i=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&i!==void 0?i:!1),this.store.actions.uiLanguageSetsSearchLanguage((s=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&s!==void 0?s:!1),this.store.actions.uiLanguageSetsReaderLanguage((a=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&a!==void 0?a:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new yt(r)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Rs=Jr.build();var _e=class extends Event{constructor(t,r,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=i??!1}};var gt=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:i,callbackRef:s}of n){let a=i.deref(),o=s.deref();a===void 0||o===void 0||a.dispatchEvent(new _e(t.context,a,o,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,i=this.pendingContextRequests.get(t.context);i===void 0&&this.pendingContextRequests.set(t.context,i={callbacks:new WeakMap,requests:[]});let s=i.callbacks.get(r);s===void 0&&i.callbacks.set(r,s=new WeakSet),s.has(n)||(s.add(n),i.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var k=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},w=class extends Re.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Rs,this.contextRoot=new gt}render(){return ws.html`
|
|
230
230
|
<slot></slot>
|
|
231
|
-
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Ge.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};w.elementDefinitions={};w.styles=Ts;k([(0,K.property)()],w.prototype,"baseUrl",void 0);k([(0,K.property)()],w.prototype,"apiIntegrationIdentifier",void 0);k([(0,K.property)()],w.prototype,"apiIntegrationAppVersion",void 0);k([(0,K.property)()],w.prototype,"uiLocale",void 0);k([(0,Re.jsonProperty)(null)],w.prototype,"availableUiLocales",void 0);k([(0,Re.jsonProperty)(null)],w.prototype,"metadataConfiguration",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"editorMode",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"noCustom",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"openExternalDocumentInNewTab",void 0);k([(0,K.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],w.prototype,"noCustomComponent",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"withManualResources",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"navigatorOnline",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"forcedOffline",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"authenticationRequired",void 0);k([(0,Re.jsonProperty)([])],w.prototype,"messageContexts",void 0);k([(0,Re.jsonProperty)(void 0)],w.prototype,"session",void 0);var Ns=g(C());var Ls={"ft-app-context":w};(0,Ns.customElements)(Ls);var rr=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?Zt:Ge}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let s=i;return a=>({context:this.name,key:s,custom:this.custom,args:typeof a=="function"?void 0:a,argsProvider:typeof a=="function"?a:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...s)=>this.service.resolveMessage(this.name,i,...s)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var We=g(C());var
|
|
231
|
+
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Ge.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};w.elementDefinitions={};w.styles=Ts;k([(0,K.property)()],w.prototype,"baseUrl",void 0);k([(0,K.property)()],w.prototype,"apiIntegrationIdentifier",void 0);k([(0,K.property)()],w.prototype,"apiIntegrationAppVersion",void 0);k([(0,K.property)()],w.prototype,"uiLocale",void 0);k([(0,Re.jsonProperty)(null)],w.prototype,"availableUiLocales",void 0);k([(0,Re.jsonProperty)(null)],w.prototype,"metadataConfiguration",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"editorMode",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"noCustom",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"openExternalDocumentInNewTab",void 0);k([(0,K.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],w.prototype,"noCustomComponent",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"withManualResources",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"navigatorOnline",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"forcedOffline",void 0);k([(0,K.property)({type:Boolean})],w.prototype,"authenticationRequired",void 0);k([(0,Re.jsonProperty)([])],w.prototype,"messageContexts",void 0);k([(0,Re.jsonProperty)(void 0)],w.prototype,"session",void 0);var Ns=g(C());var Ls={"ft-app-context":w};(0,Ns.customElements)(Ls);var rr=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?Zt:Ge}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let s=i;return a=>({context:this.name,key:s,custom:this.custom,args:typeof a=="function"?void 0:a,argsProvider:typeof a=="function"?a:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...s)=>this.service.resolveMessage(this.name,i,...s)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var We=g(C());var Is=g(B());var Qr=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Ps=new Qr;var Ho=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},$o=Symbol("i18nAttributes"),Bo=Symbol("i18nListAttributes"),Ms=Symbol("i18nProperties"),nr=Symbol("i18nContexts"),At=Symbol("i18nUnsubs"),sr=(0,We.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?Zt:Ge}i18n(s){let{context:a,key:o,message:u}=s,{custom:l,args:c,argsProvider:d}=s;if(a&&o){this.hasI18nContext(a)||this.addI18nContext(a,void 0,l);let p=c??(d?d(this):[]);return this.getI18nService(l).resolveMessage(a,o,...p)}return u}async awaitI18n(s){let{context:a,custom:o}=s;return a&&await this.getI18nService(o).prepareContext(a),this.i18n(s)}customI18n(s,a){if(Ps.isI18nKey(s)){let[o,u]=s.split(".");return this.i18n({custom:!0,context:o,key:u,...a})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((a,o,u)=>s.has(o)||typeof a.argsProvider=="function"),this.updateI18nProperties(a=>typeof a.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((a,o,u)=>{var l;return((l=u?.context)===null||l===void 0?void 0:l.toLowerCase())===s}),this.updateI18nProperties(a=>a.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var a,o;let u=this,l=(c,d,p)=>p?.context&&p.key&&s(c,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...c})}:p;(a=this[$o])===null||a===void 0||a.forEach((c,d)=>u[d]=l(c,d,u[d])),(o=this[Bo])===null||o===void 0||o.forEach((c,d)=>{var p;return u[d]=(p=u[d])===null||p===void 0?void 0:p.map(y=>l(c,d,y))})}updateI18nProperties(s){var a;(a=this[Ms])===null||a===void 0||a.forEach((o,u)=>{s(o,u)&&(this[u]=this.i18n(o))})}addI18nMessages(s,a,o){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,a,o)}addI18nContext(s,a,o){let u=(typeof s=="string"?s:s.name).toLowerCase();o=typeof s=="string"?o:s.custom,this[nr].set(u,{isCustomContext:o}),this[At].has(u)||this[At].set(u,this.getI18nService(o).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(o).prepareContext(u,a)}hasI18nContext(s){return this[nr].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[nr].forEach((s,a)=>this.addI18nContext(a,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[At].forEach(s=>s()),this[At].clear()}}return t=nr,r=At,Ho([(0,Is.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Ds=class extends sr(We.FtLitElement){},ir=class extends sr(We.FtLitElementRedux){};var ks=g($());var Us=ks.css`
|
|
232
232
|
`;var ar=g($()),or=g(B()),ur=g(C());var xt=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},te=class extends ir{constructor(){super(),this.editorMode=!1,this.addStore(x)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":ar.nothing:ar.html`
|
|
233
233
|
<span class="ft-i18n">
|
|
234
234
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
@@ -343,7 +343,7 @@
|
|
|
343
343
|
</${pn(this.element)}>
|
|
344
344
|
`:hn`
|
|
345
345
|
<slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
|
|
346
|
-
`}};le.styles=[ca,da,pa,fa,ha,ma,ya,va,ga,Aa,xa];ba([(0,mn.property)()],le.prototype,"element",void 0);ba([(0,mn.property)()],le.prototype,"variant",void 0);var Ca=g(C());var Sa={"ft-typography":le};(0,Ca.customElements)(Sa);var Na=g(yn());var Ta=g($()),
|
|
346
|
+
`}};le.styles=[ca,da,pa,fa,ha,ma,ya,va,ga,Aa,xa];ba([(0,mn.property)()],le.prototype,"element",void 0);ba([(0,mn.property)()],le.prototype,"variant",void 0);var Ca=g(C());var Sa={"ft-typography":le};(0,Ca.customElements)(Sa);var Na=g(yn());var Ta=g($()),I=g(B()),_a=g(yn()),_t=g(C());var H=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},L=class extends _t.FtLitElement{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 _t.Debouncer(1e3),this.onTransitionStart=t=>{t.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=t=>{t.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new _t.Debouncer(10),this.moveRipple=t=>{var r,n;let{x:i,y:s}=this.getCoordinates(t),a=(n=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&n!==void 0?n:{x:0,y:0,width:0,height:0};this.originX=Math.round(i!=null?i-a.x:a.width/2),this.originY=Math.round(s!=null?s-a.y:a.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(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 Ta.html`
|
|
347
347
|
<style>
|
|
348
348
|
.ft-ripple .ft-ripple--effect {
|
|
349
349
|
left: ${this.originX}px;
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
<div class="ft-ripple--background"></div>
|
|
355
355
|
<div class="ft-ripple--effect"></div>
|
|
356
356
|
</div>
|
|
357
|
-
`}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 r,n;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(n=this.target)===null||n===void 0||n.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,r;let n=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;n&&this.setupFor((r=this.target)!==null&&r!==void 0?r:n)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}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");let r=(...o)=>u=>{o.forEach(l=>window.addEventListener(l,this.endPress,{once:!0})),this.startPress(u)},n=r("mouseup","contextmenu"),i=r("touchend","touchcancel"),s=o=>{["Enter"," "].includes(o.key)&&r("keyup")(o)},a={passive:!0};t.addEventListener("mouseover",this.startHover,a),t.addEventListener("mousemove",this.moveRipple,a),t.addEventListener("mouseleave",this.endHover,a),t.addEventListener("mousedown",n,a),t.addEventListener("touchstart",i,a),t.addEventListener("touchmove",this.moveRipple,a),t.addEventListener("keydown",s,a),t.addEventListener("focus",this.startFocus,a),t.addEventListener("blur",this.endFocus,a),t.addEventListener("focusin",this.startFocus,a),t.addEventListener("focusout",this.endFocus,a),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,a),t.removeEventListener("mousemove",this.moveRipple,a),t.removeEventListener("mouseleave",this.endHover,a),t.removeEventListener("mousedown",n,a),t.removeEventListener("touchstart",i,a),t.removeEventListener("touchmove",this.moveRipple,a),t.removeEventListener("keydown",s,a),t.removeEventListener("focus",this.startFocus,a),t.removeEventListener("blur",this.endFocus,a),t.removeEventListener("focusin",this.startFocus,a),t.removeEventListener("focusout",this.endFocus,a),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let r=t,n=t,i,s;return r.x!=null?{x:i,y:s}=r:n.touches!=null&&(i=n.touches[0].clientX,s=n.touches[0].clientY),{x:i,y:s}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let r of t.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};L.elementDefinitions={};L.styles=wn;H([(0,
|
|
357
|
+
`}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 r,n;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(n=this.target)===null||n===void 0||n.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,r;let n=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;n&&this.setupFor((r=this.target)!==null&&r!==void 0?r:n)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}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");let r=(...o)=>u=>{o.forEach(l=>window.addEventListener(l,this.endPress,{once:!0})),this.startPress(u)},n=r("mouseup","contextmenu"),i=r("touchend","touchcancel"),s=o=>{["Enter"," "].includes(o.key)&&r("keyup")(o)},a={passive:!0};t.addEventListener("mouseover",this.startHover,a),t.addEventListener("mousemove",this.moveRipple,a),t.addEventListener("mouseleave",this.endHover,a),t.addEventListener("mousedown",n,a),t.addEventListener("touchstart",i,a),t.addEventListener("touchmove",this.moveRipple,a),t.addEventListener("keydown",s,a),t.addEventListener("focus",this.startFocus,a),t.addEventListener("blur",this.endFocus,a),t.addEventListener("focusin",this.startFocus,a),t.addEventListener("focusout",this.endFocus,a),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,a),t.removeEventListener("mousemove",this.moveRipple,a),t.removeEventListener("mouseleave",this.endHover,a),t.removeEventListener("mousedown",n,a),t.removeEventListener("touchstart",i,a),t.removeEventListener("touchmove",this.moveRipple,a),t.removeEventListener("keydown",s,a),t.removeEventListener("focus",this.startFocus,a),t.removeEventListener("blur",this.endFocus,a),t.removeEventListener("focusin",this.startFocus,a),t.removeEventListener("focusout",this.endFocus,a),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let r=t,n=t,i,s;return r.x!=null?{x:i,y:s}=r:n.touches!=null&&(i=n.touches[0].clientX,s=n.touches[0].clientY),{x:i,y:s}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let r of t.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};L.elementDefinitions={};L.styles=wn;H([(0,I.property)({type:Boolean})],L.prototype,"primary",void 0);H([(0,I.property)({type:Boolean})],L.prototype,"secondary",void 0);H([(0,I.property)({type:Boolean})],L.prototype,"unbounded",void 0);H([(0,I.property)({type:Boolean})],L.prototype,"activated",void 0);H([(0,I.property)({type:Boolean})],L.prototype,"selected",void 0);H([(0,I.property)({type:Boolean})],L.prototype,"disabled",void 0);H([(0,I.state)()],L.prototype,"hovered",void 0);H([(0,I.state)()],L.prototype,"focused",void 0);H([(0,I.state)()],L.prototype,"pressed",void 0);H([(0,I.state)()],L.prototype,"rippling",void 0);H([(0,I.state)()],L.prototype,"originX",void 0);H([(0,I.state)()],L.prototype,"originY",void 0);H([(0,I.query)(".ft-ripple")],L.prototype,"ripple",void 0);H([(0,I.query)(".ft-ripple--effect")],L.prototype,"rippleEffect",void 0);var wa=g(C());var Ra={"ft-ripple":L};(0,wa.customElements)(Ra);var st=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},zo={"attachment-viewed":{label:"Opening attachment",defaultEventName:"attachment-open",defaultComponentId:"ft-reader-attachments"},"attachment-downloaded":{label:"Downloading attachment",defaultEventName:"attachment-download",defaultComponentId:"ft-reader-attachments"}},J=class extends(0,Ae.withAnalytics)(sr(wt),zo){constructor(){super(),this.hideFileFormatIcon=!1,this.hideFilename=!1,this.hideDownloadIcon=!1,this.addI18nContext(Zr,Bs)}render(){var t,r;if(((r=(t=this.attachments)===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)>0){let n={"hide-file-format-icon":this.hideFileFormatIcon,"hide-filename":this.hideFilename,"hide-download-icon":this.hideDownloadIcon};return Pe.html`
|
|
358
358
|
<div part="container" class="${(0,Na.classMap)(n)}">
|
|
359
359
|
${(0,La.repeat)(this.attachments,i=>i.id,i=>{var s,a,o,u;let l=Ks(i.mimeType,(0,Ae.last)(i.file.split("."))),c=i.externalLink?i.viewerUrl:(s=this.service)===null||s===void 0?void 0:s.makeAbsolute((a=i.viewerUrl)!==null&&a!==void 0?a:"");return Pe.html`
|
|
360
360
|
<div part="attachment">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-attachments",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Reader component to list map attachments",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,15 +19,15 @@
|
|
|
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": "2.1.
|
|
23
|
-
"@fluid-topics/ft-i18n": "2.1.
|
|
24
|
-
"@fluid-topics/ft-icon": "2.1.
|
|
25
|
-
"@fluid-topics/ft-reader-context": "2.1.
|
|
26
|
-
"@fluid-topics/ft-ripple": "2.1.
|
|
27
|
-
"@fluid-topics/ft-typography": "2.1.
|
|
28
|
-
"@fluid-topics/ft-wc-utils": "2.1.
|
|
29
|
-
"@fluid-topics/public-api": "1.0.
|
|
22
|
+
"@fluid-topics/ft-app-context": "2.1.3",
|
|
23
|
+
"@fluid-topics/ft-i18n": "2.1.3",
|
|
24
|
+
"@fluid-topics/ft-icon": "2.1.3",
|
|
25
|
+
"@fluid-topics/ft-reader-context": "2.1.3",
|
|
26
|
+
"@fluid-topics/ft-ripple": "2.1.3",
|
|
27
|
+
"@fluid-topics/ft-typography": "2.1.3",
|
|
28
|
+
"@fluid-topics/ft-wc-utils": "2.1.3",
|
|
29
|
+
"@fluid-topics/public-api": "1.0.127",
|
|
30
30
|
"lit": "3.1.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "1432414b3c12e054e03bab4d15c0959e25699faf"
|
|
33
33
|
}
|