@fluid-topics/ft-reader-metadata 2.2.4 → 2.2.5

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 gu=Object.create;var Do=Object.defineProperty;var yu=Object.getOwnPropertyDescriptor;var vu=Object.getOwnPropertyNames;var bu=Object.getPrototypeOf,xu=Object.prototype.hasOwnProperty;var Pt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Eu=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of vu(e))!xu.call(t,n)&&n!==r&&Do(t,n,{get:()=>e[n],enumerable:!(i=yu(e,n))||i.enumerable});return t};var f=(t,e,r)=>(r=t!=null?gu(bu(t)):{},Eu(e||!t||!t.__esModule?Do(r,"default",{value:t,enumerable:!0}):r,t));var E=Pt((up,ko)=>{ko.exports=ftGlobals.wcUtils});var L=Pt((dp,Uo)=>{Uo.exports=ftGlobals.lit});var G=Pt((pp,$o)=>{$o.exports=ftGlobals.litDecorators});var er=Pt((qy,oc)=>{oc.exports=ftGlobals.litClassMap});var xc=Pt((lv,bc)=>{bc.exports=ftGlobals.litUnsafeHTML});var nu=Pt((ux,iu)=>{iu.exports=ftGlobals.litRepeat});var fu=f(E());var ye=f(L()),Ue=f(G()),Se=f(E());var Bo=f(L());var Ho=Bo.css`
1
+ "use strict";(()=>{var yu=Object.create;var ko=Object.defineProperty;var vu=Object.getOwnPropertyDescriptor;var bu=Object.getOwnPropertyNames;var xu=Object.getPrototypeOf,Eu=Object.prototype.hasOwnProperty;var Pt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Su=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of bu(e))!Eu.call(t,n)&&n!==r&&ko(t,n,{get:()=>e[n],enumerable:!(i=vu(e,n))||i.enumerable});return t};var f=(t,e,r)=>(r=t!=null?yu(xu(t)):{},Su(e||!t||!t.__esModule?ko(r,"default",{value:t,enumerable:!0}):r,t));var E=Pt((dp,Uo)=>{Uo.exports=ftGlobals.wcUtils});var P=Pt((pp,$o)=>{$o.exports=ftGlobals.lit});var G=Pt((fp,Bo)=>{Bo.exports=ftGlobals.litDecorators});var ir=Pt((Yy,sc)=>{sc.exports=ftGlobals.litClassMap});var Ec=Pt((cv,xc)=>{xc.exports=ftGlobals.litUnsafeHTML});var ou=Pt((dx,nu)=>{nu.exports=ftGlobals.litRepeat});var hu=f(E());var ye=f(P()),Ue=f(G()),Se=f(E());var Fo=f(P());var Ho=Fo.css`
2
2
  :host {
3
3
  display: inline-block;
4
4
  }
@@ -18,19 +18,10 @@
18
18
  all: unset;
19
19
  position: relative;
20
20
  }
21
- `;var Kr=f(E()),Fo=f(G());var et;(function(t){t.clusteringHelperCreated="clustering-helper-created",t.mapAttachmentsUpdate="map-attachments-update",t.visibleTopicChange="visible-topic-change",t.requestedTopicNotFound="requested-topic-not-found"})(et||(et={}));var Ke;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Ke||(Ke={}));var Su=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Tn=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},_n=Symbol("registerInterval"),Au=(0,Kr.applyMixinOnce)(Symbol("toFtReaderComponent"),function(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var n;return(n=this.stateManager)===null||n===void 0?void 0:n.service}connectedCallback(){super.connectedCallback(),this[_n]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[_n]):this.dispatchEvent(new Tn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=_n,Su([(0,Fo.state)()],r.prototype,"stateManager",void 0),r}),zr=class extends Au(Kr.FtLitElementRedux){};var rc=f(L()),Pe=f(G()),Oe=f(E());var Mn=globalThis,Vo=t=>t,Wr=Mn.trustedTypes,jo=Wr?Wr.createPolicy("lit-html",{createHTML:t=>t}):void 0,Yo="$lit$",tt=`lit$${Math.random().toFixed(9).slice(2)}$`,Xo="?"+tt,_u=`<${Xo}>`,mt=document,Gr=()=>mt.createComment(""),lr=t=>t===null||typeof t!="object"&&typeof t!="function",In=Array.isArray,Tu=t=>In(t)||typeof t?.[Symbol.iterator]=="function",Cn=`[
22
- \f\r]`,ar=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zo=/-->/g,Ko=/>/g,ft=RegExp(`>|${Cn}(?:([^\\s"'>=/]+)(${Cn}*=${Cn}*(?:[^
23
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Wo=/'/g,Go=/"/g,Qo=/^(?:script|style|textarea|title)$/i,Nn=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Zo=Nn(1),Jo=Nn(2),es=Nn(3),cr=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),qo=new WeakMap,ht=mt.createTreeWalker(mt,129);function ts(t,e){if(!In(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return jo!==void 0?jo.createHTML(e):e}var Cu=(t,e)=>{let r=t.length-1,i=[],n,o=e===2?"<svg>":e===3?"<math>":"",s=ar;for(let a=0;a<r;a++){let l=t[a],c,u,d=-1,p=0;for(;p<l.length&&(s.lastIndex=p,u=s.exec(l),u!==null);)p=s.lastIndex,s===ar?u[1]==="!--"?s=zo:u[1]!==void 0?s=Ko:u[2]!==void 0?(Qo.test(u[2])&&(n=RegExp("</"+u[2],"g")),s=ft):u[3]!==void 0&&(s=ft):s===ft?u[0]===">"?(s=n??ar,d=-1):u[1]===void 0?d=-2:(d=s.lastIndex-u[2].length,c=u[1],s=u[3]===void 0?ft:u[3]==='"'?Go:Wo):s===Go||s===Wo?s=ft:s===zo||s===Ko?s=ar:(s=ft,n=void 0);let h=s===ft&&t[a+1].startsWith("/>")?" ":"";o+=s===ar?l+_u:d>=0?(i.push(c),l.slice(0,d)+Yo+l.slice(d)+tt+h):l+tt+(d===-2?a:h)}return[ts(t,o+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},ur=class t{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let o=0,s=0,a=e.length-1,l=this.parts,[c,u]=Cu(e,r);if(this.el=t.createElement(c,i),ht.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=ht.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let d of n.getAttributeNames())if(d.endsWith(Yo)){let p=u[s++],h=n.getAttribute(d).split(tt),v=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:v[2],strings:h,ctor:v[1]==="."?Rn:v[1]==="?"?On:v[1]==="@"?Pn:Mt}),n.removeAttribute(d)}else d.startsWith(tt)&&(l.push({type:6,index:o}),n.removeAttribute(d));if(Qo.test(n.tagName)){let d=n.textContent.split(tt),p=d.length-1;if(p>0){n.textContent=Wr?Wr.emptyScript:"";for(let h=0;h<p;h++)n.append(d[h],Gr()),ht.nextNode(),l.push({type:2,index:++o});n.append(d[p],Gr())}}}else if(n.nodeType===8)if(n.data===Xo)l.push({type:2,index:o});else{let d=-1;for(;(d=n.data.indexOf(tt,d+1))!==-1;)l.push({type:7,index:o}),d+=tt.length-1}o++}}static createElement(e,r){let i=mt.createElement("template");return i.innerHTML=e,i}};function Lt(t,e,r=t,i){if(e===cr)return e;let n=i!==void 0?r._$Co?.[i]:r._$Cl,o=lr(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(t),n._$AT(t,r,i)),i!==void 0?(r._$Co??=[])[i]=n:r._$Cl=n),n!==void 0&&(e=Lt(t,n._$AS(t,e.values),n,i)),e}var wn=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:i}=this._$AD,n=(e?.creationScope??mt).importNode(r,!0);ht.currentNode=n;let o=ht.nextNode(),s=0,a=0,l=i[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new qr(o,o.nextSibling,this,e):l.type===1?c=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(c=new Ln(o,this,e)),this._$AV.push(c),l=i[++a]}s!==l?.index&&(o=ht.nextNode(),s++)}return ht.currentNode=mt,n}p(e){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},qr=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,i,n){this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Lt(this,e,r),lr(e)?e===K||e==null||e===""?(this._$AH!==K&&this._$AR(),this._$AH=K):e!==this._$AH&&e!==cr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Tu(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==K&&lr(this._$AH)?this._$AA.nextSibling.data=e:this.T(mt.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:i}=e,n=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=ur.createElement(ts(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let o=new wn(n,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(e){let r=qo.get(e.strings);return r===void 0&&qo.set(e.strings,r=new ur(e)),r}k(e){In(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let o of e)n===r.length?r.push(i=new t(this.O(Gr()),this.O(Gr()),this,this.options)):i=r[n],i._$AI(o),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let i=Vo(e).nextSibling;Vo(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Mt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,i,n,o){this.type=1,this._$AH=K,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=K}_$AI(e,r=this,i,n){let o=this.strings,s=!1;if(o===void 0)e=Lt(this,e,r,0),s=!lr(e)||e!==this._$AH&&e!==cr,s&&(this._$AH=e);else{let a=e,l,c;for(e=o[0],l=0;l<o.length-1;l++)c=Lt(this,a[i+l],r,l),c===cr&&(c=this._$AH[l]),s||=!lr(c)||c!==this._$AH[l],c===K?e=K:e!==K&&(e+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!n&&this.j(e)}j(e){e===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Rn=class extends Mt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===K?void 0:e}},On=class extends Mt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==K)}},Pn=class extends Mt{constructor(e,r,i,n,o){super(e,r,i,n,o),this.type=5}_$AI(e,r=this){if((e=Lt(this,e,r,0)??K)===cr)return;let i=this._$AH,n=e===K&&i!==K||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==K&&(i===K||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ln=class{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Lt(this,e)}};var wu=Mn.litHtmlPolyfillSupport;wu?.(ur,qr),(Mn.litHtmlVersions??=[]).push("3.3.3");var is=Symbol.for(""),Ru=t=>{if(t?.r===is)return t?._$litStatic$},Dn=t=>({_$litStatic$:t,r:is});var rs=new Map,kn=t=>(e,...r)=>{let i=r.length,n,o,s=[],a=[],l,c=0,u=!1;for(;c<i;){for(l=e[c];c<i&&(o=r[c],(n=Ru(o))!==void 0);)l+=n+e[++c],u=!0;c!==i&&a.push(o),s.push(l),c++}if(c===i&&s.push(e[i]),u){let d=s.join("$$lit$$");(e=rs.get(d))===void 0&&(s.raw=s,rs.set(d,e=s)),r=a}return t(e,...r)},Un=kn(Zo),bp=kn(Jo),xp=kn(es);var $n=f(G()),ys=f(E());var _e;(function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"})(_e||(_e={}));var Ce=f(L()),g=f(E()),ns=g.FtCssVariableFactory.extend("--ft-typography-font-family","",g.designSystemVariables.titleFont),We=g.FtCssVariableFactory.extend("--ft-typography-font-family","",g.designSystemVariables.contentFont),S={fontFamily:We,fontSize:g.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:g.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:g.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:g.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:g.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},It={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-title-font-family","",ns),fontSize:g.FtCssVariableFactory.extend("--ft-typography-title-font-size","",S.fontSize,"20px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",S.letterSpacing,"0.15px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-title-line-height","",S.lineHeight,"1.2"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",S.textTransform,"inherit")},Nt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",ns),fontSize:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",S.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",S.letterSpacing,"0.105px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",S.lineHeight,"1.7"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",S.textTransform,"inherit")},Dt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",S.fontSize,"16px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",S.fontWeight,"600"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",S.letterSpacing,"0.144px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",S.lineHeight,"1.5"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",S.textTransform,"inherit")},kt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",S.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",S.letterSpacing,"0.098px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",S.lineHeight,"1.7"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",S.textTransform,"inherit")},Ut={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",S.fontSize,"16px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",S.letterSpacing,"0.496px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",S.lineHeight,"1.5"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",S.textTransform,"inherit")},Te={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",S.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",S.letterSpacing,"0.252px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",S.lineHeight,"1.4"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",S.textTransform,"inherit")},$t={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",S.fontSize,"12px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",S.letterSpacing,"0.396px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",S.lineHeight,"1.33"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",S.textTransform,"inherit")},Bt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",S.fontSize,"10px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",S.letterSpacing,"0.33px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",S.lineHeight,"1.6"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",S.textTransform,"inherit")},Ht={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",S.fontSize,"10px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",S.letterSpacing,"1.5px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",S.lineHeight,"1.6"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",S.textTransform,"uppercase")},$e={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-button-font-family","",We),fontSize:g.FtCssVariableFactory.extend("--ft-typography-button-font-size","",S.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",S.fontWeight,"600"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",S.letterSpacing,"1.246px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-button-line-height","",S.lineHeight,"1.15"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",S.textTransform,"uppercase")},os=Ce.css`
21
+ `;var Gr=f(E()),Vo=f(G());var et;(function(t){t.clusteringHelperCreated="clustering-helper-created",t.mapAttachmentsUpdate="map-attachments-update",t.visibleTopicChange="visible-topic-change",t.requestedTopicNotFound="requested-topic-not-found"})(et||(et={}));var We;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(We||(We={}));var Au=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Cn=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Tn=Symbol("registerInterval"),_u=(0,Gr.applyMixinOnce)(Symbol("toFtReaderComponent"),function(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var n;return(n=this.stateManager)===null||n===void 0?void 0:n.service}connectedCallback(){super.connectedCallback(),this[Tn]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Tn]):this.dispatchEvent(new Cn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Tn,Au([(0,Vo.state)()],r.prototype,"stateManager",void 0),r}),Wr=class extends _u(Gr.FtLitElementRedux){};var ic=f(P()),Pe=f(G()),Le=f(E());var In=globalThis,jo=t=>t,qr=In.trustedTypes,zo=qr?qr.createPolicy("lit-html",{createHTML:t=>t}):void 0,Xo="$lit$",tt=`lit$${Math.random().toFixed(9).slice(2)}$`,Qo="?"+tt,Tu=`<${Qo}>`,mt=document,Yr=()=>mt.createComment(""),dr=t=>t===null||typeof t!="object"&&typeof t!="function",Nn=Array.isArray,Cu=t=>Nn(t)||typeof t?.[Symbol.iterator]=="function",wn=`[
22
+ \f\r]`,ur=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ko=/-->/g,Wo=/>/g,ft=RegExp(`>|${wn}(?:([^\\s"'>=/]+)(${wn}*=${wn}*(?:[^
23
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Go=/'/g,qo=/"/g,Zo=/^(?:script|style|textarea|title)$/i,Dn=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Jo=Dn(1),es=Dn(2),ts=Dn(3),pr=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),Yo=new WeakMap,ht=mt.createTreeWalker(mt,129);function rs(t,e){if(!Nn(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return zo!==void 0?zo.createHTML(e):e}var wu=(t,e)=>{let r=t.length-1,i=[],n,o=e===2?"<svg>":e===3?"<math>":"",s=ur;for(let a=0;a<r;a++){let l=t[a],c,u,d=-1,p=0;for(;p<l.length&&(s.lastIndex=p,u=s.exec(l),u!==null);)p=s.lastIndex,s===ur?u[1]==="!--"?s=Ko:u[1]!==void 0?s=Wo:u[2]!==void 0?(Zo.test(u[2])&&(n=RegExp("</"+u[2],"g")),s=ft):u[3]!==void 0&&(s=ft):s===ft?u[0]===">"?(s=n??ur,d=-1):u[1]===void 0?d=-2:(d=s.lastIndex-u[2].length,c=u[1],s=u[3]===void 0?ft:u[3]==='"'?qo:Go):s===qo||s===Go?s=ft:s===Ko||s===Wo?s=ur:(s=ft,n=void 0);let h=s===ft&&t[a+1].startsWith("/>")?" ":"";o+=s===ur?l+Tu:d>=0?(i.push(c),l.slice(0,d)+Xo+l.slice(d)+tt+h):l+tt+(d===-2?a:h)}return[rs(t,o+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},fr=class t{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let o=0,s=0,a=e.length-1,l=this.parts,[c,u]=wu(e,r);if(this.el=t.createElement(c,i),ht.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=ht.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let d of n.getAttributeNames())if(d.endsWith(Xo)){let p=u[s++],h=n.getAttribute(d).split(tt),v=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:v[2],strings:h,ctor:v[1]==="."?On:v[1]==="?"?Ln:v[1]==="@"?Pn:It}),n.removeAttribute(d)}else d.startsWith(tt)&&(l.push({type:6,index:o}),n.removeAttribute(d));if(Zo.test(n.tagName)){let d=n.textContent.split(tt),p=d.length-1;if(p>0){n.textContent=qr?qr.emptyScript:"";for(let h=0;h<p;h++)n.append(d[h],Yr()),ht.nextNode(),l.push({type:2,index:++o});n.append(d[p],Yr())}}}else if(n.nodeType===8)if(n.data===Qo)l.push({type:2,index:o});else{let d=-1;for(;(d=n.data.indexOf(tt,d+1))!==-1;)l.push({type:7,index:o}),d+=tt.length-1}o++}}static createElement(e,r){let i=mt.createElement("template");return i.innerHTML=e,i}};function Mt(t,e,r=t,i){if(e===pr)return e;let n=i!==void 0?r._$Co?.[i]:r._$Cl,o=dr(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(t),n._$AT(t,r,i)),i!==void 0?(r._$Co??=[])[i]=n:r._$Cl=n),n!==void 0&&(e=Mt(t,n._$AS(t,e.values),n,i)),e}var Rn=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:i}=this._$AD,n=(e?.creationScope??mt).importNode(r,!0);ht.currentNode=n;let o=ht.nextNode(),s=0,a=0,l=i[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new Xr(o,o.nextSibling,this,e):l.type===1?c=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(c=new Mn(o,this,e)),this._$AV.push(c),l=i[++a]}s!==l?.index&&(o=ht.nextNode(),s++)}return ht.currentNode=mt,n}p(e){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},Xr=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,i,n){this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Mt(this,e,r),dr(e)?e===K||e==null||e===""?(this._$AH!==K&&this._$AR(),this._$AH=K):e!==this._$AH&&e!==pr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Cu(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==K&&dr(this._$AH)?this._$AA.nextSibling.data=e:this.T(mt.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:i}=e,n=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=fr.createElement(rs(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let o=new Rn(n,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(e){let r=Yo.get(e.strings);return r===void 0&&Yo.set(e.strings,r=new fr(e)),r}k(e){Nn(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let o of e)n===r.length?r.push(i=new t(this.O(Yr()),this.O(Yr()),this,this.options)):i=r[n],i._$AI(o),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let i=jo(e).nextSibling;jo(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},It=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,i,n,o){this.type=1,this._$AH=K,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=K}_$AI(e,r=this,i,n){let o=this.strings,s=!1;if(o===void 0)e=Mt(this,e,r,0),s=!dr(e)||e!==this._$AH&&e!==pr,s&&(this._$AH=e);else{let a=e,l,c;for(e=o[0],l=0;l<o.length-1;l++)c=Mt(this,a[i+l],r,l),c===pr&&(c=this._$AH[l]),s||=!dr(c)||c!==this._$AH[l],c===K?e=K:e!==K&&(e+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!n&&this.j(e)}j(e){e===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},On=class extends It{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===K?void 0:e}},Ln=class extends It{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==K)}},Pn=class extends It{constructor(e,r,i,n,o){super(e,r,i,n,o),this.type=5}_$AI(e,r=this){if((e=Mt(this,e,r,0)??K)===pr)return;let i=this._$AH,n=e===K&&i!==K||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==K&&(i===K||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Mn=class{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Mt(this,e)}};var Ru=In.litHtmlPolyfillSupport;Ru?.(fr,Xr),(In.litHtmlVersions??=[]).push("3.3.3");var ns=Symbol.for(""),Ou=t=>{if(t?.r===ns)return t?._$litStatic$},kn=t=>({_$litStatic$:t,r:ns});var is=new Map,Un=t=>(e,...r)=>{let i=r.length,n,o,s=[],a=[],l,c=0,u=!1;for(;c<i;){for(l=e[c];c<i&&(o=r[c],(n=Ou(o))!==void 0);)l+=n+e[++c],u=!0;c!==i&&a.push(o),s.push(l),c++}if(c===i&&s.push(e[i]),u){let d=s.join("$$lit$$");(e=is.get(d))===void 0&&(s.raw=s,is.set(d,e=s)),r=a}return t(e,...r)},$n=Un(Jo),xp=Un(es),Ep=Un(ts);var Bn=f(G()),vs=f(E());var _e;(function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"})(_e||(_e={}));var Ce=f(P()),g=f(E()),os=g.FtCssVariableFactory.extend("--ft-typography-font-family","",g.designSystemVariables.titleFont),Ge=g.FtCssVariableFactory.extend("--ft-typography-font-family","",g.designSystemVariables.contentFont),S={fontFamily:Ge,fontSize:g.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:g.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:g.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:g.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:g.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},Nt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-title-font-family","",os),fontSize:g.FtCssVariableFactory.extend("--ft-typography-title-font-size","",S.fontSize,"20px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",S.letterSpacing,"0.15px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-title-line-height","",S.lineHeight,"1.2"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",S.textTransform,"inherit")},Dt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",os),fontSize:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",S.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",S.letterSpacing,"0.105px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",S.lineHeight,"1.7"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",S.textTransform,"inherit")},kt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Ge),fontSize:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",S.fontSize,"16px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",S.fontWeight,"600"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",S.letterSpacing,"0.144px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",S.lineHeight,"1.5"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",S.textTransform,"inherit")},Ut={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Ge),fontSize:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",S.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",S.letterSpacing,"0.098px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",S.lineHeight,"1.7"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",S.textTransform,"inherit")},$t={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Ge),fontSize:g.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",S.fontSize,"16px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",S.letterSpacing,"0.496px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",S.lineHeight,"1.5"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",S.textTransform,"inherit")},Te={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Ge),fontSize:g.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",S.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",S.letterSpacing,"0.252px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",S.lineHeight,"1.4"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",S.textTransform,"inherit")},Bt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Ge),fontSize:g.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",S.fontSize,"12px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",S.letterSpacing,"0.396px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",S.lineHeight,"1.33"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",S.textTransform,"inherit")},Ft={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Ge),fontSize:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",S.fontSize,"10px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",S.letterSpacing,"0.33px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",S.lineHeight,"1.6"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",S.textTransform,"inherit")},Ht={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Ge),fontSize:g.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",S.fontSize,"10px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",S.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",S.letterSpacing,"1.5px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",S.lineHeight,"1.6"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",S.textTransform,"uppercase")},$e={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Ge),fontSize:g.FtCssVariableFactory.extend("--ft-typography-button-font-size","",S.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",S.fontWeight,"600"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",S.letterSpacing,"1.246px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-button-line-height","",S.lineHeight,"1.15"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",S.textTransform,"uppercase")},ss=Ce.css`
24
24
  .ft-typography--title {
25
- font-family: ${It.fontFamily};
26
- font-size: ${It.fontSize};
27
- font-weight: ${It.fontWeight};
28
- letter-spacing: ${It.letterSpacing};
29
- line-height: ${It.lineHeight};
30
- text-transform: ${It.textTransform};
31
- }
32
- `,ss=Ce.css`
33
- .ft-typography--title-dense {
34
25
  font-family: ${Nt.fontFamily};
35
26
  font-size: ${Nt.fontSize};
36
27
  font-weight: ${Nt.fontWeight};
@@ -39,7 +30,7 @@
39
30
  text-transform: ${Nt.textTransform};
40
31
  }
41
32
  `,as=Ce.css`
42
- .ft-typography--subtitle1 {
33
+ .ft-typography--title-dense {
43
34
  font-family: ${Dt.fontFamily};
44
35
  font-size: ${Dt.fontSize};
45
36
  font-weight: ${Dt.fontWeight};
@@ -48,7 +39,7 @@
48
39
  text-transform: ${Dt.textTransform};
49
40
  }
50
41
  `,ls=Ce.css`
51
- .ft-typography--subtitle2 {
42
+ .ft-typography--subtitle1 {
52
43
  font-family: ${kt.fontFamily};
53
44
  font-size: ${kt.fontSize};
54
45
  font-weight: ${kt.fontWeight};
@@ -56,9 +47,8 @@
56
47
  line-height: ${kt.lineHeight};
57
48
  text-transform: ${kt.textTransform};
58
49
  }
59
-
60
50
  `,cs=Ce.css`
61
- .ft-typography--body1 {
51
+ .ft-typography--subtitle2 {
62
52
  font-family: ${Ut.fontFamily};
63
53
  font-size: ${Ut.fontSize};
64
54
  font-weight: ${Ut.fontWeight};
@@ -66,7 +56,17 @@
66
56
  line-height: ${Ut.lineHeight};
67
57
  text-transform: ${Ut.textTransform};
68
58
  }
59
+
69
60
  `,us=Ce.css`
61
+ .ft-typography--body1 {
62
+ font-family: ${$t.fontFamily};
63
+ font-size: ${$t.fontSize};
64
+ font-weight: ${$t.fontWeight};
65
+ letter-spacing: ${$t.letterSpacing};
66
+ line-height: ${$t.lineHeight};
67
+ text-transform: ${$t.textTransform};
68
+ }
69
+ `,ds=Ce.css`
70
70
  .ft-typography--body2 {
71
71
  font-family: ${Te.fontFamily};
72
72
  font-size: ${Te.fontSize};
@@ -75,17 +75,8 @@
75
75
  line-height: ${Te.lineHeight};
76
76
  text-transform: ${Te.textTransform};
77
77
  }
78
- `,ds=Ce.css`
79
- .ft-typography--caption {
80
- font-family: ${$t.fontFamily};
81
- font-size: ${$t.fontSize};
82
- font-weight: ${$t.fontWeight};
83
- letter-spacing: ${$t.letterSpacing};
84
- line-height: ${$t.lineHeight};
85
- text-transform: ${$t.textTransform};
86
- }
87
78
  `,ps=Ce.css`
88
- .ft-typography--breadcrumb {
79
+ .ft-typography--caption {
89
80
  font-family: ${Bt.fontFamily};
90
81
  font-size: ${Bt.fontSize};
91
82
  font-weight: ${Bt.fontWeight};
@@ -94,6 +85,15 @@
94
85
  text-transform: ${Bt.textTransform};
95
86
  }
96
87
  `,fs=Ce.css`
88
+ .ft-typography--breadcrumb {
89
+ font-family: ${Ft.fontFamily};
90
+ font-size: ${Ft.fontSize};
91
+ font-weight: ${Ft.fontWeight};
92
+ letter-spacing: ${Ft.letterSpacing};
93
+ line-height: ${Ft.lineHeight};
94
+ text-transform: ${Ft.textTransform};
95
+ }
96
+ `,hs=Ce.css`
97
97
  .ft-typography--overline {
98
98
  font-family: ${Ht.fontFamily};
99
99
  font-size: ${Ht.fontSize};
@@ -102,7 +102,7 @@
102
102
  line-height: ${Ht.lineHeight};
103
103
  text-transform: ${Ht.textTransform};
104
104
  }
105
- `,hs=Ce.css`
105
+ `,ms=Ce.css`
106
106
  .ft-typography--button {
107
107
  font-family: ${$e.fontFamily};
108
108
  font-size: ${$e.fontSize};
@@ -111,19 +111,19 @@
111
111
  line-height: ${$e.lineHeight};
112
112
  text-transform: ${$e.textTransform};
113
113
  }
114
- `,ms=Ce.css`
114
+ `,gs=Ce.css`
115
115
  .ft-typography {
116
116
  vertical-align: inherit;
117
117
  }
118
- `;var gs=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Z=class extends ys.FtLitElement{constructor(){super(...arguments),this.variant=_e.body1}render(){return this.element?Un`
119
- <${Dn(this.element)}
118
+ `;var ys=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Z=class extends vs.FtLitElement{constructor(){super(...arguments),this.variant=_e.body1}render(){return this.element?$n`
119
+ <${kn(this.element)}
120
120
  part="text"
121
121
  class="ft-typography ft-typography--${this.variant}">
122
122
  <slot></slot>
123
- </${Dn(this.element)}>
124
- `:Un`
123
+ </${kn(this.element)}>
124
+ `:$n`
125
125
  <slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
126
- `}};Z.styles=[os,ss,as,ls,cs,us,ds,ps,fs,hs,ms];gs([(0,$n.property)()],Z.prototype,"element",void 0);gs([(0,$n.property)()],Z.prototype,"variant",void 0);var bs=f(E());var vs={"ft-typography":Z};(0,bs.customElements)(vs);var xs=f(L()),rt=f(E()),dr={distance:rt.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:rt.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:rt.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:rt.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",rt.designSystemVariables.borderRadiusS),maxWidth:rt.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},Es=xs.css`
126
+ `}};Z.styles=[ss,as,ls,cs,us,ds,ps,fs,hs,ms,gs];ys([(0,Bn.property)()],Z.prototype,"element",void 0);ys([(0,Bn.property)()],Z.prototype,"variant",void 0);var xs=f(E());var bs={"ft-typography":Z};(0,xs.customElements)(bs);var Es=f(P()),rt=f(E()),hr={distance:rt.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:rt.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:rt.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:rt.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",rt.designSystemVariables.borderRadiusS),maxWidth:rt.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},Ss=Es.css`
127
127
  .ft-tooltip--container {
128
128
  display: block;
129
129
  }
@@ -141,28 +141,28 @@
141
141
  box-sizing: border-box;
142
142
  overflow: hidden;
143
143
  width: max-content;
144
- max-width: ${dr.maxWidth};
144
+ max-width: ${hr.maxWidth};
145
145
  text-align: center;
146
- padding: ${dr.distance};
146
+ padding: ${hr.distance};
147
147
  }
148
148
 
149
149
  .ft-tooltip--content {
150
150
  padding: 4px 8px;
151
- border-radius: ${dr.borderRadiusS};
152
- background-color: ${dr.backgroundColor};
153
- color: ${dr.color};
151
+ border-radius: ${hr.borderRadiusS};
152
+ background-color: ${hr.backgroundColor};
153
+ color: ${hr.color};
154
154
  position: relative;
155
155
  word-break: break-word;
156
156
  }
157
- `;var As=["top","right","bottom","left"],Ss=["start","end"],Hn=As.reduce((t,e)=>t.concat(e,e+"-"+Ss[0],e+"-"+Ss[1]),[]),pr=Math.min,it=Math.max,fr=Math.round;var Be=t=>({x:t,y:t}),Ou={left:"right",right:"left",bottom:"top",top:"bottom"};function _s(t,e,r){return it(t,pr(e,r))}function Yr(t,e){return typeof t=="function"?t(e):t}function hr(t){return t.split("-")[0]}function nt(t){return t.split("-")[1]}function Fn(t){return t==="x"?"y":"x"}function Vn(t){return t==="y"?"height":"width"}function Xr(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function jn(t){return Fn(Xr(t))}function Ts(t,e,r){r===void 0&&(r=!1);let i=nt(t),n=jn(t),o=Vn(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Bn(s)),[s,Bn(s)]}function Cs(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Bn(t){let e=hr(t);return Ou[e]+t.slice(e.length)}function Pu(t){var e,r,i,n;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(n=t.left)!=null?n:0}}function ws(t){return typeof t!="number"?Pu(t):{top:t,right:t,bottom:t,left:t}}function gt(t){let{x:e,y:r,width:i,height:n}=t;return{width:i,height:n,top:r,left:e,right:e+i,bottom:r+n,x:e,y:r}}function Rs(t,e,r){let{reference:i,floating:n}=t,o=Xr(e),s=jn(e),a=Vn(s),l=hr(e),c=o==="y",u=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:u,y:i.y-n.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:d};break;case"left":h={x:i.x-n.width,y:d};break;default:h={x:i.x,y:i.y}}let v=nt(e);return v&&(h[s]+=p*(v==="end"?1:-1)*(r&&c?-1:1)),h}async function Os(t,e){var r;e===void 0&&(e={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Yr(e,t),v=ws(h),y=a[p?d==="floating"?"reference":"floating":d],_=gt(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(y)))==null||r?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),P=d==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(x))&&await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1},O=gt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:P,offsetParent:x,strategy:l}):P);return{top:(_.top-O.top+v.top)/C.y,bottom:(O.bottom-_.bottom+v.bottom)/C.y,left:(_.left-O.left+v.left)/C.x,right:(O.right-_.right+v.right)/C.x}}var Lu=50,Ps=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Os},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:d}=Rs(c,i,l),p=i,h=0,v={};for(let A=0;A<o.length;A++){let y=o[A];if(!y)continue;let{name:_,fn:P}=y,{x,y:C,data:O,reset:V}=await P({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:v,rects:c,platform:a,elements:{reference:t,floating:e}});u=x??u,d=C??d,v[_]={...v[_],...O},V&&h<Lu&&(h++,typeof V=="object"&&(V.placement&&(p=V.placement),V.rects&&(c=V.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:n}):V.rects),{x:u,y:d}=Rs(c,p,l)),A=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:v}};function Mu(t,e,r){return(t?[...r.filter(n=>nt(n)===t),...r.filter(n=>nt(n)!==t)]:r.filter(n=>hr(n)===n)).filter(n=>t?nt(n)===t||(e?Cs(n)!==n:!1):!0)}var Ls=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:p=Hn,autoAlignment:h=!0,...v}=Yr(t,e),A=d!==void 0||p===Hn?Mu(d||null,h,p):p,y=((r=s.autoPlacement)==null?void 0:r.index)||0,_=A[y];if(_==null)return{};if(a!==_)return{reset:{placement:A[0]}};let P=await l.detectOverflow(e,v),x=Ts(_,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),C=[P[hr(_)],P[x[0]],P[x[1]]],O=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:_,overflows:C}],V=A[y+1];if(V)return{data:{index:y+1,overflows:O},reset:{placement:V}};let D=O.map(Ae=>{let pt=nt(Ae.placement);return[Ae.placement,pt&&u?Ae.overflows.slice(0,2).reduce((hu,mu)=>hu+mu,0):Ae.overflows[0],Ae.overflows]}).sort((Ae,pt)=>Ae[1]-pt[1]),sr=((n=D.filter(Ae=>Ae[2].slice(0,nt(Ae[0])?2:3).every(pt=>pt<=0))[0])==null?void 0:n[0])||D[0][0];return sr!==a?{data:{index:y+1,overflows:O},reset:{placement:sr}}:{}}}};var Ms=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:n,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:P=>{let{x,y:C}=P;return{x,y:C}}},...c}=Yr(t,e),u={x:r,y:i},d=await o.detectOverflow(e,c),p=Xr(n),h=Fn(p),v=u[h],A=u[p],y=(P,x)=>_s(x+d[P==="y"?"top":"left"],x,x-d[P==="y"?"bottom":"right"]);s&&(v=y(h,v)),a&&(A=y(p,A));let _=l.fn({...e,[h]:v,[p]:A});return{..._,data:{x:_.x-r,y:_.y-i,enabled:{[h]:s,[p]:a}}}}}};function Zr(){return typeof window<"u"}function vt(t){return Ns(t)?(t.nodeName||"").toLowerCase():"#document"}function pe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ge(t){var e;return(e=(Ns(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ns(t){return Zr()?t instanceof Node||t instanceof pe(t).Node:!1}function Le(t){return Zr()?t instanceof Element||t instanceof pe(t).Element:!1}function qe(t){return Zr()?t instanceof HTMLElement||t instanceof pe(t).HTMLElement:!1}function Is(t){return!Zr()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof pe(t).ShadowRoot}function mr(t){let{overflow:e,overflowX:r,overflowY:i,display:n}=Me(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&n!=="inline"&&n!=="contents"}function Ds(t){return/^(table|td|th)$/.test(vt(t))}function gr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Iu=/transform|translate|scale|rotate|perspective|filter/,Nu=/paint|layout|strict|content/,yt=t=>!!t&&t!=="none",zn;function Ft(t){let e=Le(t)?Me(t):t;return yt(e.transform)||yt(e.translate)||yt(e.scale)||yt(e.rotate)||yt(e.perspective)||!Jr()&&(yt(e.backdropFilter)||yt(e.filter))||Iu.test(e.willChange||"")||Nu.test(e.contain||"")}function ks(t){let e=ot(t);for(;qe(e)&&!Vt(e);){if(Ft(e))return e;if(gr(e))return null;e=ot(e)}return null}function Jr(){return zn==null&&(zn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),zn}function Vt(t){return/^(html|body|#document)$/.test(vt(t))}function Me(t){return pe(t).getComputedStyle(t)}function yr(t){return Le(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if(vt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Is(t)&&t.host||Ge(t);return Is(e)?e.host:e}function Us(t){let e=ot(t);return Vt(e)?(t.ownerDocument||t).body:qe(e)&&mr(e)?e:Us(e)}function Qr(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=Us(t),o=n===((i=t.ownerDocument)==null?void 0:i.body),s=pe(n);if(o){let a=ei(s);return e.concat(s,s.visualViewport||[],mr(n)?n:[],a&&r?Qr(a):[])}else return e.concat(n,Qr(n,[],r))}function ei(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Hs(t){let e=Me(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=qe(t),o=n?t.offsetWidth:r,s=n?t.offsetHeight:i,a=fr(r)!==o||fr(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Fs(t){return Le(t)?t:t.contextElement}function jt(t){let e=Fs(t);if(!qe(e))return Be(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:o}=Hs(e),s=(o?fr(r.width):r.width)/i,a=(o?fr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Du=Be(0);function Vs(t){let e=pe(t);return!Jr()||!e.visualViewport?Du:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ku(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===pe(t)}function vr(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),o=Fs(t),s=Be(1);e&&(i?Le(i)&&(s=jt(i)):s=jt(t));let a=ku(o,r,i)?Vs(o):Be(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,u=n.width/s.x,d=n.height/s.y;if(o&&i){let p=pe(o),h=Le(i)?pe(i):i,v=p,A=ei(v);for(;A&&h!==v;){let y=jt(A),_=A.getBoundingClientRect(),P=Me(A),x=_.left+(A.clientLeft+parseFloat(P.paddingLeft))*y.x,C=_.top+(A.clientTop+parseFloat(P.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=x,c+=C,v=pe(A),A=ei(v)}}return gt({width:u,height:d,x:l,y:c})}function ti(t,e){let r=yr(t).scrollLeft;return e?e.left+r:vr(Ge(t)).left+r}function js(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-ti(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function Uu(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,o=n==="fixed",s=Ge(i),a=e?gr(e.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Be(1),u=Be(0),d=qe(i);if((d||!o)&&((vt(i)!=="body"||mr(s))&&(l=yr(i)),d)){let h=vr(i);c=jt(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}let p=s&&!d&&!o?js(s,l):Be(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function $u(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Bu(t){let e=yr(t),r=t.ownerDocument.body,i=it(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=it(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-e.scrollLeft+ti(t),s=-e.scrollTop;return Me(r).direction==="rtl"&&(o+=it(t.clientWidth,r.clientWidth)-i),{width:i,height:n,x:o,y:s}}var Hu=25;function Fu(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=pe(t),o=Ge(t),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let p=!Jr()||e==="fixed";i?p||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,p&&(c=s.offsetLeft,u=s.offsetTop))}if(ti(o)<=0){let p=o.ownerDocument,h=p.body,v=getComputedStyle(h),A=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,y=Math.abs(o.clientWidth-h.clientWidth-A),_=getComputedStyle(o).scrollbarGutter==="stable both-edges"?y/2:y;_<=Hu&&(a-=_)}return{width:a,height:l,x:c,y:u}}function Vu(t,e){let r=vr(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,o=jt(t),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function $s(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=Fu(t,r,e);else if(e==="document")i=Bu(Ge(t));else if(Le(e))i=Vu(e,r);else{let n=Vs(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return gt(i)}function ju(t,e){let r=e.get(t);if(r)return r;let i=Qr(t,[],!1).filter(a=>Le(a)&&vt(a)!=="body"),n=null,o=Me(t).position==="fixed",s=o?ot(t):t;for(;Le(s)&&!Vt(s);){let a=Me(s),l=Ft(s),c=n?n.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(d=>d!==s):n=a,s=ot(s)}return e.set(t,i),i}function zu(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,s=[...r==="clippingAncestors"?gr(e)?[]:ju(e,this._c):[].concat(r),i],a=$s(e,s[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let h=$s(e,s[p],n);l=it(h.top,l),c=pr(h.right,c),u=pr(h.bottom,u),d=it(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Ku(t){let{width:e,height:r}=Hs(t);return{width:e,height:r}}function Wu(t,e,r){let i=qe(e),n=Ge(e),o=r==="fixed",s=vr(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Be(0);if((i||!o)&&((vt(e)!=="body"||mr(n))&&(a=yr(e)),i)){let p=vr(e,!0,o,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}!i&&n&&(l.x=ti(n));let c=n&&!i&&!o?js(n,a):Be(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function Kn(t){return Me(t).position==="static"}function Bs(t,e){if(!qe(t)||Me(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ge(t)===r&&(r=r.ownerDocument.body),r}function zs(t,e){let r=pe(t);if(gr(t))return r;if(!qe(t)){let n=ot(t);for(;n&&!Vt(n);){if(Le(n)&&!Kn(n))return n;n=ot(n)}return r}let i=Bs(t,e);for(;i&&Ds(i)&&Kn(i);)i=Bs(i,e);return i&&Vt(i)&&Kn(i)&&!Ft(i)?r:i||ks(t)||r}var Gu=async function(t){let e=this.getOffsetParent||zs,r=this.getDimensions,i=await r(t.floating);return{reference:Wu(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function qu(t){return Me(t).direction==="rtl"}var ri={convertOffsetParentRelativeRectToViewportRelativeRect:Uu,getDocumentElement:Ge,getClippingRect:zu,getOffsetParent:zs,getElementRects:Gu,getClientRects:$u,getDimensions:Ku,getScale:jt,isElement:Le,isRTL:qu};var Ks=Ls,Ws=Ms;var Gs=(t,e,r)=>{let i=new Map,n=r??{},o={...ri,...n.platform,_c:i};return Ps(t,e,{...n,platform:o})};function qs(t){return Yu(t)}function Wn(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Yu(t){for(let e=t;e;e=Wn(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Wn(t);e;e=Wn(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Ft(r)||e.tagName==="BODY"))return e}return null}async function ii(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},Gs(t,e,{strategy:i.strategy,platform:{...ri,getOffsetParent:n=>ri.getOffsetParent(n,qs)},middleware:[Ws({crossAxis:!0}),Ks({allowedPlacements:[i.placement]})]})}var Jt=f(E());var mo=f(G());var Ys=f(G(),1);var Gn=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Xs(t,e){return(0,Ys.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return br(t);try{return JSON.parse(r)}catch{return br(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:xr,...e??{}})}function Xu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!zt(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!zt(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(r=o.length,r!==n(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!zt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function zt(t,e){try{return Xu(t,e)}catch{return!1}}function xr(t,e){return!zt(t,e)}function br(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function ni(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let n=e(i);return n[t]=!0,n}}var Qs=f(G(),1);var qn=t=>{let e=t??{};return(r,i)=>{var n;let o={hasChanged:xr,attribute:!1,...e};(0,Qs.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[i]),store:e.store})}};var oi=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var bt=f(G(),1);var si=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Js=f(L(),1);var ai=globalThis,Qu=ai.ShadowRoot&&(ai.ShadyCSS===void 0||ai.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Zs=(t,e)=>{if(Qu)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),n=ai.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}};var li=class extends Js.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return Zs(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){Gn(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function ea(t,e,...r){var i;let n=t.querySelector(e);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var Wt=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},na,ta=Symbol("constructorPrototype"),ra=Symbol("constructorName"),oa=Symbol("exportpartsDebouncer"),ia=Symbol("dynamicDependenciesLoaded"),Kt=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Kt.eventName="exportparts-updated";var He=class extends li{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[na]=new si(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[oa].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[ra]=this.constructor.name,this[ta]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ra]&&Object.setPrototypeOf(this,this[ta])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[ia]||(r[ia]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Kt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Kt.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Kt)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=ea(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,i,n,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],v=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(y=>y.split(":")[1]))!==null&&a!==void 0?a:[],A=[...h,...v].filter(l).map(y=>y.trim());for(let y of A)u.add(y)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(h=>`${p}:${h}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};na=oa;Wt([(0,bt.property)()],He.prototype,"exportpartsPrefix",void 0);Wt([Xs([])],He.prototype,"exportpartsPrefixes",void 0);Wt([(0,bt.property)({reflect:!0})],He.prototype,"exportparts",void 0);Wt([(0,bt.property)()],He.prototype,"customStylesheet",void 0);Wt([(0,bt.property)()],He.prototype,"elementToFocus",void 0);Wt([(0,bt.state)()],He.prototype,"useAdoptedStyleSheets",void 0);function ci(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Er=Symbol("internalReduxEventsUnsubscribers"),st=Symbol("internalStoresUnsubscribers"),xt=Symbol("internalStores"),Zu=ni(Symbol("withRedux"),function(t){var e,r,i;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[xt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[xt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[xt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[xt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[st].has(s.store):this[st].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[st].set(s,a.subscribe(()=>this.updateFromStores())),this[Er].set(s,[]),ci(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[Er].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[st].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[st].has(s)&&this[st].get(s)(),this[st].delete(s),(a=this[Er].get(s))===null||a===void 0||a.forEach(l=>l()),this[Er].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=st,r=xt,i=Er,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),sa=class extends Zu(He){};function J(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Ju=typeof Symbol=="function"&&Symbol.observable||"@@observable",aa=Ju,Yn=()=>Math.random().toString(36).substring(7).split("").join("."),ed={INIT:`@@redux/INIT${Yn()}`,REPLACE:`@@redux/REPLACE${Yn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Yn()}`},ui=ed;function di(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Xn(t,e,r){if(typeof t!="function")throw new Error(J(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(J(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(J(1));return r(Xn)(t,e)}let i=t,n=e,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((y,_)=>{s.set(_,y)}))}function u(){if(l)throw new Error(J(3));return n}function d(y){if(typeof y!="function")throw new Error(J(4));if(l)throw new Error(J(5));let _=!0;c();let P=a++;return s.set(P,y),function(){if(_){if(l)throw new Error(J(6));_=!1,c(),s.delete(P),o=null}}}function p(y){if(!di(y))throw new Error(J(7));if(typeof y.type>"u")throw new Error(J(8));if(typeof y.type!="string")throw new Error(J(17));if(l)throw new Error(J(9));try{l=!0,n=i(n,y)}finally{l=!1}return(o=s).forEach(P=>{P()}),y}function h(y){if(typeof y!="function")throw new Error(J(10));i=y,p({type:ui.REPLACE})}function v(){let y=d;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(J(11));function P(){let C=_;C.next&&C.next(u())}return P(),{unsubscribe:y(P)}},[aa](){return this}}}return p({type:ui.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:h,[aa]:v}}function td(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:ui.INIT})>"u")throw new Error(J(12));if(typeof r(void 0,{type:ui.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(J(13))})}function la(t){let e=Object.keys(t),r={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),n,o;try{td(r)}catch(s){o=s}return function(a={},l){if(o)throw o;let c=!1,u={};for(let d=0;d<i.length;d++){let p=i[d],h=r[p],v=a[p],A=h(v,l);if(typeof A>"u"){let y=l&&l.type;throw new Error(J(14))}u[p]=A,c=c||A!==v}return c=c||i.length!==Object.keys(a).length,c?u:a}}function Sr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function ca(...t){return e=>(r,i)=>{let n=e(r,i),o=()=>{throw new Error(J(15))},s={getState:n.getState,dispatch:(l,...c)=>o(l,...c)},a=t.map(l=>l(s));return o=Sr(...a)(n.dispatch),{...n,dispatch:o}}}function ua(t){return di(t)&&"type"in t&&typeof t.type=="string"}var ba=Symbol.for("immer-nothing"),da=Symbol.for("immer-draftable"),ie=Symbol.for("immer-state");function Ie(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var ve=Object,qt=ve.getPrototypeOf,mi="constructor",Ei="prototype",eo="configurable",gi="enumerable",fi="writable",Ar="value",Fe=t=>!!t&&!!t[ie];function be(t){return t?xa(t)||Ai(t)||!!t[da]||!!t[mi]?.[da]||_i(t)||Ti(t):!1}var rd=ve[Ei][mi].toString(),pa=new WeakMap;function xa(t){if(!t||!lo(t))return!1;let e=qt(t);if(e===null||e===ve[Ei])return!0;let r=ve.hasOwnProperty.call(e,mi)&&e[mi];if(r===Object)return!0;if(!Gt(r))return!1;let i=pa.get(r);return i===void 0&&(i=Function.toString.call(r),pa.set(r,i)),i===rd}function Si(t,e,r=!0){Cr(t)===0?(r?Reflect.ownKeys(t):ve.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((i,n)=>e(n,i,t))}function Cr(t){let e=t[ie];return e?e.type_:Ai(t)?1:_i(t)?2:Ti(t)?3:0}var Qn=(t,e,r=Cr(t))=>r===2?t.has(e):ve[Ei].hasOwnProperty.call(t,e),to=(t,e,r=Cr(t))=>r===2?t.get(e):t[e],yi=(t,e,r,i=Cr(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function id(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Ai=Array.isArray,_i=t=>t instanceof Map,Ti=t=>t instanceof Set,lo=t=>typeof t=="object",Gt=t=>typeof t=="function",Zn=t=>typeof t=="boolean";function nd(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Ye=t=>t.copy_||t.base_;var co=t=>t.modified_?t.copy_:t.base_;function ro(t,e){if(_i(t))return new Map(t);if(Ti(t))return new Set(t);if(Ai(t))return Array[Ei].slice.call(t);let r=xa(t);if(e===!0||e==="class_only"&&!r){let i=ve.getOwnPropertyDescriptors(t);delete i[ie];let n=Reflect.ownKeys(i);for(let o=0;o<n.length;o++){let s=n[o],a=i[s];a[fi]===!1&&(a[fi]=!0,a[eo]=!0),(a.get||a.set)&&(i[s]={[eo]:!0,[fi]:!0,[gi]:a[gi],[Ar]:t[s]})}return ve.create(qt(t),i)}else{let i=qt(t);if(i!==null&&r)return{...t};let n=ve.create(i);return ve.assign(n,t)}}function uo(t,e=!1){return Ci(t)||Fe(t)||!be(t)||(Cr(t)>1&&ve.defineProperties(t,{set:pi,add:pi,clear:pi,delete:pi}),ve.freeze(t),e&&Si(t,(r,i)=>{uo(i,!0)},!1)),t}function od(){Ie(2)}var pi={[Ar]:od};function Ci(t){return t===null||!lo(t)?!0:ve.isFrozen(t)}var vi="MapSet",io="Patches",fa="ArrayMethods",Ea={};function Et(t){let e=Ea[t];return e||Ie(0,t),e}var ha=t=>!!Ea[t];var _r,Sa=()=>_r,sd=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ha(vi)?Et(vi):void 0,arrayMethodsPlugin_:ha(fa)?Et(fa):void 0});function ma(t,e){e&&(t.patchPlugin_=Et(io),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function no(t){oo(t),t.drafts_.forEach(ad),t.drafts_=null}function oo(t){t===_r&&(_r=t.parent_)}var ga=t=>_r=sd(_r,t);function ad(t){let e=t[ie];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function ya(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ie].modified_&&(no(e),Ie(4)),be(t)&&(t=va(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(r[ie].base_,t,e)}else t=va(e,r);return ld(e,t,!0),no(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==ba?t:void 0}function va(t,e){if(Ci(e))return e;let r=e[ie];if(!r)return bi(e,t.handledSet_,t);if(!wi(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);Ta(r,t)}return r.copy_}function ld(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&uo(e,r)}function Aa(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var wi=(t,e)=>t.scope_===e,cd=[];function _a(t,e,r,i){let n=Ye(t),o=t.type_;if(i!==void 0&&to(n,i,o)===e){yi(n,i,r,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Si(n,(l,c)=>{if(Fe(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let s=t.draftLocations_.get(e)??cd;for(let a of s)yi(n,a,r,o)}function ud(t,e,r){t.callbacks_.push(function(n){let o=e;if(!o||!wi(o,n))return;n.mapSetPlugin_?.fixSetContents(o);let s=co(o);_a(t,o.draft_??o,s,r),Ta(o,n)})}function Ta(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let n=i.getPath(t);n&&i.generatePatches_(t,n,e)}Aa(t)}}function dd(t,e,r){let{scope_:i}=t;if(Fe(r)){let n=r[ie];wi(n,i)&&n.callbacks_.push(function(){hi(t);let s=co(n);_a(t,r,s,e)})}else be(r)&&t.callbacks_.push(function(){let o=Ye(t);t.type_===3?o.has(r)&&bi(r,i.handledSet_,i):to(o,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&bi(to(t.copy_,e,t.type_),i.handledSet_,i)})}function bi(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Fe(t)||e.has(t)||!be(t)||Ci(t)||(e.add(t),Si(t,(i,n)=>{if(Fe(n)){let o=n[ie];if(wi(o,r)){let s=co(o);yi(t,i,s,t.type_),Aa(o)}}else be(n)&&bi(n,e,r)})),t}function pd(t,e){let r=Ai(t),i={type_:r?1:0,scope_:e?e.scope_:Sa(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=i,o=xi;r&&(n=[i],o=Tr);let{revoke:s,proxy:a}=Proxy.revocable(n,o);return i.draft_=a,i.revoke_=s,[a,i]}var xi={get(t,e){if(e===ie)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let n=Ye(t);if(!Qn(n,e,t.type_))return hd(t,n,e);let o=n[e];if(t.finalized_||!be(o)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&nd(e))return o;if(o===Jn(t.base_,e)||fd(t,e,o)){hi(t);let s=t.type_===1?+e:e,a=ao(t.scope_,o,t,s);return t.copy_[s]=a}return o},has(t,e){return e in Ye(t)},ownKeys(t){return Reflect.ownKeys(Ye(t))},set(t,e,r){let i=Ca(Ye(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let n=Jn(Ye(t),e),o=n?.[ie];if(o&&o.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(id(r,n)&&(r!==void 0||Qn(t.base_,e,t.type_)))return!0;hi(t),so(t)}return t.copy_[e]===r&&(r!==void 0||Qn(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),dd(t,e,r)),!0},deleteProperty(t,e){return hi(t),Jn(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),so(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Ye(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[fi]:!0,[eo]:t.type_!==1||e!=="length",[gi]:i[gi],[Ar]:r[e]}},defineProperty(){Ie(11)},getPrototypeOf(t){return qt(t.base_)},setPrototypeOf(){Ie(12)}},Tr={};for(let t in xi){let e=xi[t];Tr[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Tr.deleteProperty=function(t,e){return Tr.set.call(this,t,e,void 0)};Tr.set=function(t,e,r){return xi.set.call(this,t[0],e,r,t[0])};function Jn(t,e){let r=t[ie];return(r?Ye(r):t)[e]}function fd(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!be(r)||r[ie]?!1:t.baseRefs_.has(r)}function hd(t,e,r){let i=Ca(e,r);return i?Ar in i?i[Ar]:i.get?.call(t.draft_):void 0}function Ca(t,e){if(!(e in t))return;let r=qt(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=qt(r)}}function so(t){t.modified_||(t.modified_=!0,t.parent_&&so(t.parent_))}function hi(t){t.copy_||(t.assigned_=new Map,t.copy_=ro(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var md=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(Gt(e)&&!Gt(r)){let o=r;r=e;let s=this;return function(l=o,...c){return s.produce(l,u=>r.call(this,u,...c))}}Gt(r)||Ie(6),i!==void 0&&!Gt(i)&&Ie(7);let n;if(be(e)){let o=ga(this),s=ao(o,e,void 0),a=!0;try{n=r(s),a=!1}finally{a?no(o):oo(o)}return ma(o,i),ya(n,o)}else if(!e||!lo(e)){if(n=r(e),n===void 0&&(n=e),n===ba&&(n=void 0),this.autoFreeze_&&uo(n,!0),i){let o=[],s=[];Et(io).generateReplacementPatches_(e,n,{patches_:o,inversePatches_:s}),i(o,s)}return n}else Ie(1,e)},this.produceWithPatches=(e,r)=>{if(Gt(e))return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let i,n;return[this.produce(e,r,(s,a)=>{i=s,n=a}),i,n]},Zn(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Zn(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Zn(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){be(t)||Ie(8),Fe(t)&&(t=wa(t));let e=ga(this),r=ao(e,t,void 0);return r[ie].isManual_=!0,oo(e),r}finishDraft(t,e){let r=t&&t[ie];(!r||!r.isManual_)&&Ie(9);let{scope_:i}=r;return ma(i,e),ya(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let n=e[r];if(n.path.length===0&&n.op==="replace"){t=n.value;break}}r>-1&&(e=e.slice(r+1));let i=Et(io).applyPatches_;return Fe(t)?i(t,e):this.produce(t,n=>i(n,e))}};function ao(t,e,r,i){let[n,o]=_i(e)?Et(vi).proxyMap_(e,r):Ti(e)?Et(vi).proxySet_(e,r):pd(e,r);return(r?.scope_??Sa()).drafts_.push(n),o.callbacks_=r?.callbacks_??[],o.key_=i,r&&i!==void 0?ud(r,o,i):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),n}function wa(t){return Fe(t)||Ie(10,t),Ra(t)}function Ra(t){if(!be(t)||Ci(t))return t;let e=t[ie],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=ro(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=ro(t,!0);return Si(r,(n,o)=>{yi(r,n,Ra(o))},i),e&&(e.finalized_=!1),r}var gd=globalThis.Iterator,Uf=typeof gd?.from=="function";var yd=new md,po=yd.produce;function Oa(t){return({dispatch:r,getState:i})=>n=>o=>typeof o=="function"?o(r,i,t):n(o)}var Pa=Oa(),La=Oa;var vd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Sr:Sr.apply(null,arguments)},zf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},bd=t=>t&&typeof t.match=="function";function at(t,e){function r(...i){if(e){let n=e(...i);if(!n)throw new Error(Xe(0));return{type:t,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>ua(i)&&i.type===t,r}var ka=class wr extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,wr.prototype)}static get[Symbol.species](){return wr}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new wr(...e[0].concat(this)):new wr(...e.concat(this))}};function Ma(t){return be(t)?po(t,()=>{}):t}function Ri(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function xd(t){return typeof t=="boolean"}var Ed=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},s=new ka;return r&&(xd(r)?s.push(Pa):s.push(La(r.extraArgument))),s},Sd="RTK_autoBatch";var Ia=t=>e=>{setTimeout(e,t)},Ad=(t,e)=>r=>{let i=!1,n=()=>{i||(i=!0,cancelAnimationFrame(o),clearTimeout(s),r())},o=t(n),s=setTimeout(n,e)},_d=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),n=!0,o=!1,s=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ad(window.requestAnimationFrame,100):Ia(10):t.type==="callback"?t.queueNotification:Ia(t.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let d=()=>n&&u(),p=i.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[Sd],o=!n,o&&(s||(s=!0,l(c))),i.dispatch(u)}finally{n=!0}}})},Td=t=>function(r){let{autoBatch:i=!0}=r??{},n=new ka(t);return i&&n.push(_d(typeof i=="object"?i:void 0)),n};function Ua(t){let e=Ed(),{reducer:r=void 0,middleware:i,devTools:n=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},l;if(typeof r=="function")l=r;else if(di(r))l=la(r);else throw new Error(Xe(1));let c;typeof i=="function"?c=i(e):c=e();let u=Sr;n&&(u=vd({trace:!1,...typeof n=="object"&&n}));let d=ca(...c),p=Td(d),h=typeof a=="function"?a(p):p(),v=u(...h);return Xn(l,s,v)}function $a(t){let e={},r=[],i,n={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(Xe(28));if(a in e)throw new Error(Xe(29));return e[a]=s,n},addAsyncThunk(o,s){return s.pending&&(e[o.pending.type]=s.pending),s.rejected&&(e[o.rejected.type]=s.rejected),s.fulfilled&&(e[o.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:o.settled,reducer:s.settled}),n},addMatcher(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase(o){return i=o,n}};return t(n),[e,r,i]}function Cd(t){return typeof t=="function"}function wd(t,e){let[r,i,n]=$a(e),o;if(Cd(t))o=()=>Ma(t());else{let a=Ma(t);o=()=>a}function s(a=o(),l){let c=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[n]),c.reduce((u,d)=>{if(d)if(Fe(u)){let h=d(u,l);return h===void 0?u:h}else{if(be(u))return po(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return s.getInitialState=o,s}var Rd=(t,e)=>bd(t)?t.match(e):t(e);function Od(...t){return e=>t.some(r=>Rd(r,e))}var Pd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ld=(t=21)=>{let e="",r=t;for(;r--;)e+=Pd[Math.random()*64|0];return e},Md=["name","message","stack","code"],fo=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Na=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Id=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Md)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},Da="External signal was aborted",Nd=(()=>{function t(e,r,i){let n=at(e+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=at(e+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=at(e+"/rejected",(l,c,u,d,p)=>({payload:d,error:(i&&i.serializeError||Id)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{let h=i?.idGenerator?i.idGenerator(l):Ld(),v=new AbortController,A,y;function _(x){y=x,v.abort()}c&&(c.aborted?_(Da):c.addEventListener("abort",()=>_(Da),{once:!0}));let P=(async function(){let x;try{let O=i?.condition?.(l,{getState:d,extra:p});if(kd(O)&&(O=await O),O===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let V=new Promise((D,j)=>{A=()=>{j({name:"AbortError",message:y||"Aborted"})},v.signal.addEventListener("abort",A,{once:!0})});u(o(h,l,i?.getPendingMeta?.({requestId:h,arg:l},{getState:d,extra:p}))),x=await Promise.race([V,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:h,signal:v.signal,abort:_,rejectWithValue:((D,j)=>new fo(D,j)),fulfillWithValue:((D,j)=>new Na(D,j))})).then(D=>{if(D instanceof fo)throw D;return D instanceof Na?n(D.payload,h,l,D.meta):n(D,h,l)})])}catch(O){x=O instanceof fo?s(null,h,l,O.payload,O.meta):s(O,h,l)}finally{A&&v.signal.removeEventListener("abort",A)}return i&&!i.dispatchConditionRejection&&s.match(x)&&x.meta.condition||u(x),x})();return Object.assign(P,{abort:_,requestId:h,arg:l,unwrap(){return P.then(Dd)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:n,settled:Od(s,n),typePrefix:e})}return t.withTypes=()=>t,t})();function Dd(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function kd(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ba=Symbol.for("rtk-slice-createasyncthunk"),Wf={[Ba]:Nd};function Ud(t,e){return`${t}/${e}`}function $d({creators:t}={}){let e=t?.asyncThunk?.[Ba];return function(i){let{name:n,reducerPath:o=n}=i;if(!n)throw new Error(Xe(11));typeof process<"u";let s=(typeof i.reducers=="function"?i.reducers(Hd()):i.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(x,C){let O=typeof x=="string"?x:x.type;if(!O)throw new Error(Xe(12));if(O in l.sliceCaseReducersByType)throw new Error(Xe(13));return l.sliceCaseReducersByType[O]=C,c},addMatcher(x,C){return l.sliceMatchers.push({matcher:x,reducer:C}),c},exposeAction(x,C){return l.actionCreators[x]=C,c},exposeCaseReducer(x,C){return l.sliceCaseReducersByName[x]=C,c}};a.forEach(x=>{let C=s[x],O={reducerName:x,type:Ud(n,x),createNotation:typeof i.reducers=="function"};Vd(C)?zd(O,C,c,e):Fd(O,C,c)});function u(){let[x={},C=[],O=void 0]=typeof i.extraReducers=="function"?$a(i.extraReducers):[i.extraReducers],V={...x,...l.sliceCaseReducersByType};return wd(i.initialState,D=>{for(let j in V)D.addCase(j,V[j]);for(let j of l.sliceMatchers)D.addMatcher(j.matcher,j.reducer);for(let j of C)D.addMatcher(j.matcher,j.reducer);O&&D.addDefaultCase(O)})}let d=x=>x,p=new Map,h=new WeakMap,v;function A(x,C){return v||(v=u()),v(x,C)}function y(){return v||(v=u()),v.getInitialState()}function _(x,C=!1){function O(D){let j=D[x];return typeof j>"u"&&C&&(j=Ri(h,O,y)),j}function V(D=d){let j=Ri(p,C,()=>new WeakMap);return Ri(j,D,()=>{let sr={};for(let[Ae,pt]of Object.entries(i.selectors??{}))sr[Ae]=Bd(pt,D,()=>Ri(h,D,y),C);return sr})}return{reducerPath:x,getSelectors:V,get selectors(){return V(O)},selectSlice:O}}let P={name:n,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:y,..._(o),injectInto(x,{reducerPath:C,...O}={}){let V=C??o;return x.inject({reducerPath:V,reducer:A},O),{...P,..._(V,!0)}}};return P}}function Bd(t,e,r,i){function n(o,...s){let a=e(o);return typeof a>"u"&&i&&(a=r()),t(a,...s)}return n.unwrapped=t,n}var Ha=$d();function Hd(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function Fd({type:t,reducerName:e,createNotation:r},i,n){let o,s;if("reducer"in i){if(r&&!jd(i))throw new Error(Xe(17));o=i.reducer,s=i.prepare}else o=i;n.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,s?at(t,s):at(t))}function Vd(t){return t._reducerDefinitionType==="asyncThunk"}function jd(t){return t._reducerDefinitionType==="reducerWithPrepare"}function zd({type:t,reducerName:e},r,i,n){if(!n)throw new Error(Xe(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=r,d=n(t,o,u);i.exposeAction(e,d),s&&i.addCase(d.fulfilled,s),a&&i.addCase(d.pending,a),l&&i.addCase(d.rejected,l),c&&i.addMatcher(d.settled,c),i.exposeCaseReducer(e,{fulfilled:s||Oi,pending:a||Oi,rejected:l||Oi,settled:c||Oi})}function Oi(){}var Fa="listener",Va="completed",ja="cancelled",Gf=`task-${ja}`,qf=`task-${Va}`,Yf=`${Fa}-${ja}`,Xf=`${Fa}-${Va}`;var{assign:za}=Object;var ho="listenerMiddleware";var Kd=za(at(`${ho}/add`),{withTypes:()=>Kd}),Qf=at(`${ho}/removeAll`),Wd=za(at(`${ho}/remove`),{withTypes:()=>Wd});function Xe(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Gd=ni(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),Pi=class extends Gd(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ka=class t extends Pi{static get(e){var r;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[i];if(ci(o))return o;if(n==null)return;let s=Ha({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=Ua({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=br(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new oi,this.injectInto=(o,s)=>this.reduxSlice.injectInto(o,s),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(n));return this.reduxStore.dispatch(d),d}:u=>{let d=l,p=this.getState()[d];zt(p,u)||this.setState({[d]:n(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}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(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Li=class{static format(e,r,i,n,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(e,r,i,n,!!o)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Mi=f(E()),qd="ft-app-info",Qe=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Qe.eventName="authentication-change";var Rr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Rr.eventName="ui-locale-changed";var Yd={session:(t,e)=>{(0,Mi.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>b.dispatchEvent(new Qe(e.payload)),0))}},b=Mi.FtReduxStore.get({name:qd,reducers:Yd,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Wa=f(E()),Ii=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Ga=(0,Wa.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(b)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>Li.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ii([(0,mo.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Ii([(0,mo.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Ii([qn({store:b.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Ii([qn({store:b.name})],e.prototype,"uiLocale",void 0),e});var qa;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(qa||(qa={}));var Ya;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Ya||(Ya={}));var Xa;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Xa||(Xa={}));var Qa;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Qa||(Qa={}));var Za;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Za||(Za={}));var Ja;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Ja||(Ja={}));var Ni;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Ni||(Ni={}));var el;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(el||(el={}));var tl;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(tl||(tl={}));var rl;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(rl||(rl={}));var il;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(il||(il={}));var nl;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(nl||(nl={}));var ol;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(ol||(ol={}));var sl;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(sl||(sl={}));var al;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(al||(al={}));var ll;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(ll||(ll={}));var cl;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(cl||(cl={}));var ul;(function(t){t.ASC="ASC",t.DESC="DESC"})(ul||(ul={}));var dl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(dl||(dl={}));var pl;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(pl||(pl={}));var fl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(fl||(fl={}));var Di;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Di||(Di={}));var hl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(hl||(hl={}));var ml;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ml||(ml={}));var gl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(gl||(gl={}));var yl;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(yl||(yl={}));var vl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(vl||(vl={}));var N;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(N||(N={}));var we;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(we||(we={}));var bl;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(bl||(bl={}));var xl;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(xl||(xl={}));var El;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(El||(El={}));var Sl;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Sl||(Sl={}));var Al;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Al||(Al={}));var _l;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(_l||(_l={}));var Tl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Tl||(Tl={}));var Cl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Cl||(Cl={}));var wl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(wl||(wl={}));var Rl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Rl||(Rl={}));var Ol;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(Ol||(Ol={}));var Pl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Pl||(Pl={}));var Xd={[N.PERSONAL_BOOK_SHARE_USER]:[N.PERSONAL_BOOK_USER],[N.HTML_EXPORT_USER]:[N.PERSONAL_BOOK_USER],[N.PDF_EXPORT_USER]:[N.PERSONAL_BOOK_USER],[N.KHUB_ADMIN]:[N.CONTENT_PUBLISHER],[N.ADMIN]:[N.KHUB_ADMIN,N.USERS_ADMIN,N.PORTAL_ADMIN,N.BEHAVIOR_DATA_USER],[N.GENERATIVE_AI_EXPORT_USER]:[N.GENERATIVE_AI_USER]};function Ll(t,e){return t===e||(Xd[t]??[]).some(r=>Ll(r,e))}function Ze(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(i=>Ll(i,e))}var Hi=f(E());var go=f(E());var St=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=b.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=b.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var Yt=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:St.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):St.await()}};var ne=class extends Yt{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new go.CacheRegistry,this.cache=e?n.commonCache:new go.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var ki=class extends ne{async listMySearches(){let{session:e}=b.getState();return Ze(e,N.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Ui=class extends ne{async listMyBookmarks(){let e=b.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var $i=class extends ne{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=b.getState().session;return!!e?.sessionAuthenticated}};var Bi=class extends ne{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 e=b.getState().session;return!!e?.sessionAuthenticated}};var Qd="ft-user-assets",Zd={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(we).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:n}=e.payload;vo(t,r,[...yo(t,r),n]),Ml(t,r,1,i),Il(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;vo(t,r,yo(t,r).map(n=>n.id===i.id?i:n)),Il(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;vo(t,r,yo(t,r).filter(o=>o.id!==n)),Ml(t,r,-1,i)}},Nl={[we.SEARCHES]:"savedSearches",[we.BOOKMARKS]:"bookmarks",[we.BOOKS]:void 0,[we.COLLECTIONS]:void 0},yo=(t,e)=>{var r;let i=Nl[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},vo=(t,e,r)=>{let i=Nl[e];i&&(t[i]=r)},Ml=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===we.BOOKMARKS&&i)){let o=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Il=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},le=Hi.FtReduxStore.get({name:Qd,reducers:Zd,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(we).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),bo=class{constructor(e=new $i,r=new Bi){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=b.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ui,this.savedSearchesService=new ki,b.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=b.getState();(0,Hi.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),le.actions.clearAssetCount(),le.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),le.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),le.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();le.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();le.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&le.getState().assetCounts.allAsset[e]!==r.count&&le.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&le.getState().assetCounts.bookmarkByMap[e]!==r.count&&le.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(le.getState().assetCounts.bookmarkByMap).length!==0;e===we.BOOKMARKS&&r&&le.actions.clearBookmarkCountByMap(),le.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;le.actions.bookmarks(r)}}},xo=new bo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=xo);var Eo=class{addCommand(e,r=!1){b.commands.add(e,r)}consumeCommand(e){return b.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Eo;var Re=f(E());var Dl,Xt=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Jd=Symbol("clearAfterUnitTest"),Fi=class extends(0,Re.withEventBus)(ne){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Dl]=()=>{this.defaultMessages={},this.cache=new Re.CacheRegistry,this.listeners={}},this.currentUiLocale=b.getState().uiLocale,b.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=b.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,Re.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new Re.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Re.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Xt({loadedContexts:e})),this.dispatchEvent(new Xt({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Xt({loadedContexts:[e]})),this.dispatchEvent(new Xt({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,Re.delay)(0).then(()=>i()).catch(()=>null)))}};Dl=Jd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Fi{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Fi{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Qt=window.FluidTopicsI18nService,Vi=window.FluidTopicsCustomI18nService;var kl=f(E()),So=class{highlightHtml(e,r,i){(0,kl.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new So;var Ul=f(E());var Ao=class{isDate(e){var r,i,n,o;return(o=(n=((i=(r=b.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(e,r){var i,n,o,s;if(e==null)return"";try{return Ul.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:b.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Ao;var $l=f(E());var Or=class{static get(e,r){var i,n,o,s;let a=b.getState(),{lang:l,region:c}=(o=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new $l.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var ji=class extends ne{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([i,n])=>Array.isArray(n)?[i,n.map(o=>typeof o=="object"&&o!=null&&!Array.isArray(o)?this.sortEventArrays(o):o).sort((o,s)=>typeof o=="object"&&o!==null&&"key"in o?o.key.localeCompare(s.key):typeof o=="string"&&typeof s=="string"?o.localeCompare(s):String(o).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[i,this.sortEventArrays(n)]:[i,n]);return Object.fromEntries(r)}sendEvents(e,r){let i="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>i).catch(n=>(console.info(r),console.debug(n),i)),1e3)}};var _o=class{urlToSearchRequest(e){return Or.get().parse(e)}searchRequestToUrl(e){return Or.get().serialize(e)}};window.FluidTopicsUrlService=new _o;var Je=f(E());var At=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};At.eventName="change";var To=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Bl=new To;var zi=class t extends Je.WithEventBus{static build(){return new t(window.history,Bl,()=>window.location,!1)}constructor(e,r,i,n){var o,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Je.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new At(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.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(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(At.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(At.eventName,e)}currentItem(){return(0,Je.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Je.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Je.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Je.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=zi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var Hl=f(L());var Fl=Hl.css`
158
- `;var zl=f(L()),ce=f(G()),Ct=f(E());var _t=f(E());function Vl(t,e){let{authenticationRequired:r,session:i}=b.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var Ki=class extends Yt{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Co=class t extends _t.FtStateManager{static build(e){return new t(b,e)}constructor(e,r){super(),this.store=e,this.cache=new _t.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Ki,this.cleanSessionDebouncer=new _t.Debouncer,this.reloadDebouncer=new _t.Debouncer(500),this.apiProvider=r??(()=>St.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(Qe.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=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(e)}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 e;let r=await this.cache.get("availableContentLocales",()=>Vl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Rr(i)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setNoCustomCode(e){this.store.actions.noCustomCode(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},jl=Co.build();var Tt=class extends Event{constructor(e,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var Pr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:o}of i){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Tt(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],i=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(r);o===void 0&&n.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var X=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},U=class extends Ct.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.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=jl,this.contextRoot=new Pr}render(){return zl.html`
157
+ `;var _s=["top","right","bottom","left"],As=["start","end"],Hn=_s.reduce((t,e)=>t.concat(e,e+"-"+As[0],e+"-"+As[1]),[]),mr=Math.min,it=Math.max,gr=Math.round;var Be=t=>({x:t,y:t}),Lu={left:"right",right:"left",bottom:"top",top:"bottom"};function Ts(t,e,r){return it(t,mr(e,r))}function Qr(t,e){return typeof t=="function"?t(e):t}function yr(t){return t.split("-")[0]}function nt(t){return t.split("-")[1]}function Vn(t){return t==="x"?"y":"x"}function jn(t){return t==="y"?"height":"width"}function Zr(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function zn(t){return Vn(Zr(t))}function Cs(t,e,r){r===void 0&&(r=!1);let i=nt(t),n=zn(t),o=jn(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Fn(s)),[s,Fn(s)]}function ws(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Fn(t){let e=yr(t);return Lu[e]+t.slice(e.length)}function Pu(t){var e,r,i,n;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(n=t.left)!=null?n:0}}function Rs(t){return typeof t!="number"?Pu(t):{top:t,right:t,bottom:t,left:t}}function gt(t){let{x:e,y:r,width:i,height:n}=t;return{width:i,height:n,top:r,left:e,right:e+i,bottom:r+n,x:e,y:r}}function Os(t,e,r){let{reference:i,floating:n}=t,o=Zr(e),s=zn(e),a=jn(s),l=yr(e),c=o==="y",u=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:u,y:i.y-n.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:d};break;case"left":h={x:i.x-n.width,y:d};break;default:h={x:i.x,y:i.y}}let v=nt(e);return v&&(h[s]+=p*(v==="end"?1:-1)*(r&&c?-1:1)),h}async function Ls(t,e){var r;e===void 0&&(e={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Qr(e,t),v=Rs(h),y=a[p?d==="floating"?"reference":"floating":d],_=gt(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(y)))==null||r?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),L=d==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(x))&&await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1},O=gt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:L,offsetParent:x,strategy:l}):L);return{top:(_.top-O.top+v.top)/C.y,bottom:(O.bottom-_.bottom+v.bottom)/C.y,left:(_.left-O.left+v.left)/C.x,right:(O.right-_.right+v.right)/C.x}}var Mu=50,Ps=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Ls},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:d}=Os(c,i,l),p=i,h=0,v={};for(let A=0;A<o.length;A++){let y=o[A];if(!y)continue;let{name:_,fn:L}=y,{x,y:C,data:O,reset:V}=await L({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:v,rects:c,platform:a,elements:{reference:t,floating:e}});u=x??u,d=C??d,v[_]={...v[_],...O},V&&h<Mu&&(h++,typeof V=="object"&&(V.placement&&(p=V.placement),V.rects&&(c=V.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:n}):V.rects),{x:u,y:d}=Os(c,p,l)),A=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:v}};function Iu(t,e,r){return(t?[...r.filter(n=>nt(n)===t),...r.filter(n=>nt(n)!==t)]:r.filter(n=>yr(n)===n)).filter(n=>t?nt(n)===t||(e?ws(n)!==n:!1):!0)}var Ms=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:p=Hn,autoAlignment:h=!0,...v}=Qr(t,e),A=d!==void 0||p===Hn?Iu(d||null,h,p):p,y=((r=s.autoPlacement)==null?void 0:r.index)||0,_=A[y];if(_==null)return{};if(a!==_)return{reset:{placement:A[0]}};let L=await l.detectOverflow(e,v),x=Cs(_,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),C=[L[yr(_)],L[x[0]],L[x[1]]],O=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:_,overflows:C}],V=A[y+1];if(V)return{data:{index:y+1,overflows:O},reset:{placement:V}};let D=O.map(Ae=>{let pt=nt(Ae.placement);return[Ae.placement,pt&&u?Ae.overflows.slice(0,2).reduce((mu,gu)=>mu+gu,0):Ae.overflows[0],Ae.overflows]}).sort((Ae,pt)=>Ae[1]-pt[1]),cr=((n=D.filter(Ae=>Ae[2].slice(0,nt(Ae[0])?2:3).every(pt=>pt<=0))[0])==null?void 0:n[0])||D[0][0];return cr!==a?{data:{index:y+1,overflows:O},reset:{placement:cr}}:{}}}};var Is=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:n,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:L=>{let{x,y:C}=L;return{x,y:C}}},...c}=Qr(t,e),u={x:r,y:i},d=await o.detectOverflow(e,c),p=Zr(n),h=Vn(p),v=u[h],A=u[p],y=(L,x)=>Ts(x+d[L==="y"?"top":"left"],x,x-d[L==="y"?"bottom":"right"]);s&&(v=y(h,v)),a&&(A=y(p,A));let _=l.fn({...e,[h]:v,[p]:A});return{..._,data:{x:_.x-r,y:_.y-i,enabled:{[h]:s,[p]:a}}}}}};function ei(){return typeof window<"u"}function vt(t){return Ds(t)?(t.nodeName||"").toLowerCase():"#document"}function pe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function qe(t){var e;return(e=(Ds(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ds(t){return ei()?t instanceof Node||t instanceof pe(t).Node:!1}function Me(t){return ei()?t instanceof Element||t instanceof pe(t).Element:!1}function Ye(t){return ei()?t instanceof HTMLElement||t instanceof pe(t).HTMLElement:!1}function Ns(t){return!ei()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof pe(t).ShadowRoot}function vr(t){let{overflow:e,overflowX:r,overflowY:i,display:n}=Ie(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&n!=="inline"&&n!=="contents"}function ks(t){return/^(table|td|th)$/.test(vt(t))}function br(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Nu=/transform|translate|scale|rotate|perspective|filter/,Du=/paint|layout|strict|content/,yt=t=>!!t&&t!=="none",Kn;function Vt(t){let e=Me(t)?Ie(t):t;return yt(e.transform)||yt(e.translate)||yt(e.scale)||yt(e.rotate)||yt(e.perspective)||!ti()&&(yt(e.backdropFilter)||yt(e.filter))||Nu.test(e.willChange||"")||Du.test(e.contain||"")}function Us(t){let e=ot(t);for(;Ye(e)&&!jt(e);){if(Vt(e))return e;if(br(e))return null;e=ot(e)}return null}function ti(){return Kn==null&&(Kn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Kn}function jt(t){return/^(html|body|#document)$/.test(vt(t))}function Ie(t){return pe(t).getComputedStyle(t)}function xr(t){return Me(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if(vt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Ns(t)&&t.host||qe(t);return Ns(e)?e.host:e}function $s(t){let e=ot(t);return jt(e)?(t.ownerDocument||t).body:Ye(e)&&vr(e)?e:$s(e)}function Jr(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=$s(t),o=n===((i=t.ownerDocument)==null?void 0:i.body),s=pe(n);if(o){let a=ri(s);return e.concat(s,s.visualViewport||[],vr(n)?n:[],a&&r?Jr(a):[])}else return e.concat(n,Jr(n,[],r))}function ri(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Hs(t){let e=Ie(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=Ye(t),o=n?t.offsetWidth:r,s=n?t.offsetHeight:i,a=gr(r)!==o||gr(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Vs(t){return Me(t)?t:t.contextElement}function zt(t){let e=Vs(t);if(!Ye(e))return Be(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:o}=Hs(e),s=(o?gr(r.width):r.width)/i,a=(o?gr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var ku=Be(0);function js(t){let e=pe(t);return!ti()||!e.visualViewport?ku:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Uu(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===pe(t)}function Er(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),o=Vs(t),s=Be(1);e&&(i?Me(i)&&(s=zt(i)):s=zt(t));let a=Uu(o,r,i)?js(o):Be(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,u=n.width/s.x,d=n.height/s.y;if(o&&i){let p=pe(o),h=Me(i)?pe(i):i,v=p,A=ri(v);for(;A&&h!==v;){let y=zt(A),_=A.getBoundingClientRect(),L=Ie(A),x=_.left+(A.clientLeft+parseFloat(L.paddingLeft))*y.x,C=_.top+(A.clientTop+parseFloat(L.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=x,c+=C,v=pe(A),A=ri(v)}}return gt({width:u,height:d,x:l,y:c})}function ii(t,e){let r=xr(t).scrollLeft;return e?e.left+r:Er(qe(t)).left+r}function zs(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-ii(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function $u(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,o=n==="fixed",s=qe(i),a=e?br(e.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Be(1),u=Be(0),d=Ye(i);if((d||!o)&&((vt(i)!=="body"||vr(s))&&(l=xr(i)),d)){let h=Er(i);c=zt(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}let p=s&&!d&&!o?zs(s,l):Be(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function Bu(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Fu(t){let e=xr(t),r=t.ownerDocument.body,i=it(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=it(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-e.scrollLeft+ii(t),s=-e.scrollTop;return Ie(r).direction==="rtl"&&(o+=it(t.clientWidth,r.clientWidth)-i),{width:i,height:n,x:o,y:s}}var Hu=25;function Vu(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=pe(t),o=qe(t),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let p=!ti()||e==="fixed";i?p||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,p&&(c=s.offsetLeft,u=s.offsetTop))}if(ii(o)<=0){let p=o.ownerDocument,h=p.body,v=getComputedStyle(h),A=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,y=Math.abs(o.clientWidth-h.clientWidth-A),_=getComputedStyle(o).scrollbarGutter==="stable both-edges"?y/2:y;_<=Hu&&(a-=_)}return{width:a,height:l,x:c,y:u}}function ju(t,e){let r=Er(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,o=zt(t),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function Bs(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=Vu(t,r,e);else if(e==="document")i=Fu(qe(t));else if(Me(e))i=ju(e,r);else{let n=js(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return gt(i)}function zu(t,e){let r=e.get(t);if(r)return r;let i=Jr(t,[],!1).filter(a=>Me(a)&&vt(a)!=="body"),n=null,o=Ie(t).position==="fixed",s=o?ot(t):t;for(;Me(s)&&!jt(s);){let a=Ie(s),l=Vt(s),c=n?n.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(d=>d!==s):n=a,s=ot(s)}return e.set(t,i),i}function Ku(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,s=[...r==="clippingAncestors"?br(e)?[]:zu(e,this._c):[].concat(r),i],a=Bs(e,s[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let h=Bs(e,s[p],n);l=it(h.top,l),c=mr(h.right,c),u=mr(h.bottom,u),d=it(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Wu(t){let{width:e,height:r}=Hs(t);return{width:e,height:r}}function Gu(t,e,r){let i=Ye(e),n=qe(e),o=r==="fixed",s=Er(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Be(0);if((i||!o)&&((vt(e)!=="body"||vr(n))&&(a=xr(e)),i)){let p=Er(e,!0,o,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}!i&&n&&(l.x=ii(n));let c=n&&!i&&!o?zs(n,a):Be(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function Wn(t){return Ie(t).position==="static"}function Fs(t,e){if(!Ye(t)||Ie(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return qe(t)===r&&(r=r.ownerDocument.body),r}function Ks(t,e){let r=pe(t);if(br(t))return r;if(!Ye(t)){let n=ot(t);for(;n&&!jt(n);){if(Me(n)&&!Wn(n))return n;n=ot(n)}return r}let i=Fs(t,e);for(;i&&ks(i)&&Wn(i);)i=Fs(i,e);return i&&jt(i)&&Wn(i)&&!Vt(i)?r:i||Us(t)||r}var qu=async function(t){let e=this.getOffsetParent||Ks,r=this.getDimensions,i=await r(t.floating);return{reference:Gu(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Yu(t){return Ie(t).direction==="rtl"}var ni={convertOffsetParentRelativeRectToViewportRelativeRect:$u,getDocumentElement:qe,getClippingRect:Ku,getOffsetParent:Ks,getElementRects:qu,getClientRects:Bu,getDimensions:Wu,getScale:zt,isElement:Me,isRTL:Yu};var Ws=Ms,Gs=Is;var qs=(t,e,r)=>{let i=new Map,n=r??{},o={...ni,...n.platform,_c:i};return Ps(t,e,{...n,platform:o})};function Ys(t){return Xu(t)}function Gn(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Xu(t){for(let e=t;e;e=Gn(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Gn(t);e;e=Gn(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Vt(r)||e.tagName==="BODY"))return e}return null}async function oi(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},qs(t,e,{strategy:i.strategy,platform:{...ni,getOffsetParent:n=>ni.getOffsetParent(n,Ys)},middleware:[Gs({crossAxis:!0}),Ws({allowedPlacements:[i.placement]})]})}var er=f(E());var go=f(G());var Xs=f(G(),1);var qn=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Qs(t,e){return(0,Xs.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Sr(t);try{return JSON.parse(r)}catch{return Sr(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ar,...e??{}})}function Qu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Kt(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Kt(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(r=o.length,r!==n(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!Kt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Kt(t,e){try{return Qu(t,e)}catch{return!1}}function Ar(t,e){return!Kt(t,e)}function Sr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function si(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let n=e(i);return n[t]=!0,n}}var Zs=f(G(),1);var Yn=t=>{let e=t??{};return(r,i)=>{var n;let o={hasChanged:Ar,attribute:!1,...e};(0,Zs.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[i]),store:e.store})}};var ai=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var bt=f(G(),1);var li=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ea=f(P(),1);var ci=globalThis,Zu=ci.ShadowRoot&&(ci.ShadyCSS===void 0||ci.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Js=(t,e)=>{if(Zu)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),n=ci.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}};var ui=class extends ea.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return Js(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){qn(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function ta(t,e,...r){var i;let n=t.querySelector(e);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var Gt=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},oa,ra=Symbol("constructorPrototype"),ia=Symbol("constructorName"),sa=Symbol("exportpartsDebouncer"),na=Symbol("dynamicDependenciesLoaded"),Wt=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Wt.eventName="exportparts-updated";var Fe=class extends ui{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[oa]=new li(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[sa].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[ia]=this.constructor.name,this[ra]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ia]&&Object.setPrototypeOf(this,this[ra])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[na]||(r[na]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Wt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Wt.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Wt)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=ta(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,i,n,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],v=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(y=>y.split(":")[1]))!==null&&a!==void 0?a:[],A=[...h,...v].filter(l).map(y=>y.trim());for(let y of A)u.add(y)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(h=>`${p}:${h}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};oa=sa;Gt([(0,bt.property)()],Fe.prototype,"exportpartsPrefix",void 0);Gt([Qs([])],Fe.prototype,"exportpartsPrefixes",void 0);Gt([(0,bt.property)({reflect:!0})],Fe.prototype,"exportparts",void 0);Gt([(0,bt.property)()],Fe.prototype,"customStylesheet",void 0);Gt([(0,bt.property)()],Fe.prototype,"elementToFocus",void 0);Gt([(0,bt.state)()],Fe.prototype,"useAdoptedStyleSheets",void 0);function di(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var _r=Symbol("internalReduxEventsUnsubscribers"),st=Symbol("internalStoresUnsubscribers"),xt=Symbol("internalStores"),Ju=si(Symbol("withRedux"),function(t){var e,r,i;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[xt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[xt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[xt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[xt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[st].has(s.store):this[st].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[st].set(s,a.subscribe(()=>this.updateFromStores())),this[_r].set(s,[]),di(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[_r].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[st].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[st].has(s)&&this[st].get(s)(),this[st].delete(s),(a=this[_r].get(s))===null||a===void 0||a.forEach(l=>l()),this[_r].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=st,r=xt,i=_r,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),aa=class extends Ju(Fe){};function J(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var ed=typeof Symbol=="function"&&Symbol.observable||"@@observable",la=ed,Xn=()=>Math.random().toString(36).substring(7).split("").join("."),td={INIT:`@@redux/INIT${Xn()}`,REPLACE:`@@redux/REPLACE${Xn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Xn()}`},pi=td;function fi(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Qn(t,e,r){if(typeof t!="function")throw new Error(J(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(J(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(J(1));return r(Qn)(t,e)}let i=t,n=e,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((y,_)=>{s.set(_,y)}))}function u(){if(l)throw new Error(J(3));return n}function d(y){if(typeof y!="function")throw new Error(J(4));if(l)throw new Error(J(5));let _=!0;c();let L=a++;return s.set(L,y),function(){if(_){if(l)throw new Error(J(6));_=!1,c(),s.delete(L),o=null}}}function p(y){if(!fi(y))throw new Error(J(7));if(typeof y.type>"u")throw new Error(J(8));if(typeof y.type!="string")throw new Error(J(17));if(l)throw new Error(J(9));try{l=!0,n=i(n,y)}finally{l=!1}return(o=s).forEach(L=>{L()}),y}function h(y){if(typeof y!="function")throw new Error(J(10));i=y,p({type:pi.REPLACE})}function v(){let y=d;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(J(11));function L(){let C=_;C.next&&C.next(u())}return L(),{unsubscribe:y(L)}},[la](){return this}}}return p({type:pi.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:h,[la]:v}}function rd(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:pi.INIT})>"u")throw new Error(J(12));if(typeof r(void 0,{type:pi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(J(13))})}function ca(t){let e=Object.keys(t),r={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),n,o;try{rd(r)}catch(s){o=s}return function(a={},l){if(o)throw o;let c=!1,u={};for(let d=0;d<i.length;d++){let p=i[d],h=r[p],v=a[p],A=h(v,l);if(typeof A>"u"){let y=l&&l.type;throw new Error(J(14))}u[p]=A,c=c||A!==v}return c=c||i.length!==Object.keys(a).length,c?u:a}}function Tr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function ua(...t){return e=>(r,i)=>{let n=e(r,i),o=()=>{throw new Error(J(15))},s={getState:n.getState,dispatch:(l,...c)=>o(l,...c)},a=t.map(l=>l(s));return o=Tr(...a)(n.dispatch),{...n,dispatch:o}}}function da(t){return fi(t)&&"type"in t&&typeof t.type=="string"}var xa=Symbol.for("immer-nothing"),pa=Symbol.for("immer-draftable"),ie=Symbol.for("immer-state");function Ne(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var ve=Object,Yt=ve.getPrototypeOf,yi="constructor",Ai="prototype",to="configurable",vi="enumerable",mi="writable",Cr="value",He=t=>!!t&&!!t[ie];function be(t){return t?Ea(t)||Ti(t)||!!t[pa]||!!t[yi]?.[pa]||Ci(t)||wi(t):!1}var id=ve[Ai][yi].toString(),fa=new WeakMap;function Ea(t){if(!t||!co(t))return!1;let e=Yt(t);if(e===null||e===ve[Ai])return!0;let r=ve.hasOwnProperty.call(e,yi)&&e[yi];if(r===Object)return!0;if(!qt(r))return!1;let i=fa.get(r);return i===void 0&&(i=Function.toString.call(r),fa.set(r,i)),i===id}function _i(t,e,r=!0){Or(t)===0?(r?Reflect.ownKeys(t):ve.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((i,n)=>e(n,i,t))}function Or(t){let e=t[ie];return e?e.type_:Ti(t)?1:Ci(t)?2:wi(t)?3:0}var Zn=(t,e,r=Or(t))=>r===2?t.has(e):ve[Ai].hasOwnProperty.call(t,e),ro=(t,e,r=Or(t))=>r===2?t.get(e):t[e],bi=(t,e,r,i=Or(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function nd(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Ti=Array.isArray,Ci=t=>t instanceof Map,wi=t=>t instanceof Set,co=t=>typeof t=="object",qt=t=>typeof t=="function",Jn=t=>typeof t=="boolean";function od(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Xe=t=>t.copy_||t.base_;var uo=t=>t.modified_?t.copy_:t.base_;function io(t,e){if(Ci(t))return new Map(t);if(wi(t))return new Set(t);if(Ti(t))return Array[Ai].slice.call(t);let r=Ea(t);if(e===!0||e==="class_only"&&!r){let i=ve.getOwnPropertyDescriptors(t);delete i[ie];let n=Reflect.ownKeys(i);for(let o=0;o<n.length;o++){let s=n[o],a=i[s];a[mi]===!1&&(a[mi]=!0,a[to]=!0),(a.get||a.set)&&(i[s]={[to]:!0,[mi]:!0,[vi]:a[vi],[Cr]:t[s]})}return ve.create(Yt(t),i)}else{let i=Yt(t);if(i!==null&&r)return{...t};let n=ve.create(i);return ve.assign(n,t)}}function po(t,e=!1){return Ri(t)||He(t)||!be(t)||(Or(t)>1&&ve.defineProperties(t,{set:hi,add:hi,clear:hi,delete:hi}),ve.freeze(t),e&&_i(t,(r,i)=>{po(i,!0)},!1)),t}function sd(){Ne(2)}var hi={[Cr]:sd};function Ri(t){return t===null||!co(t)?!0:ve.isFrozen(t)}var xi="MapSet",no="Patches",ha="ArrayMethods",Sa={};function Et(t){let e=Sa[t];return e||Ne(0,t),e}var ma=t=>!!Sa[t];var wr,Aa=()=>wr,ad=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ma(xi)?Et(xi):void 0,arrayMethodsPlugin_:ma(ha)?Et(ha):void 0});function ga(t,e){e&&(t.patchPlugin_=Et(no),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function oo(t){so(t),t.drafts_.forEach(ld),t.drafts_=null}function so(t){t===wr&&(wr=t.parent_)}var ya=t=>wr=ad(wr,t);function ld(t){let e=t[ie];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function va(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ie].modified_&&(oo(e),Ne(4)),be(t)&&(t=ba(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(r[ie].base_,t,e)}else t=ba(e,r);return cd(e,t,!0),oo(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==xa?t:void 0}function ba(t,e){if(Ri(e))return e;let r=e[ie];if(!r)return Ei(e,t.handledSet_,t);if(!Oi(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);Ca(r,t)}return r.copy_}function cd(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&po(e,r)}function _a(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Oi=(t,e)=>t.scope_===e,ud=[];function Ta(t,e,r,i){let n=Xe(t),o=t.type_;if(i!==void 0&&ro(n,i,o)===e){bi(n,i,r,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;_i(n,(l,c)=>{if(He(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let s=t.draftLocations_.get(e)??ud;for(let a of s)bi(n,a,r,o)}function dd(t,e,r){t.callbacks_.push(function(n){let o=e;if(!o||!Oi(o,n))return;n.mapSetPlugin_?.fixSetContents(o);let s=uo(o);Ta(t,o.draft_??o,s,r),Ca(o,n)})}function Ca(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let n=i.getPath(t);n&&i.generatePatches_(t,n,e)}_a(t)}}function pd(t,e,r){let{scope_:i}=t;if(He(r)){let n=r[ie];Oi(n,i)&&n.callbacks_.push(function(){gi(t);let s=uo(n);Ta(t,r,s,e)})}else be(r)&&t.callbacks_.push(function(){let o=Xe(t);t.type_===3?o.has(r)&&Ei(r,i.handledSet_,i):ro(o,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Ei(ro(t.copy_,e,t.type_),i.handledSet_,i)})}function Ei(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||He(t)||e.has(t)||!be(t)||Ri(t)||(e.add(t),_i(t,(i,n)=>{if(He(n)){let o=n[ie];if(Oi(o,r)){let s=uo(o);bi(t,i,s,t.type_),_a(o)}}else be(n)&&Ei(n,e,r)})),t}function fd(t,e){let r=Ti(t),i={type_:r?1:0,scope_:e?e.scope_:Aa(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=i,o=Si;r&&(n=[i],o=Rr);let{revoke:s,proxy:a}=Proxy.revocable(n,o);return i.draft_=a,i.revoke_=s,[a,i]}var Si={get(t,e){if(e===ie)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let n=Xe(t);if(!Zn(n,e,t.type_))return md(t,n,e);let o=n[e];if(t.finalized_||!be(o)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&od(e))return o;if(o===eo(t.base_,e)||hd(t,e,o)){gi(t);let s=t.type_===1?+e:e,a=lo(t.scope_,o,t,s);return t.copy_[s]=a}return o},has(t,e){return e in Xe(t)},ownKeys(t){return Reflect.ownKeys(Xe(t))},set(t,e,r){let i=wa(Xe(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let n=eo(Xe(t),e),o=n?.[ie];if(o&&o.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(nd(r,n)&&(r!==void 0||Zn(t.base_,e,t.type_)))return!0;gi(t),ao(t)}return t.copy_[e]===r&&(r!==void 0||Zn(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),pd(t,e,r)),!0},deleteProperty(t,e){return gi(t),eo(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),ao(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Xe(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[mi]:!0,[to]:t.type_!==1||e!=="length",[vi]:i[vi],[Cr]:r[e]}},defineProperty(){Ne(11)},getPrototypeOf(t){return Yt(t.base_)},setPrototypeOf(){Ne(12)}},Rr={};for(let t in Si){let e=Si[t];Rr[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Rr.deleteProperty=function(t,e){return Rr.set.call(this,t,e,void 0)};Rr.set=function(t,e,r){return Si.set.call(this,t[0],e,r,t[0])};function eo(t,e){let r=t[ie];return(r?Xe(r):t)[e]}function hd(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!be(r)||r[ie]?!1:t.baseRefs_.has(r)}function md(t,e,r){let i=wa(e,r);return i?Cr in i?i[Cr]:i.get?.call(t.draft_):void 0}function wa(t,e){if(!(e in t))return;let r=Yt(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Yt(r)}}function ao(t){t.modified_||(t.modified_=!0,t.parent_&&ao(t.parent_))}function gi(t){t.copy_||(t.assigned_=new Map,t.copy_=io(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var gd=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(qt(e)&&!qt(r)){let o=r;r=e;let s=this;return function(l=o,...c){return s.produce(l,u=>r.call(this,u,...c))}}qt(r)||Ne(6),i!==void 0&&!qt(i)&&Ne(7);let n;if(be(e)){let o=ya(this),s=lo(o,e,void 0),a=!0;try{n=r(s),a=!1}finally{a?oo(o):so(o)}return ga(o,i),va(n,o)}else if(!e||!co(e)){if(n=r(e),n===void 0&&(n=e),n===xa&&(n=void 0),this.autoFreeze_&&po(n,!0),i){let o=[],s=[];Et(no).generateReplacementPatches_(e,n,{patches_:o,inversePatches_:s}),i(o,s)}return n}else Ne(1,e)},this.produceWithPatches=(e,r)=>{if(qt(e))return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let i,n;return[this.produce(e,r,(s,a)=>{i=s,n=a}),i,n]},Jn(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Jn(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Jn(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){be(t)||Ne(8),He(t)&&(t=Ra(t));let e=ya(this),r=lo(e,t,void 0);return r[ie].isManual_=!0,so(e),r}finishDraft(t,e){let r=t&&t[ie];(!r||!r.isManual_)&&Ne(9);let{scope_:i}=r;return ga(i,e),va(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let n=e[r];if(n.path.length===0&&n.op==="replace"){t=n.value;break}}r>-1&&(e=e.slice(r+1));let i=Et(no).applyPatches_;return He(t)?i(t,e):this.produce(t,n=>i(n,e))}};function lo(t,e,r,i){let[n,o]=Ci(e)?Et(xi).proxyMap_(e,r):wi(e)?Et(xi).proxySet_(e,r):fd(e,r);return(r?.scope_??Aa()).drafts_.push(n),o.callbacks_=r?.callbacks_??[],o.key_=i,r&&i!==void 0?dd(r,o,i):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),n}function Ra(t){return He(t)||Ne(10,t),Oa(t)}function Oa(t){if(!be(t)||Ri(t))return t;let e=t[ie],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=io(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=io(t,!0);return _i(r,(n,o)=>{bi(r,n,Oa(o))},i),e&&(e.finalized_=!1),r}var yd=globalThis.Iterator,$f=typeof yd?.from=="function";var vd=new gd,fo=vd.produce;function La(t){return({dispatch:r,getState:i})=>n=>o=>typeof o=="function"?o(r,i,t):n(o)}var Pa=La(),Ma=La;var bd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tr:Tr.apply(null,arguments)},Kf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},xd=t=>t&&typeof t.match=="function";function at(t,e){function r(...i){if(e){let n=e(...i);if(!n)throw new Error(Qe(0));return{type:t,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>da(i)&&i.type===t,r}var Ua=class Lr extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Lr.prototype)}static get[Symbol.species](){return Lr}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Lr(...e[0].concat(this)):new Lr(...e.concat(this))}};function Ia(t){return be(t)?fo(t,()=>{}):t}function Li(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Ed(t){return typeof t=="boolean"}var Sd=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},s=new Ua;return r&&(Ed(r)?s.push(Pa):s.push(Ma(r.extraArgument))),s},Ad="RTK_autoBatch";var Na=t=>e=>{setTimeout(e,t)},_d=(t,e)=>r=>{let i=!1,n=()=>{i||(i=!0,cancelAnimationFrame(o),clearTimeout(s),r())},o=t(n),s=setTimeout(n,e)},Td=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),n=!0,o=!1,s=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?_d(window.requestAnimationFrame,100):Na(10):t.type==="callback"?t.queueNotification:Na(t.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let d=()=>n&&u(),p=i.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[Ad],o=!n,o&&(s||(s=!0,l(c))),i.dispatch(u)}finally{n=!0}}})},Cd=t=>function(r){let{autoBatch:i=!0}=r??{},n=new Ua(t);return i&&n.push(Td(typeof i=="object"?i:void 0)),n};function $a(t){let e=Sd(),{reducer:r=void 0,middleware:i,devTools:n=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},l;if(typeof r=="function")l=r;else if(fi(r))l=ca(r);else throw new Error(Qe(1));let c;typeof i=="function"?c=i(e):c=e();let u=Tr;n&&(u=bd({trace:!1,...typeof n=="object"&&n}));let d=ua(...c),p=Cd(d),h=typeof a=="function"?a(p):p(),v=u(...h);return Qn(l,s,v)}function Ba(t){let e={},r=[],i,n={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(Qe(28));if(a in e)throw new Error(Qe(29));return e[a]=s,n},addAsyncThunk(o,s){return s.pending&&(e[o.pending.type]=s.pending),s.rejected&&(e[o.rejected.type]=s.rejected),s.fulfilled&&(e[o.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:o.settled,reducer:s.settled}),n},addMatcher(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase(o){return i=o,n}};return t(n),[e,r,i]}function wd(t){return typeof t=="function"}function Rd(t,e){let[r,i,n]=Ba(e),o;if(wd(t))o=()=>Ia(t());else{let a=Ia(t);o=()=>a}function s(a=o(),l){let c=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[n]),c.reduce((u,d)=>{if(d)if(He(u)){let h=d(u,l);return h===void 0?u:h}else{if(be(u))return fo(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return s.getInitialState=o,s}var Od=(t,e)=>xd(t)?t.match(e):t(e);function Ld(...t){return e=>t.some(r=>Od(r,e))}var Pd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Md=(t=21)=>{let e="",r=t;for(;r--;)e+=Pd[Math.random()*64|0];return e},Id=["name","message","stack","code"],ho=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Da=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Nd=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Id)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},ka="External signal was aborted",Dd=(()=>{function t(e,r,i){let n=at(e+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=at(e+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=at(e+"/rejected",(l,c,u,d,p)=>({payload:d,error:(i&&i.serializeError||Nd)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{let h=i?.idGenerator?i.idGenerator(l):Md(),v=new AbortController,A,y;function _(x){y=x,v.abort()}c&&(c.aborted?_(ka):c.addEventListener("abort",()=>_(ka),{once:!0}));let L=(async function(){let x;try{let O=i?.condition?.(l,{getState:d,extra:p});if(Ud(O)&&(O=await O),O===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let V=new Promise((D,j)=>{A=()=>{j({name:"AbortError",message:y||"Aborted"})},v.signal.addEventListener("abort",A,{once:!0})});u(o(h,l,i?.getPendingMeta?.({requestId:h,arg:l},{getState:d,extra:p}))),x=await Promise.race([V,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:h,signal:v.signal,abort:_,rejectWithValue:((D,j)=>new ho(D,j)),fulfillWithValue:((D,j)=>new Da(D,j))})).then(D=>{if(D instanceof ho)throw D;return D instanceof Da?n(D.payload,h,l,D.meta):n(D,h,l)})])}catch(O){x=O instanceof ho?s(null,h,l,O.payload,O.meta):s(O,h,l)}finally{A&&v.signal.removeEventListener("abort",A)}return i&&!i.dispatchConditionRejection&&s.match(x)&&x.meta.condition||u(x),x})();return Object.assign(L,{abort:_,requestId:h,arg:l,unwrap(){return L.then(kd)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:n,settled:Ld(s,n),typePrefix:e})}return t.withTypes=()=>t,t})();function kd(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ud(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Fa=Symbol.for("rtk-slice-createasyncthunk"),Gf={[Fa]:Dd};function $d(t,e){return`${t}/${e}`}function Bd({creators:t}={}){let e=t?.asyncThunk?.[Fa];return function(i){let{name:n,reducerPath:o=n}=i;if(!n)throw new Error(Qe(11));typeof process<"u";let s=(typeof i.reducers=="function"?i.reducers(Hd()):i.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(x,C){let O=typeof x=="string"?x:x.type;if(!O)throw new Error(Qe(12));if(O in l.sliceCaseReducersByType)throw new Error(Qe(13));return l.sliceCaseReducersByType[O]=C,c},addMatcher(x,C){return l.sliceMatchers.push({matcher:x,reducer:C}),c},exposeAction(x,C){return l.actionCreators[x]=C,c},exposeCaseReducer(x,C){return l.sliceCaseReducersByName[x]=C,c}};a.forEach(x=>{let C=s[x],O={reducerName:x,type:$d(n,x),createNotation:typeof i.reducers=="function"};jd(C)?Kd(O,C,c,e):Vd(O,C,c)});function u(){let[x={},C=[],O=void 0]=typeof i.extraReducers=="function"?Ba(i.extraReducers):[i.extraReducers],V={...x,...l.sliceCaseReducersByType};return Rd(i.initialState,D=>{for(let j in V)D.addCase(j,V[j]);for(let j of l.sliceMatchers)D.addMatcher(j.matcher,j.reducer);for(let j of C)D.addMatcher(j.matcher,j.reducer);O&&D.addDefaultCase(O)})}let d=x=>x,p=new Map,h=new WeakMap,v;function A(x,C){return v||(v=u()),v(x,C)}function y(){return v||(v=u()),v.getInitialState()}function _(x,C=!1){function O(D){let j=D[x];return typeof j>"u"&&C&&(j=Li(h,O,y)),j}function V(D=d){let j=Li(p,C,()=>new WeakMap);return Li(j,D,()=>{let cr={};for(let[Ae,pt]of Object.entries(i.selectors??{}))cr[Ae]=Fd(pt,D,()=>Li(h,D,y),C);return cr})}return{reducerPath:x,getSelectors:V,get selectors(){return V(O)},selectSlice:O}}let L={name:n,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:y,..._(o),injectInto(x,{reducerPath:C,...O}={}){let V=C??o;return x.inject({reducerPath:V,reducer:A},O),{...L,..._(V,!0)}}};return L}}function Fd(t,e,r,i){function n(o,...s){let a=e(o);return typeof a>"u"&&i&&(a=r()),t(a,...s)}return n.unwrapped=t,n}var Ha=Bd();function Hd(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function Vd({type:t,reducerName:e,createNotation:r},i,n){let o,s;if("reducer"in i){if(r&&!zd(i))throw new Error(Qe(17));o=i.reducer,s=i.prepare}else o=i;n.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,s?at(t,s):at(t))}function jd(t){return t._reducerDefinitionType==="asyncThunk"}function zd(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Kd({type:t,reducerName:e},r,i,n){if(!n)throw new Error(Qe(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=r,d=n(t,o,u);i.exposeAction(e,d),s&&i.addCase(d.fulfilled,s),a&&i.addCase(d.pending,a),l&&i.addCase(d.rejected,l),c&&i.addMatcher(d.settled,c),i.exposeCaseReducer(e,{fulfilled:s||Pi,pending:a||Pi,rejected:l||Pi,settled:c||Pi})}function Pi(){}var Va="listener",ja="completed",za="cancelled",qf=`task-${za}`,Yf=`task-${ja}`,Xf=`${Va}-${za}`,Qf=`${Va}-${ja}`;var{assign:Ka}=Object;var mo="listenerMiddleware";var Wd=Ka(at(`${mo}/add`),{withTypes:()=>Wd}),Zf=at(`${mo}/removeAll`),Gd=Ka(at(`${mo}/remove`),{withTypes:()=>Gd});function Qe(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var qd=si(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),Mi=class extends qd(Object){};window.ftReduxStores||(window.ftReduxStores={});var Wa=class t extends Mi{static get(e){var r;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[i];if(di(o))return o;if(n==null)return;let s=Ha({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=$a({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Sr(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ai,this.injectInto=(o,s)=>this.reduxSlice.injectInto(o,s),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(n));return this.reduxStore.dispatch(d),d}:u=>{let d=l,p=this.getState()[d];Kt(p,u)||this.setState({[d]:n(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}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(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Ii=class{static format(e,r,i,n,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(e,r,i,n,!!o)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Ni=f(E()),Yd="ft-app-info",Ve=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ve.eventName="authentication-change";var Pr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Pr.eventName="ui-locale-changed";var Xd={session:(t,e)=>{(0,Ni.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>b.dispatchEvent(new Ve(e.payload)),0))}},b=Ni.FtReduxStore.get({name:Yd,reducers:Xd,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Ga=f(E()),Di=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},qa=(0,Ga.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(b)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>Ii.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Di([(0,go.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Di([(0,go.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Di([Yn({store:b.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Di([Yn({store:b.name})],e.prototype,"uiLocale",void 0),e});var Ya;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ya||(Ya={}));var Xa;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Xa||(Xa={}));var Qa;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Qa||(Qa={}));var Za;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Za||(Za={}));var Ja;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ja||(Ja={}));var el;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(el||(el={}));var ki;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(ki||(ki={}));var tl;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(tl||(tl={}));var rl;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(rl||(rl={}));var il;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(il||(il={}));var nl;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(nl||(nl={}));var ol;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ol||(ol={}));var sl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(sl||(sl={}));var al;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(al||(al={}));var ll;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(ll||(ll={}));var cl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(cl||(cl={}));var ul;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(ul||(ul={}));var dl;(function(t){t.ASC="ASC",t.DESC="DESC"})(dl||(dl={}));var pl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(pl||(pl={}));var fl;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(fl||(fl={}));var hl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(hl||(hl={}));var Ui;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ui||(Ui={}));var ml;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(ml||(ml={}));var gl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(gl||(gl={}));var yl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(yl||(yl={}));var vl;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(vl||(vl={}));var bl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(bl||(bl={}));var N;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(N||(N={}));var we;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(we||(we={}));var xl;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(xl||(xl={}));var El;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(El||(El={}));var Sl;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Sl||(Sl={}));var Al;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Al||(Al={}));var _l;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(_l||(_l={}));var Tl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Tl||(Tl={}));var Cl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Cl||(Cl={}));var wl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(wl||(wl={}));var Rl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Rl||(Rl={}));var Ol;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Ol||(Ol={}));var Ll;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(Ll||(Ll={}));var Pl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Pl||(Pl={}));var Qd={[N.PERSONAL_BOOK_SHARE_USER]:[N.PERSONAL_BOOK_USER],[N.HTML_EXPORT_USER]:[N.PERSONAL_BOOK_USER],[N.PDF_EXPORT_USER]:[N.PERSONAL_BOOK_USER],[N.KHUB_ADMIN]:[N.CONTENT_PUBLISHER],[N.ADMIN]:[N.KHUB_ADMIN,N.USERS_ADMIN,N.PORTAL_ADMIN,N.BEHAVIOR_DATA_USER],[N.GENERATIVE_AI_EXPORT_USER]:[N.GENERATIVE_AI_USER]};function Ml(t,e){return t===e||(Qd[t]??[]).some(r=>Ml(r,e))}function Ze(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(i=>Ml(i,e))}var Vi=f(E());var yo=f(E());var St=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=b.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=b.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var Xt=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:St.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):St.await()}};var ne=class extends Xt{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new yo.CacheRegistry,this.cache=e?n.commonCache:new yo.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var $i=class extends ne{async listMySearches(){let{session:e}=b.getState();return Ze(e,N.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Bi=class extends ne{async listMyBookmarks(){let e=b.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Fi=class extends ne{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=b.getState().session;return!!e?.sessionAuthenticated}};var Hi=class extends ne{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 e=b.getState().session;return!!e?.sessionAuthenticated}};var Zd="ft-user-assets",Jd={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(we).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:n}=e.payload;bo(t,r,[...vo(t,r),n]),Il(t,r,1,i),Nl(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;bo(t,r,vo(t,r).map(n=>n.id===i.id?i:n)),Nl(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;bo(t,r,vo(t,r).filter(o=>o.id!==n)),Il(t,r,-1,i)}},Dl={[we.SEARCHES]:"savedSearches",[we.BOOKMARKS]:"bookmarks",[we.BOOKS]:void 0,[we.COLLECTIONS]:void 0},vo=(t,e)=>{var r;let i=Dl[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},bo=(t,e,r)=>{let i=Dl[e];i&&(t[i]=r)},Il=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===we.BOOKMARKS&&i)){let o=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Nl=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},le=Vi.FtReduxStore.get({name:Zd,reducers:Jd,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(we).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),xo=class{constructor(e=new Fi,r=new Hi){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=b.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bi,this.savedSearchesService=new $i,b.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=b.getState();(0,Vi.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),le.actions.clearAssetCount(),le.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),le.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),le.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();le.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();le.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&le.getState().assetCounts.allAsset[e]!==r.count&&le.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&le.getState().assetCounts.bookmarkByMap[e]!==r.count&&le.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(le.getState().assetCounts.bookmarkByMap).length!==0;e===we.BOOKMARKS&&r&&le.actions.clearBookmarkCountByMap(),le.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;le.actions.bookmarks(r)}}},Eo=new xo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Eo);var So=class{addCommand(e,r=!1){b.commands.add(e,r)}consumeCommand(e){return b.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new So;var Re=f(E());var kl,Qt=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},ep=Symbol("clearAfterUnitTest"),ji=class extends(0,Re.withEventBus)(ne){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[kl]=()=>{this.defaultMessages={},this.cache=new Re.CacheRegistry,this.listeners={}},this.currentUiLocale=b.getState().uiLocale,b.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=b.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,Re.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new Re.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Re.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Qt({loadedContexts:e})),this.dispatchEvent(new Qt({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Qt({loadedContexts:[e]})),this.dispatchEvent(new Qt({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,Re.delay)(0).then(()=>i()).catch(()=>null)))}};kl=ep;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ji{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ji{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Zt=window.FluidTopicsI18nService,zi=window.FluidTopicsCustomI18nService;var Ul=f(E()),Ao=class{highlightHtml(e,r,i){(0,Ul.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Ao;var $l=f(E());var _o=class{isDate(e){var r,i,n,o;return(o=(n=((i=(r=b.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(e,r){var i,n,o,s;if(e==null)return"";try{return $l.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:b.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new _o;var Bl=f(E());var Mr=class{static get(e,r){var i,n,o,s;let a=b.getState(),{lang:l,region:c}=(o=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new Bl.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var Ki=class extends ne{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([i,n])=>Array.isArray(n)?[i,n.map(o=>typeof o=="object"&&o!=null&&!Array.isArray(o)?this.sortEventArrays(o):o).sort((o,s)=>typeof o=="object"&&o!==null&&"key"in o?o.key.localeCompare(s.key):typeof o=="string"&&typeof s=="string"?o.localeCompare(s):String(o).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[i,this.sortEventArrays(n)]:[i,n]);return Object.fromEntries(r)}sendEvents(e,r){let i="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>i).catch(n=>(console.info(r),console.debug(n),i)),1e3)}};var To=class{urlToSearchRequest(e){return Mr.get().parse(e)}searchRequestToUrl(e){return Mr.get().serialize(e)}};window.FluidTopicsUrlService=new To;var Je=f(E());var At=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};At.eventName="before-location-change";var _t=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};_t.eventName="change";var Co=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Fl=new Co;var Wi=class t extends Je.WithEventBus{static build(){return new t(window.history,Fl,()=>window.location,!1)}constructor(e,r,i,n){var o,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Je.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new _t(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[o,s,a])=>{let l=new At(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let c=r(),u={...c===this.currentIndex?this.currentState:void 0,...o,index:c,href:l.detail.nextLocation.href};i.apply(n,[u,s,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.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(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(e){this.addEventListener(At.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(At.eventName,e)}addHistoryChangeListener(e){this.addEventListener(_t.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(_t.eventName,e)}currentItem(){return(0,Je.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Je.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Je.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Je.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Wi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var Hl=f(P());var Vl=Hl.css`
158
+ `;var Kl=f(P()),ce=f(G()),wt=f(E());var Tt=f(E());function jl(t,e){let{authenticationRequired:r,session:i}=b.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var Gi=class extends Xt{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var wo=class t extends Tt.FtStateManager{static build(e){return new t(b,e)}constructor(e,r){super(),this.store=e,this.cache=new Tt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Gi,this.cleanSessionDebouncer=new Tt.Debouncer,this.reloadConfiguration=()=>{var i;(i=this.cache)===null||i===void 0||i.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Tt.Debouncer(500),this.apiProvider=r??(()=>St.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Ve.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(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.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=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(e)}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 e;let r=await this.cache.get("availableContentLocales",()=>jl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}setStickyFilters(e){this.store.actions.stickyFilters(e)}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Pr(i)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setNoCustomCode(e){this.store.actions.noCustomCode(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},zl=wo.build();var Ct=class extends Event{constructor(e,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var Ir=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:o}of i){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Ct(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],i=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(r);o===void 0&&n.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var X=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},U=class extends wt.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.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=zl,this.contextRoot=new Ir}render(){return Kl.html`
159
159
  <slot></slot>
160
- `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>Qt.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};U.elementDefinitions={};U.styles=Fl;X([(0,ce.property)()],U.prototype,"baseUrl",void 0);X([(0,ce.property)()],U.prototype,"tenantId",void 0);X([(0,ce.property)()],U.prototype,"apiIntegrationIdentifier",void 0);X([(0,ce.property)()],U.prototype,"apiIntegrationAppVersion",void 0);X([(0,ce.property)()],U.prototype,"uiLocale",void 0);X([(0,Ct.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);X([(0,Ct.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"editorMode",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"noCustom",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);X([(0,ce.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomComponent",void 0);X([(0,ce.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomCode",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"withManualResources",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"authenticationRequired",void 0);X([(0,Ct.jsonProperty)([])],U.prototype,"messageContexts",void 0);X([(0,Ct.jsonProperty)(void 0)],U.prototype,"session",void 0);var Wl=f(E());var Kl={"ft-app-context":U};(0,Wl.customElements)(Kl);var Gl=f(G());var wo=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,i]=e.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Zt=new wo;var rp=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Mr=Symbol("i18nAttributes"),ql=Symbol("i18nListAttributes"),Ir=Symbol("i18nProperties"),Wi=Symbol("i18nContexts"),Lr=Symbol("i18nUnsubs"),Yi=(0,Jt.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?Vi:Qt}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:d}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(s,a,...p)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(Zt.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&o(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(s=this[Mr])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[ql])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(h=>c(u,d,h))})}updateI18nProperties(o){var s;(s=this[Ir])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[Wi].set(l,{isCustomContext:a}),this[Lr].has(l)||this[Lr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[Wi].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Wi].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Lr].forEach(o=>o()),this[Lr].clear()}}return e=Wi,r=Lr,rp([(0,Gl.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),Gi=class extends Yi(Jt.FtLitElement){},qi=class extends Yi(Jt.FtLitElementRedux){};var Yl=f(E());var Ro=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(i=>typeof i=="string"?Zt.fromAttribute(i):i):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},ip=new Ro;var Xl=(t,e)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:Yl.hasChanged,converter:Zt,...e}),r[Mr]=(n=r[Mr])!==null&&n!==void 0?n:new Map,r[Mr].set(i,t??{})};var Xi=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Vi:Qt}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(i,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(i,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),this.rawMessages=new Proxy({},{get:(i,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(i,n)=>()=>n}),this.attributes=new Proxy({},{get:(i,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var Ql=(t,e)=>(r,i)=>{var n,o;r.constructor.createProperty(i,e??{attribute:!1,type:String});let s={...t,key:(n=t.key)!==null&&n!==void 0?n:i};r[Ir]=(o=r[Ir])!==null&&o!==void 0?o:new Map,r[Ir].set(i,s)};var Zl=f(L());var Jl=Zl.css`
161
- `;var Qi=f(L()),Zi=f(G()),Ji=f(E());var Nr=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Ne=class extends qi{constructor(){super(),this.editorMode=!1,this.addStore(b)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Qi.nothing:Qi.html`
160
+ `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>Zt.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};U.elementDefinitions={};U.styles=Vl;X([(0,ce.property)()],U.prototype,"baseUrl",void 0);X([(0,ce.property)()],U.prototype,"tenantId",void 0);X([(0,ce.property)()],U.prototype,"apiIntegrationIdentifier",void 0);X([(0,ce.property)()],U.prototype,"apiIntegrationAppVersion",void 0);X([(0,ce.property)()],U.prototype,"uiLocale",void 0);X([(0,wt.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);X([(0,wt.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"editorMode",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"noCustom",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);X([(0,ce.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomComponent",void 0);X([(0,ce.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomCode",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"withManualResources",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"authenticationRequired",void 0);X([(0,wt.jsonProperty)([])],U.prototype,"messageContexts",void 0);X([(0,wt.jsonProperty)(void 0)],U.prototype,"session",void 0);var Gl=f(E());var Wl={"ft-app-context":U};(0,Gl.customElements)(Wl);var ql=f(G());var Ro=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,i]=e.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Jt=new Ro;var ip=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Dr=Symbol("i18nAttributes"),Yl=Symbol("i18nListAttributes"),kr=Symbol("i18nProperties"),qi=Symbol("i18nContexts"),Nr=Symbol("i18nUnsubs"),Qi=(0,er.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?zi:Zt}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:d}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(s,a,...p)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(Jt.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&o(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(s=this[Dr])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[Yl])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(h=>c(u,d,h))})}updateI18nProperties(o){var s;(s=this[kr])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[qi].set(l,{isCustomContext:a}),this[Nr].has(l)||this[Nr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[qi].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[qi].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Nr].forEach(o=>o()),this[Nr].clear()}}return e=qi,r=Nr,ip([(0,ql.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),Yi=class extends Qi(er.FtLitElement){},Xi=class extends Qi(er.FtLitElementRedux){};var Xl=f(E());var Oo=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(i=>typeof i=="string"?Jt.fromAttribute(i):i):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},np=new Oo;var Ql=(t,e)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:Xl.hasChanged,converter:Jt,...e}),r[Dr]=(n=r[Dr])!==null&&n!==void 0?n:new Map,r[Dr].set(i,t??{})};var Zi=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?zi:Zt}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(i,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(i,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),this.rawMessages=new Proxy({},{get:(i,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(i,n)=>()=>n}),this.attributes=new Proxy({},{get:(i,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var Zl=(t,e)=>(r,i)=>{var n,o;r.constructor.createProperty(i,e??{attribute:!1,type:String});let s={...t,key:(n=t.key)!==null&&n!==void 0?n:i};r[kr]=(o=r[kr])!==null&&o!==void 0?o:new Map,r[kr].set(i,s)};var Jl=f(P());var ec=Jl.css`
161
+ `;var Ji=f(P()),rr=f(G()),en=f(E());var tr=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Oe=class extends Xi{constructor(){super(),this.editorMode=!1,this.editorMessage="Select a context and a label key.",this.addStore(b)}render(){return!this.key||!this.context?this.editorMode?this.editorMessage:Ji.nothing:Ji.html`
162
162
  <span class="ft-i18n">
163
163
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
164
164
  </span>
165
- `}update(e){var r;super.update(e),["context","key","defaultMessage"].some(i=>e.has(i))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Ne.elementDefinitions={};Ne.styles=Jl;Nr([(0,Ji.redux)()],Ne.prototype,"editorMode",void 0);Nr([(0,Zi.property)()],Ne.prototype,"context",void 0);Nr([(0,Zi.property)()],Ne.prototype,"key",void 0);Nr([(0,Ji.jsonProperty)([])],Ne.prototype,"args",void 0);Nr([(0,Zi.property)()],Ne.prototype,"defaultMessage",void 0);var tc=f(E());var ec={"ft-i18n":Ne};(0,tc.customElements)(ec);var De=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},z=class extends Gi{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new Oe.Debouncer,this.revealDebouncer=new Oe.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=e=>{this.isIgnored(e)?this.matchesIgnored(e)&&this.hide():this.show()},this.onFocusIn=e=>{!this.isIgnored(e)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var e,r;return rc.html`
165
+ `}update(e){var r;super.update(e),["context","key","defaultMessage"].some(i=>e.has(i))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Oe.elementDefinitions={};Oe.styles=ec;tr([(0,en.redux)()],Oe.prototype,"editorMode",void 0);tr([(0,rr.property)()],Oe.prototype,"context",void 0);tr([(0,rr.property)()],Oe.prototype,"key",void 0);tr([(0,en.jsonProperty)([])],Oe.prototype,"args",void 0);tr([(0,rr.property)()],Oe.prototype,"defaultMessage",void 0);tr([(0,rr.state)()],Oe.prototype,"editorMessage",void 0);var rc=f(E());var tc={"ft-i18n":Oe};(0,rc.customElements)(tc);var De=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},z=class extends Yi{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new Le.Debouncer,this.revealDebouncer=new Le.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=e=>{this.isIgnored(e)?this.matchesIgnored(e)&&this.hide():this.show()},this.onFocusIn=e=>{!this.isIgnored(e)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var e,r;return ic.html`
166
166
  <div part="container"
167
167
  class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
168
168
  <slot part="slot"></slot>
@@ -177,7 +177,7 @@
177
177
  </div>
178
178
  </div>
179
179
  </div>
180
- `}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,i;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(i=this.tooltip)===null||i===void 0||i.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let i=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=i}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&ii(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${Oe.designSystemVariables.transitionDuration}, left ${Oe.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(e){return(0,Oe.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(e){return this.manual||this.matchesIgnored(e)}};z.elementDefinitions={"ft-typography":Z};z.styles=Es;De([Xl()],z.prototype,"text",void 0);De([(0,Pe.property)({type:Boolean})],z.prototype,"manual",void 0);De([(0,Pe.property)({type:Boolean})],z.prototype,"inline",void 0);De([(0,Oe.numberProperty)()],z.prototype,"delay",void 0);De([(0,Pe.property)()],z.prototype,"position",void 0);De([(0,Oe.jsonProperty)([])],z.prototype,"ignoreMatchingElements",void 0);De([(0,Pe.queryAssignedNodes)()],z.prototype,"slotNodes",void 0);De([(0,Pe.query)(".ft-tooltip--container")],z.prototype,"container",void 0);De([(0,Pe.query)(".ft-tooltip")],z.prototype,"tooltip",void 0);De([(0,Pe.query)(".ft-tooltip--content")],z.prototype,"tooltipContent",void 0);De([(0,Pe.state)()],z.prototype,"visible",void 0);var nc=f(E());var ic={"ft-tooltip":z};(0,nc.customElements)(ic);var rn=f(L()),re=f(G()),Fc=f(er()),rr=f(E());var fc=f(L()),ee=f(G()),hc=f(er()),Dr=f(E());var dc=f(L()),W=f(E()),sc=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorContent),ue={color:sc,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",sc),opacityContentOnSurfacePressed:W.FtCssVariableFactory.external(W.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:W.FtCssVariableFactory.external(W.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:W.FtCssVariableFactory.external(W.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:W.FtCssVariableFactory.external(W.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:W.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},ac=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorPrimary),lc={color:ac,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",ac)},cc=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorSecondary),uc={color:cc,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",cc)},pc=dc.css`
180
+ `}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,i;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(i=this.tooltip)===null||i===void 0||i.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let i=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=i}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&oi(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${Le.designSystemVariables.transitionDuration}, left ${Le.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(e){return(0,Le.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(e){return this.manual||this.matchesIgnored(e)}};z.elementDefinitions={"ft-typography":Z};z.styles=Ss;De([Ql()],z.prototype,"text",void 0);De([(0,Pe.property)({type:Boolean})],z.prototype,"manual",void 0);De([(0,Pe.property)({type:Boolean})],z.prototype,"inline",void 0);De([(0,Le.numberProperty)()],z.prototype,"delay",void 0);De([(0,Pe.property)()],z.prototype,"position",void 0);De([(0,Le.jsonProperty)([])],z.prototype,"ignoreMatchingElements",void 0);De([(0,Pe.queryAssignedNodes)()],z.prototype,"slotNodes",void 0);De([(0,Pe.query)(".ft-tooltip--container")],z.prototype,"container",void 0);De([(0,Pe.query)(".ft-tooltip")],z.prototype,"tooltip",void 0);De([(0,Pe.query)(".ft-tooltip--content")],z.prototype,"tooltipContent",void 0);De([(0,Pe.state)()],z.prototype,"visible",void 0);var oc=f(E());var nc={"ft-tooltip":z};(0,oc.customElements)(nc);var nn=f(P()),re=f(G()),Vc=f(ir()),or=f(E());var hc=f(P()),ee=f(G()),mc=f(ir()),Ur=f(E());var pc=f(P()),W=f(E()),ac=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorContent),ue={color:ac,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",ac),opacityContentOnSurfacePressed:W.FtCssVariableFactory.external(W.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:W.FtCssVariableFactory.external(W.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:W.FtCssVariableFactory.external(W.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:W.FtCssVariableFactory.external(W.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:W.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},lc=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorPrimary),cc={color:lc,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",lc)},uc=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorSecondary),dc={color:uc,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",uc)},fc=pc.css`
181
181
  :host {
182
182
  display: contents;
183
183
  }
@@ -232,19 +232,19 @@
232
232
  }
233
233
 
234
234
  .ft-ripple.ft-ripple--secondary .ft-ripple--background {
235
- background-color: ${uc.backgroundColor};
235
+ background-color: ${dc.backgroundColor};
236
236
  }
237
237
 
238
238
  .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
239
- background-color: ${uc.color};
239
+ background-color: ${dc.color};
240
240
  }
241
241
 
242
242
  .ft-ripple.ft-ripple--primary .ft-ripple--background {
243
- background-color: ${lc.backgroundColor};
243
+ background-color: ${cc.backgroundColor};
244
244
  }
245
245
 
246
246
  .ft-ripple.ft-ripple--primary .ft-ripple--effect {
247
- background-color: ${lc.color};
247
+ background-color: ${cc.color};
248
248
  }
249
249
 
250
250
  .ft-ripple .ft-ripple--background {
@@ -289,18 +289,18 @@
289
289
  opacity: ${ue.opacityContentOnSurfacePressed};
290
290
  transform: translate(-50%, -50%) scale(1);
291
291
  }
292
- `;var fe=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},M=class extends Dr.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 Dr.Debouncer(1e3),this.onTransitionStart=e=>{e.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=e=>{e.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new Dr.Debouncer(10),this.moveRipple=e=>{var r,i;let{x:n,y:o}=this.getCoordinates(e),s=(i=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&i!==void 0?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(n!=null?n-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=e=>{this.moveRipple(e),this.pressed=!this.isIgnored(e)},this.endPress=()=>{this.pressed=!1},this.startHover=e=>{this.hovered=!this.isIgnored(e)},this.endHover=()=>{this.hovered=!1},this.startFocus=e=>{this.focused=this.isFocusVisible(e?.target)&&!this.isIgnored(e)},this.endFocus=()=>{this.focused=!1}}render(){let e={"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 fc.html`
292
+ `;var fe=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},M=class extends Ur.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 Ur.Debouncer(1e3),this.onTransitionStart=e=>{e.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=e=>{e.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new Ur.Debouncer(10),this.moveRipple=e=>{var r,i;let{x:n,y:o}=this.getCoordinates(e),s=(i=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&i!==void 0?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(n!=null?n-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=e=>{this.moveRipple(e),this.pressed=!this.isIgnored(e)},this.endPress=()=>{this.pressed=!1},this.startHover=e=>{this.hovered=!this.isIgnored(e)},this.endHover=()=>{this.hovered=!1},this.startFocus=e=>{this.focused=this.isFocusVisible(e?.target)&&!this.isIgnored(e)},this.endFocus=()=>{this.focused=!1}}render(){let e={"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 hc.html`
293
293
  <style>
294
294
  .ft-ripple .ft-ripple--effect {
295
295
  left: ${this.originX}px;
296
296
  top: ${this.originY}px;
297
297
  }
298
298
  </style>
299
- <div class="${(0,hc.classMap)(e)}">
299
+ <div class="${(0,mc.classMap)(e)}">
300
300
  <div class="ft-ripple--background"></div>
301
301
  <div class="ft-ripple--effect"></div>
302
302
  </div>
303
- `}contentAvailableCallback(e){super.contentAvailableCallback(e),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(e){var r,i;super.update(e),e.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var e,r;let i=(e=this.shadowRoot)===null||e===void 0?void 0:e.host.parentElement;i&&this.setupFor((r=this.target)!==null&&r!==void 0?r:i)}forceFocusUpdate(){var e;!((e=this.target)===null||e===void 0)&&e.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(e){if(this.setupDebouncer.cancel(),this.target===e)return;this.onDisconnect&&this.onDisconnect(),this.target=e,e.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},i=r("mouseup","contextmenu"),n=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};e.addEventListener("mouseover",this.startHover,s),e.addEventListener("mousemove",this.moveRipple,s),e.addEventListener("mouseleave",this.endHover,s),e.addEventListener("mousedown",i,s),e.addEventListener("touchstart",n,s),e.addEventListener("touchmove",this.moveRipple,s),e.addEventListener("keydown",o,s),e.addEventListener("focus",this.startFocus,s),e.addEventListener("blur",this.endFocus,s),e.addEventListener("focusin",this.startFocus,s),e.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{e.removeAttribute("data-is-ft-ripple-target"),e.removeEventListener("mouseover",this.startHover,s),e.removeEventListener("mousemove",this.moveRipple,s),e.removeEventListener("mouseleave",this.endHover,s),e.removeEventListener("mousedown",i,s),e.removeEventListener("touchstart",n,s),e.removeEventListener("touchmove",this.moveRipple,s),e.removeEventListener("keydown",o,s),e.removeEventListener("focus",this.startFocus,s),e.removeEventListener("blur",this.endFocus,s),e.removeEventListener("focusin",this.startFocus,s),e.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(e){let r=e,i=e,n,o;return r.x!=null?{x:n,y:o}=r:i.touches!=null&&(n=i.touches[0].clientX,o=i.touches[0].clientY),{x:n,y:o}}isFocusVisible(e){return e instanceof HTMLElement?e.matches(":focus-visible"):!0}isIgnored(e){if(this.disabled)return!0;if(e!=null)for(let r of e.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()}};M.elementDefinitions={};M.styles=pc;fe([(0,ee.property)({type:Boolean})],M.prototype,"primary",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"secondary",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"unbounded",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"activated",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"selected",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"disabled",void 0);fe([(0,ee.state)()],M.prototype,"hovered",void 0);fe([(0,ee.state)()],M.prototype,"focused",void 0);fe([(0,ee.state)()],M.prototype,"pressed",void 0);fe([(0,ee.state)()],M.prototype,"rippling",void 0);fe([(0,ee.state)()],M.prototype,"originX",void 0);fe([(0,ee.state)()],M.prototype,"originY",void 0);fe([(0,ee.query)(".ft-ripple")],M.prototype,"ripple",void 0);fe([(0,ee.query)(".ft-ripple--effect")],M.prototype,"rippleEffect",void 0);var gc=f(E());var mc={"ft-ripple":M};(0,gc.customElements)(mc);var yc=f(L()),ke=f(E()),xe={size:ke.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:ke.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",ke.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:ke.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",ke.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:ke.FtCssVariableFactory.extend("--ft-icon-material-font-family","",ke.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:ke.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},vc=[yc.css`
303
+ `}contentAvailableCallback(e){super.contentAvailableCallback(e),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(e){var r,i;super.update(e),e.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var e,r;let i=(e=this.shadowRoot)===null||e===void 0?void 0:e.host.parentElement;i&&this.setupFor((r=this.target)!==null&&r!==void 0?r:i)}forceFocusUpdate(){var e;!((e=this.target)===null||e===void 0)&&e.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(e){if(this.setupDebouncer.cancel(),this.target===e)return;this.onDisconnect&&this.onDisconnect(),this.target=e,e.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},i=r("mouseup","contextmenu"),n=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};e.addEventListener("mouseover",this.startHover,s),e.addEventListener("mousemove",this.moveRipple,s),e.addEventListener("mouseleave",this.endHover,s),e.addEventListener("mousedown",i,s),e.addEventListener("touchstart",n,s),e.addEventListener("touchmove",this.moveRipple,s),e.addEventListener("keydown",o,s),e.addEventListener("focus",this.startFocus,s),e.addEventListener("blur",this.endFocus,s),e.addEventListener("focusin",this.startFocus,s),e.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{e.removeAttribute("data-is-ft-ripple-target"),e.removeEventListener("mouseover",this.startHover,s),e.removeEventListener("mousemove",this.moveRipple,s),e.removeEventListener("mouseleave",this.endHover,s),e.removeEventListener("mousedown",i,s),e.removeEventListener("touchstart",n,s),e.removeEventListener("touchmove",this.moveRipple,s),e.removeEventListener("keydown",o,s),e.removeEventListener("focus",this.startFocus,s),e.removeEventListener("blur",this.endFocus,s),e.removeEventListener("focusin",this.startFocus,s),e.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(e){let r=e,i=e,n,o;return r.x!=null?{x:n,y:o}=r:i.touches!=null&&(n=i.touches[0].clientX,o=i.touches[0].clientY),{x:n,y:o}}isFocusVisible(e){return e instanceof HTMLElement?e.matches(":focus-visible"):!0}isIgnored(e){if(this.disabled)return!0;if(e!=null)for(let r of e.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()}};M.elementDefinitions={};M.styles=fc;fe([(0,ee.property)({type:Boolean})],M.prototype,"primary",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"secondary",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"unbounded",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"activated",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"selected",void 0);fe([(0,ee.property)({type:Boolean})],M.prototype,"disabled",void 0);fe([(0,ee.state)()],M.prototype,"hovered",void 0);fe([(0,ee.state)()],M.prototype,"focused",void 0);fe([(0,ee.state)()],M.prototype,"pressed",void 0);fe([(0,ee.state)()],M.prototype,"rippling",void 0);fe([(0,ee.state)()],M.prototype,"originX",void 0);fe([(0,ee.state)()],M.prototype,"originY",void 0);fe([(0,ee.query)(".ft-ripple")],M.prototype,"ripple",void 0);fe([(0,ee.query)(".ft-ripple--effect")],M.prototype,"rippleEffect",void 0);var yc=f(E());var gc={"ft-ripple":M};(0,yc.customElements)(gc);var vc=f(P()),ke=f(E()),xe={size:ke.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:ke.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",ke.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:ke.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",ke.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:ke.FtCssVariableFactory.extend("--ft-icon-material-font-family","",ke.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:ke.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},bc=[vc.css`
304
304
  :host, i.ft-icon {
305
305
  display: inline-flex;
306
306
  align-items: center;
@@ -348,12 +348,12 @@
348
348
  .ft-icon--material {
349
349
  font-family: ${xe.materialFontFamily}, "Material Icons", sans-serif;
350
350
  }
351
- `,ke.noTextSelect];var Ve;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Ve||(Ve={}));var kr=f(L()),lt=f(G()),Ec=f(E()),Sc=f(xc());var en;(function(t){t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.BOOKS="&#xe806;",t.MENU="&#xe807;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.HOME="&#xe80b;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.EXPORT="&#xe80f;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.USER="&#xe813;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.OFFLINE="&#xe816;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.STAR_PLAIN="&#xe900;",t.TOPICS="&#xe901;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN="&#xe90f;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_THEME="&#xe911;",t.ADMIN_USERS="&#xe912;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.INFO="&#xe919;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.THIN_ARROW="&#xe921;",t.SIGN_IN="&#xe922;",t.LOGOUT="&#xe923;",t.TRANSLATE="&#xe924;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.ARTICLE="&#xe927;",t.COLUMNS="&#xe928;",t.ANALYTICS="&#xe929;",t.COLLECTIONS="&#xe92a;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.COPY_TO_CLIPBOARD="&#xe930;",t.SHARED_PBK="&#xe931;",t.ATTACHMENTS="&#xe932;",t.STRIPE_ARROW_LEFT="&#xe933;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.FILTERS="&#xe935;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.SAVE="&#xe93a;",t.LOCKER="&#xe93b;",t.ADMIN_INTEGRATION="&#xe93c;",t.SYNC="&#xe93d;",t.TAG="&#xe93e;",t.BOOK_PLAIN="&#xe93f;",t.UPLOAD="&#xe940;",t.ONLINE="&#xe941;",t.TAG_PLAIN="&#xe942;",t.ACCOUNT_SETTINGS="&#xe943;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.SHORTCUT_MENU="&#xe946;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.ADMIN_PORTAL="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.FEEDBACK_PLAIN="&#xe951;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_COLLECTIONS="&#xe955;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.RESET="&#xe958;",t.MY_LIBRARY="&#xe959;",t.UNSTRUCTURED_DOC="&#xe95a;",t.CONTEXTUAL="&#xe95b;",t.THIN_ARROW_UP="&#xe95c;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.DESKTOP="&#xe95e;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_STACKED="&#xe96e;",t.CHART_BAR_GROUPED="&#xe96f;",t.EYE_SLASH="&#xe970;",t.X_MARK="&#xe971;",t.EXPAND_WIDE="&#xe972;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.EXTLINK_LIGHT="&#xe978;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.CONSUMER="&#xe97c;",t.OCTAGON_XMARK="&#xe97d;",t.HOURGLASS_HALF="&#xe97e;",t.CLOCK="&#xe97f;",t.CLOCK_THREE="&#xe97f;",t.CALENDAR_DAY="&#xe980;",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",t.WAND_MAGIC_SPARKLES="&#xe982;",t.PAPER_PLANE="&#xe983;",t.CIRCLE_STOP="&#xe984;",t.ARROW_ROTATE_RIGHT="&#xe985;",t.ARROWS_ROTATE="&#xe986;",t.ALIGN_RIGHT="&#xe987;",t.FORMAT_CLEAR="&#xe988;",t.ALIGN_CENTER="&#xe989;",t.ALIGN_LEFT="&#xe98a;",t.PALETTE="&#xe98b;",t.BOLD="&#xe98c;",t.ITALIC="&#xe98d;",t.UNDERLINE="&#xe98e;",t.STRIKETHROUGH="&#xe98f;",t.LINK_SIMPLE_SLASH="&#xe990;",t.LINK_SIMPLE="&#xe991;",t.ROUTE="&#xe992;",t.CIRCLE_USER_SLASH="&#xe993;",t.CIRCLE_USER_CHECK="&#xe994;",t.LIST_MAGNIFYING_GLASS="&#xe995;",t.MEDAL="&#xe996;",t.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",t.ARROW_TURN_DOWN_RIGHT="&#xe998;",t.FLASK="&#xe999;",t.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",t.HOURGLASS_END="&#xe99b;",t.CIRCLE_QUESTION="&#xe99c;",t.GRIP_LINES_SOLID="&#xe99d;",t.TRANSLATE_SPARKLE_SOLID="&#xe99e;",t.CODE="&#xe99f;",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",t.PAPER_PLANE_SLASH="&#xe9a1;",t.COMPRESS="&#xe9a2;",t.EXPAND="&#xe9a3;",t.ARROW_ROTATE_LEFT="&#xe9a4;",t.MOBILE_SMALL="&#xe9a5;",t.SPARKLES="&#xe9a6;",t.HAND_SOLID="&#xe9a7;",t.CLOCK_SOLID="&#xe9a8;",t.CONTEXT_MENU_CURSOR="&#xe9a9;",t.LANGUAGE_SLASH="&#xe9aa;",t.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",t.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",t.BOOKMARK_SLASH="&#xe9ad;",t.CIRCLE_PAUSE="&#xe9ae;",t.CIRCLE_PLAY="&#xe9af;",t.CIRCLE_STOP_PLAIN="&#xe9b0;",t.CIRCLE_ARROW_DOWN="&#xe9b1;",t.SHARE_NODES="&#xe9b2;",t.BELL="&#xe9b3;",t.BELL_SLASH="&#xe9b4;",t.FILE="&#xe9b5;",t.HAND="&#xe9b6;",t.SQUARE_INFO_SOLID="&#xe9b7;",t.FILE_CODE="&#xe9b8;",t.BOX_CODE="&#xe9b9;",t.TOPICS_SOLID="&#xe9ba;",t.PHOTO_FILM="&#xe9bb;",t.HYPHEN_SOLID="&#xe9bc;",t.CROSSHAIRS="&#xe9bd;",t.PERSON_CHALKBOARD="&#xe9be;",t.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",t.BOOK_OPEN_COVER="&#xe9c0;",t.LIGHTBULB="&#xe9c1;",t.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",t.CHART_LINE_USER="&#xe9c3;",t.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",t.EYE="&#xf06e;",t.SHARE="&#xe80f1;"})(en||(en={}));var m;(function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"})(m||(m={}));var cv=new Map([...["abw"].map(t=>[t,m.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(t=>[t,m.AUDIO]),...["avi"].map(t=>[t,m.AVI]),...["chm","xhs"].map(t=>[t,m.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(t=>[t,m.CODE]),...["csv"].map(t=>[t,m.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,m.DITA]),...["epub"].map(t=>[t,m.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,m.EXCEL]),...["flac"].map(t=>[t,m.FLAC]),...["gif"].map(t=>[t,m.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,m.GZIP]),...["html","htm","xhtml"].map(t=>[t,m.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(t=>[t,m.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,m.JPEG]),...["json"].map(t=>[t,m.JSON]),...["m4a","m4p"].map(t=>[t,m.M4A]),...["mov","qt"].map(t=>[t,m.MOV]),...["mp3"].map(t=>[t,m.MP3]),...["mp4","m4v"].map(t=>[t,m.MP4]),...["ogg","oga"].map(t=>[t,m.OGG]),...["pdf","ps"].map(t=>[t,m.PDF]),...["png"].map(t=>[t,m.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,m.POWERPOINT]),...["rar"].map(t=>[t,m.RAR]),...["stp"].map(t=>[t,m.STP]),...["txt","rtf","md","mdown"].map(t=>[t,m.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(t=>[t,m.VIDEO]),...["wav"].map(t=>[t,m.WAV]),...["wma"].map(t=>[t,m.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,m.WORD]),...["xml","xsl","rdf"].map(t=>[t,m.XML]),...["yaml","yml","x-yaml"].map(t=>[t,m.YAML]),...["zip"].map(t=>[t,m.ZIP])]);var uv={[m.ABW]:"#91ABC6",[m.AUDIO]:"#1795E3",[m.AVI]:"#E63324",[m.CHM]:"#71C3EB",[m.CODE]:"#71C3EB",[m.CSV]:"#1F7345",[m.DITA]:"#71C3EB",[m.EPUB]:"#85B926",[m.EXCEL]:"#1F7345",[m.FLAC]:"#1795E3",[m.GIF]:"#59B031",[m.GZIP]:"#F8AB36",[m.HTML]:"#71C3EB",[m.IMAGE]:"#59B031",[m.JPEG]:"#59B031",[m.JSON]:"#71C3EB",[m.M4A]:"#1795E3",[m.MOV]:"#E63324",[m.MP3]:"#1795E3",[m.MP4]:"#E63324",[m.OGG]:"#1795E3",[m.PDF]:"#E44948",[m.PNG]:"#59B031",[m.POWERPOINT]:"#B54A2B",[m.RAR]:"#F8AB36",[m.STP]:"#3764B1",[m.TEXT]:"#3162AB",[m.UNKNOWN]:"#999999",[m.VIDEO]:"#E63324",[m.WAV]:"#1795E3",[m.WMA]:"#1795E3",[m.WORD]:"#3162AB",[m.XML]:"#71C3EB",[m.YAML]:"#71C3EB",[m.ZIP]:"#F8AB36"};var Ur=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},te=class extends Ec.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=kr.nothing}render(){let e=this.variant&&Object.values(Ve).includes(this.variant)?this.variant:Ve.fluid_topics,r=e!==Ve.material||!!this.value;return kr.html`
351
+ `,ke.noTextSelect];var je;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(je||(je={}));var $r=f(P()),lt=f(G()),Sc=f(E()),Ac=f(Ec());var tn;(function(t){t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.BOOKS="&#xe806;",t.MENU="&#xe807;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.HOME="&#xe80b;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.EXPORT="&#xe80f;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.USER="&#xe813;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.OFFLINE="&#xe816;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.STAR_PLAIN="&#xe900;",t.TOPICS="&#xe901;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN="&#xe90f;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_THEME="&#xe911;",t.ADMIN_USERS="&#xe912;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.INFO="&#xe919;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.THIN_ARROW="&#xe921;",t.SIGN_IN="&#xe922;",t.LOGOUT="&#xe923;",t.TRANSLATE="&#xe924;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.ARTICLE="&#xe927;",t.COLUMNS="&#xe928;",t.ANALYTICS="&#xe929;",t.COLLECTIONS="&#xe92a;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.COPY_TO_CLIPBOARD="&#xe930;",t.SHARED_PBK="&#xe931;",t.ATTACHMENTS="&#xe932;",t.STRIPE_ARROW_LEFT="&#xe933;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.FILTERS="&#xe935;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.SAVE="&#xe93a;",t.LOCKER="&#xe93b;",t.ADMIN_INTEGRATION="&#xe93c;",t.SYNC="&#xe93d;",t.TAG="&#xe93e;",t.BOOK_PLAIN="&#xe93f;",t.UPLOAD="&#xe940;",t.ONLINE="&#xe941;",t.TAG_PLAIN="&#xe942;",t.ACCOUNT_SETTINGS="&#xe943;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.SHORTCUT_MENU="&#xe946;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.ADMIN_PORTAL="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.FEEDBACK_PLAIN="&#xe951;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_COLLECTIONS="&#xe955;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.RESET="&#xe958;",t.MY_LIBRARY="&#xe959;",t.UNSTRUCTURED_DOC="&#xe95a;",t.CONTEXTUAL="&#xe95b;",t.THIN_ARROW_UP="&#xe95c;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.DESKTOP="&#xe95e;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_STACKED="&#xe96e;",t.CHART_BAR_GROUPED="&#xe96f;",t.EYE_SLASH="&#xe970;",t.X_MARK="&#xe971;",t.EXPAND_WIDE="&#xe972;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.EXTLINK_LIGHT="&#xe978;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.CONSUMER="&#xe97c;",t.OCTAGON_XMARK="&#xe97d;",t.HOURGLASS_HALF="&#xe97e;",t.CLOCK="&#xe97f;",t.CLOCK_THREE="&#xe97f;",t.CALENDAR_DAY="&#xe980;",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",t.WAND_MAGIC_SPARKLES="&#xe982;",t.PAPER_PLANE="&#xe983;",t.CIRCLE_STOP="&#xe984;",t.ARROW_ROTATE_RIGHT="&#xe985;",t.ARROWS_ROTATE="&#xe986;",t.ALIGN_RIGHT="&#xe987;",t.FORMAT_CLEAR="&#xe988;",t.ALIGN_CENTER="&#xe989;",t.ALIGN_LEFT="&#xe98a;",t.PALETTE="&#xe98b;",t.BOLD="&#xe98c;",t.ITALIC="&#xe98d;",t.UNDERLINE="&#xe98e;",t.STRIKETHROUGH="&#xe98f;",t.LINK_SIMPLE_SLASH="&#xe990;",t.LINK_SIMPLE="&#xe991;",t.ROUTE="&#xe992;",t.CIRCLE_USER_SLASH="&#xe993;",t.CIRCLE_USER_CHECK="&#xe994;",t.LIST_MAGNIFYING_GLASS="&#xe995;",t.MEDAL="&#xe996;",t.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",t.ARROW_TURN_DOWN_RIGHT="&#xe998;",t.FLASK="&#xe999;",t.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",t.HOURGLASS_END="&#xe99b;",t.CIRCLE_QUESTION="&#xe99c;",t.GRIP_LINES_SOLID="&#xe99d;",t.TRANSLATE_SPARKLE_SOLID="&#xe99e;",t.CODE="&#xe99f;",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",t.PAPER_PLANE_SLASH="&#xe9a1;",t.COMPRESS="&#xe9a2;",t.EXPAND="&#xe9a3;",t.ARROW_ROTATE_LEFT="&#xe9a4;",t.MOBILE_SMALL="&#xe9a5;",t.SPARKLES="&#xe9a6;",t.HAND_SOLID="&#xe9a7;",t.CLOCK_SOLID="&#xe9a8;",t.CONTEXT_MENU_CURSOR="&#xe9a9;",t.LANGUAGE_SLASH="&#xe9aa;",t.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",t.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",t.BOOKMARK_SLASH="&#xe9ad;",t.CIRCLE_PAUSE="&#xe9ae;",t.CIRCLE_PLAY="&#xe9af;",t.CIRCLE_STOP_PLAIN="&#xe9b0;",t.CIRCLE_ARROW_DOWN="&#xe9b1;",t.SHARE_NODES="&#xe9b2;",t.BELL="&#xe9b3;",t.BELL_SLASH="&#xe9b4;",t.FILE="&#xe9b5;",t.HAND="&#xe9b6;",t.SQUARE_INFO_SOLID="&#xe9b7;",t.FILE_CODE="&#xe9b8;",t.BOX_CODE="&#xe9b9;",t.TOPICS_SOLID="&#xe9ba;",t.PHOTO_FILM="&#xe9bb;",t.HYPHEN_SOLID="&#xe9bc;",t.CROSSHAIRS="&#xe9bd;",t.PERSON_CHALKBOARD="&#xe9be;",t.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",t.BOOK_OPEN_COVER="&#xe9c0;",t.LIGHTBULB="&#xe9c1;",t.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",t.CHART_LINE_USER="&#xe9c3;",t.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",t.EYE="&#xf06e;",t.SHARE="&#xe80f1;"})(tn||(tn={}));var m;(function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"})(m||(m={}));var uv=new Map([...["abw"].map(t=>[t,m.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(t=>[t,m.AUDIO]),...["avi"].map(t=>[t,m.AVI]),...["chm","xhs"].map(t=>[t,m.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(t=>[t,m.CODE]),...["csv"].map(t=>[t,m.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,m.DITA]),...["epub"].map(t=>[t,m.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,m.EXCEL]),...["flac"].map(t=>[t,m.FLAC]),...["gif"].map(t=>[t,m.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,m.GZIP]),...["html","htm","xhtml"].map(t=>[t,m.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(t=>[t,m.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,m.JPEG]),...["json"].map(t=>[t,m.JSON]),...["m4a","m4p"].map(t=>[t,m.M4A]),...["mov","qt"].map(t=>[t,m.MOV]),...["mp3"].map(t=>[t,m.MP3]),...["mp4","m4v"].map(t=>[t,m.MP4]),...["ogg","oga"].map(t=>[t,m.OGG]),...["pdf","ps"].map(t=>[t,m.PDF]),...["png"].map(t=>[t,m.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,m.POWERPOINT]),...["rar"].map(t=>[t,m.RAR]),...["stp"].map(t=>[t,m.STP]),...["txt","rtf","md","mdown"].map(t=>[t,m.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(t=>[t,m.VIDEO]),...["wav"].map(t=>[t,m.WAV]),...["wma"].map(t=>[t,m.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,m.WORD]),...["xml","xsl","rdf"].map(t=>[t,m.XML]),...["yaml","yml","x-yaml"].map(t=>[t,m.YAML]),...["zip"].map(t=>[t,m.ZIP])]);var dv={[m.ABW]:"#91ABC6",[m.AUDIO]:"#1795E3",[m.AVI]:"#E63324",[m.CHM]:"#71C3EB",[m.CODE]:"#71C3EB",[m.CSV]:"#1F7345",[m.DITA]:"#71C3EB",[m.EPUB]:"#85B926",[m.EXCEL]:"#1F7345",[m.FLAC]:"#1795E3",[m.GIF]:"#59B031",[m.GZIP]:"#F8AB36",[m.HTML]:"#71C3EB",[m.IMAGE]:"#59B031",[m.JPEG]:"#59B031",[m.JSON]:"#71C3EB",[m.M4A]:"#1795E3",[m.MOV]:"#E63324",[m.MP3]:"#1795E3",[m.MP4]:"#E63324",[m.OGG]:"#1795E3",[m.PDF]:"#E44948",[m.PNG]:"#59B031",[m.POWERPOINT]:"#B54A2B",[m.RAR]:"#F8AB36",[m.STP]:"#3764B1",[m.TEXT]:"#3162AB",[m.UNKNOWN]:"#999999",[m.VIDEO]:"#E63324",[m.WAV]:"#1795E3",[m.WMA]:"#1795E3",[m.WORD]:"#3162AB",[m.XML]:"#71C3EB",[m.YAML]:"#71C3EB",[m.ZIP]:"#F8AB36"};var Br=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},te=class extends Sc.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=$r.nothing}render(){let e=this.variant&&Object.values(je).includes(this.variant)?this.variant:je.fluid_topics,r=e!==je.material||!!this.value;return $r.html`
352
352
  <i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
353
- ${(0,Sc.unsafeHTML)(this.resolvedIcon)}
353
+ ${(0,Ac.unsafeHTML)(this.resolvedIcon)}
354
354
  <slot ?hidden=${r}></slot>
355
355
  </i>
356
- `}getTextContent(){var e,r;return(r=(e=this.slottedContent)===null||e===void 0?void 0:e.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}update(e){super.update(e),["value","variant"].some(r=>e.has(r))&&this.resolveIcon()}resolveIcon(){var e,r;let i=this.value||this.getTextContent();switch(this.variant){case Ve.file_format:this.resolvedIcon=(e=m[i.replace("-","_").toUpperCase()])!==null&&e!==void 0?e:i;break;case Ve.material:this.resolvedIcon=this.value||kr.nothing;break;default:this.resolvedIcon=(r=en[i.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:i;break}}firstUpdated(e){super.firstUpdated(e),setTimeout(()=>this.resolveIcon())}};te.elementDefinitions={};te.styles=vc;Ur([(0,lt.property)()],te.prototype,"variant",void 0);Ur([(0,lt.property)()],te.prototype,"value",void 0);Ur([(0,lt.property)({reflect:!0,attribute:"aria-hidden"})],te.prototype,"ariaHidden",void 0);Ur([(0,lt.state)()],te.prototype,"resolvedIcon",void 0);Ur([(0,lt.query)("slot")],te.prototype,"slottedContent",void 0);var _c=f(E());var Ac={"ft-icon":te};(0,_c.customElements)(Ac);var Br=f(L()),w=f(E());var ze=f(E());var Tc=f(L()),$r=f(E()),wt={color:$r.FtCssVariableFactory.extend("--ft-loader-color","",$r.designSystemVariables.colorPrimary),size:$r.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},Cc=Tc.css`
356
+ `}getTextContent(){var e,r;return(r=(e=this.slottedContent)===null||e===void 0?void 0:e.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}update(e){super.update(e),["value","variant"].some(r=>e.has(r))&&this.resolveIcon()}resolveIcon(){var e,r;let i=this.value||this.getTextContent();switch(this.variant){case je.file_format:this.resolvedIcon=(e=m[i.replace("-","_").toUpperCase()])!==null&&e!==void 0?e:i;break;case je.material:this.resolvedIcon=this.value||$r.nothing;break;default:this.resolvedIcon=(r=tn[i.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:i;break}}firstUpdated(e){super.firstUpdated(e),setTimeout(()=>this.resolveIcon())}};te.elementDefinitions={};te.styles=bc;Br([(0,lt.property)()],te.prototype,"variant",void 0);Br([(0,lt.property)()],te.prototype,"value",void 0);Br([(0,lt.property)({reflect:!0,attribute:"aria-hidden"})],te.prototype,"ariaHidden",void 0);Br([(0,lt.state)()],te.prototype,"resolvedIcon",void 0);Br([(0,lt.query)("slot")],te.prototype,"slottedContent",void 0);var Tc=f(E());var _c={"ft-icon":te};(0,Tc.customElements)(_c);var Hr=f(P()),w=f(E());var Ke=f(E());var Cc=f(P()),Fr=f(E()),Rt={color:Fr.FtCssVariableFactory.extend("--ft-loader-color","",Fr.designSystemVariables.colorPrimary),size:Fr.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},wc=Cc.css`
357
357
  :host {
358
358
  line-height: 0;
359
359
  }
@@ -362,8 +362,8 @@
362
362
  display: inline-block;
363
363
  position: relative;
364
364
 
365
- width: ${wt.size};
366
- height: ${wt.size};
365
+ width: ${Rt.size};
366
+ height: ${Rt.size};
367
367
  }
368
368
 
369
369
  .ft-loader div {
@@ -372,7 +372,7 @@
372
372
  width: 25%;
373
373
  height: 25%;
374
374
  border-radius: 50%;
375
- background: ${wt.color};
375
+ background: ${Rt.color};
376
376
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
377
377
  }
378
378
 
@@ -419,17 +419,17 @@
419
419
  transform: translate(0, 0);
420
420
  }
421
421
  100% {
422
- transform: translate(calc(0.35 * ${wt.size}), 0);
422
+ transform: translate(calc(0.35 * ${Rt.size}), 0);
423
423
  }
424
424
  }
425
- `;var wc=f(L()),Rc=f(E());var Rt=class extends Rc.FtLitElement{render(){return wc.html`
425
+ `;var Rc=f(P()),Oc=f(E());var Ot=class extends Oc.FtLitElement{render(){return Rc.html`
426
426
  <div class="ft-loader">
427
427
  <div></div>
428
428
  <div></div>
429
429
  <div></div>
430
430
  <div></div>
431
431
  </div>
432
- `}};Rt.styles=Cc;var Pc=f(E());var Oc={"ft-loader":Rt};(0,Pc.customElements)(Oc);var ct=f(L()),tn=f(er()),I=f(G());var tr=t=>t??K;var Ic=f(L()),T=f(E());var Lc=T.FtCssVariableFactory.extend("--ft-button-color","",T.designSystemVariables.colorPrimary),B={backgroundColor:T.FtCssVariableFactory.extend("--ft-button-background-color","",T.designSystemVariables.colorSurface),borderRadius:T.FtCssVariableFactory.extend("--ft-button-border-radius","",T.designSystemVariables.borderRadiusL),color:Lc,fontSize:T.FtCssVariableFactory.extend("--ft-button-font-size","",$e.fontSize),iconSize:T.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:T.FtCssVariableFactory.extend("--ft-button-ripple-color","",Lc),verticalPadding:T.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:T.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:T.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:T.FtCssVariableFactory.external(T.designSystemVariables.colorOpacityDisabled,"Design system")},Mc=T.FtCssVariableFactory.extend("--ft-button-primary-color","",T.FtCssVariableFactory.extend("--ft-button-color","",T.designSystemVariables.colorOnPrimary)),Oo={backgroundColor:T.FtCssVariableFactory.extend("--ft-button-primary-background-color","",T.FtCssVariableFactory.extend("--ft-button-background-color","",T.designSystemVariables.colorPrimary)),color:Mc,rippleColor:T.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",Mc)},je={borderRadius:T.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",T.FtCssVariableFactory.extend("--ft-button-border-radius","",T.designSystemVariables.borderRadiusM)),verticalPadding:T.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),horizontalPadding:T.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),iconPadding:T.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px")},Nc=Ic.css`
432
+ `}};Ot.styles=wc;var Pc=f(E());var Lc={"ft-loader":Ot};(0,Pc.customElements)(Lc);var ct=f(P()),rn=f(ir()),I=f(G());var nr=t=>t??K;var Nc=f(P()),T=f(E());var Mc=T.FtCssVariableFactory.extend("--ft-button-color","",T.designSystemVariables.colorPrimary),B={backgroundColor:T.FtCssVariableFactory.extend("--ft-button-background-color","",T.designSystemVariables.colorSurface),borderRadius:T.FtCssVariableFactory.extend("--ft-button-border-radius","",T.designSystemVariables.borderRadiusL),color:Mc,fontSize:T.FtCssVariableFactory.extend("--ft-button-font-size","",$e.fontSize),iconSize:T.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:T.FtCssVariableFactory.extend("--ft-button-ripple-color","",Mc),verticalPadding:T.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:T.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:T.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:T.FtCssVariableFactory.external(T.designSystemVariables.colorOpacityDisabled,"Design system")},Ic=T.FtCssVariableFactory.extend("--ft-button-primary-color","",T.FtCssVariableFactory.extend("--ft-button-color","",T.designSystemVariables.colorOnPrimary)),Lo={backgroundColor:T.FtCssVariableFactory.extend("--ft-button-primary-background-color","",T.FtCssVariableFactory.extend("--ft-button-background-color","",T.designSystemVariables.colorPrimary)),color:Ic,rippleColor:T.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",Ic)},ze={borderRadius:T.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",T.FtCssVariableFactory.extend("--ft-button-border-radius","",T.designSystemVariables.borderRadiusM)),verticalPadding:T.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),horizontalPadding:T.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),iconPadding:T.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px")},Dc=Nc.css`
433
433
  :host {
434
434
  display: inline-block;
435
435
  max-width: 100%;
@@ -492,13 +492,13 @@
492
492
  }
493
493
 
494
494
  .ft-button.ft-button--dense {
495
- padding: ${je.verticalPadding} ${je.horizontalPadding};
496
- border-radius: ${je.borderRadius};
497
- ${(0,T.setVariable)(ue.borderRadius,je.borderRadius)};
495
+ padding: ${ze.verticalPadding} ${ze.horizontalPadding};
496
+ border-radius: ${ze.borderRadius};
497
+ ${(0,T.setVariable)(ue.borderRadius,ze.borderRadius)};
498
498
  }
499
499
 
500
500
  .ft-button.ft-button--dense.ft-button--outlined {
501
- padding: calc(${je.verticalPadding} - 1px) calc(${je.horizontalPadding} - 1px);
501
+ padding: calc(${ze.verticalPadding} - 1px) calc(${ze.horizontalPadding} - 1px);
502
502
  }
503
503
 
504
504
  .ft-button:not([disabled]):hover {
@@ -510,7 +510,7 @@
510
510
  }
511
511
 
512
512
  .ft-button--round.ft-button--dense {
513
- border-radius: calc(var(--button-internal-line-height) / 2 + ${je.verticalPadding});
513
+ border-radius: calc(var(--button-internal-line-height) / 2 + ${ze.verticalPadding});
514
514
  }
515
515
 
516
516
  .ft-button[disabled] {
@@ -519,9 +519,9 @@
519
519
  }
520
520
 
521
521
  .ft-button.ft-button--primary {
522
- background-color: ${Oo.backgroundColor};
523
- --button-internal-color: ${Oo.color};
524
- ${(0,T.setVariable)(ue.color,Oo.rippleColor)};
522
+ background-color: ${Lo.backgroundColor};
523
+ --button-internal-color: ${Lo.color};
524
+ ${(0,T.setVariable)(ue.color,Lo.rippleColor)};
525
525
  }
526
526
 
527
527
  .ft-button--label {
@@ -536,7 +536,7 @@
536
536
  }
537
537
 
538
538
  .ft-button--dense .ft-button--label {
539
- margin: 0 ${je.iconPadding};
539
+ margin: 0 ${ze.iconPadding};
540
540
  }
541
541
 
542
542
  .ft-button--label.ft-button--label-no-text {
@@ -554,8 +554,8 @@
554
554
  }
555
555
 
556
556
  .ft-button--dense .ft-button--label[hidden] + [part="icon"] {
557
- margin: 0 calc(${je.horizontalPadding} * -1);
558
- padding: 0 ${je.verticalPadding};
557
+ margin: 0 calc(${ze.horizontalPadding} * -1);
558
+ padding: 0 ${ze.verticalPadding};
559
559
  }
560
560
 
561
561
  .ft-button:not(.ft-button--trailing-icon) [part="label"] {
@@ -563,10 +563,10 @@
563
563
  }
564
564
 
565
565
  ft-loader {
566
- ${(0,T.setVariable)(wt.size,B.iconSize)};
567
- ${(0,T.setVariable)(wt.color,"var(--button-internal-color)")};
566
+ ${(0,T.setVariable)(Rt.size,B.iconSize)};
567
+ ${(0,T.setVariable)(Rt.color,"var(--button-internal-color)")};
568
568
  }
569
- `;var k=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},R=class t extends(0,ze.toFtFormComponent)(ze.FtLitElement){get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}constructor(){super(),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1,this.disabled=!1,this.icon=void 0,this.trailingIcon=!1,this.type="button",this.href=void 0,this.target=void 0,this.loading=!1,this.ariaLabel=null,this.ariaHasPopup=null,this.ariaPressed=null,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.activated=!1,this.hasTextContent=!1,this.addEventListener("click",e=>{var r;this.isDisabled()?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.type=="submit"&&((r=this.form)===null||r===void 0||r.requestSubmit())})}render(){var e,r,i;let n={"ft-button--label":!0,"ft-safari-ellipsis-fix":ze.isSafari,"ft-button--label-no-text":!this.hasTextContent},o=ct.html`
569
+ `;var k=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},R=class t extends(0,Ke.toFtFormComponent)(Ke.FtLitElement){get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}constructor(){super(),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1,this.disabled=!1,this.icon=void 0,this.trailingIcon=!1,this.type="button",this.href=void 0,this.target=void 0,this.loading=!1,this.ariaLabel=null,this.ariaHasPopup=null,this.ariaPressed=null,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.activated=!1,this.hasTextContent=!1,this.addEventListener("click",e=>{var r;this.isDisabled()?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.type=="submit"&&((r=this.form)===null||r===void 0||r.requestSubmit())})}render(){var e,r,i;let n={"ft-button--label":!0,"ft-safari-ellipsis-fix":Ke.isSafari,"ft-button--label-no-text":!this.hasTextContent},o=ct.html`
570
570
  <ft-ripple part="ripple"
571
571
  ?disabled=${this.isDisabled()}
572
572
  ?activated=${this.activated}
@@ -574,7 +574,7 @@
574
574
  <ft-typography part="label"
575
575
  variant="${_e.button}"
576
576
  element="span"
577
- class="${(0,tn.classMap)(n)}">
577
+ class="${(0,rn.classMap)(n)}">
578
578
  <slot></slot>
579
579
  </ft-typography>
580
580
  ${this.resolveIcon()}
@@ -582,17 +582,17 @@
582
582
  <a href="${s}"
583
583
  target="${(e=this.target)!==null&&e!==void 0?e:"_self"}"
584
584
  part="button"
585
- class="${(0,tn.classMap)(this.buttonClasses)}"
586
- aria-label="${tr((r=this.ariaLabel)!==null&&r!==void 0?r:this.label)}"
585
+ class="${(0,rn.classMap)(this.buttonClasses)}"
586
+ aria-label="${nr((r=this.ariaLabel)!==null&&r!==void 0?r:this.label)}"
587
587
  ?disabled=${this.isDisabled()}>
588
588
  ${o}
589
589
  </a>
590
590
  `:ct.html`
591
591
  <button part="button"
592
- class="${(0,tn.classMap)(this.buttonClasses)}"
593
- aria-label="${tr((i=this.ariaLabel)!==null&&i!==void 0?i:this.label)}"
594
- aria-haspopup="${tr(this.ariaHasPopup)}"
595
- aria-pressed="${tr(this.ariaPressed)}"
592
+ class="${(0,rn.classMap)(this.buttonClasses)}"
593
+ aria-label="${nr((i=this.ariaLabel)!==null&&i!==void 0?i:this.label)}"
594
+ aria-haspopup="${nr(this.ariaHasPopup)}"
595
+ aria-pressed="${nr(this.ariaPressed)}"
596
596
  ?disabled=${this.isDisabled()}>
597
597
  ${o}
598
598
  </button>
@@ -607,7 +607,7 @@
607
607
  <ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
608
608
  `:ct.html`
609
609
  <slot part="icon" name="icon"></slot>
610
- `}focus(){var e;(e=this.button)===null||e===void 0||e.focus()}showTooltip(){var e;(e=this.tooltip)===null||e===void 0||e.show()}showTemporaryTooltip(e,r){var i;return(i=this.tooltip)===null||i===void 0?void 0:i.showTemporaryText(e,r)}setTooltipManual(e){this.tooltip&&(this.tooltip.manual=e)}click(){var e;(e=this.button)===null||e===void 0||e.click()}isDisabled(){return this.disabled||this.loading}contentAvailableCallback(e){super.contentAvailableCallback(e),this.labelContainer&&t.labelsObserver.observe(this.labelContainer)}disconnectedCallback(){super.disconnectedCallback(),this.labelContainer&&t.labelsObserver.unobserve(this.labelContainer)}};R.elementDefinitions={"ft-ripple":M,"ft-tooltip":z,"ft-icon":te,"ft-loader":Rt,"ft-typography":Z};R.styles=[ze.safariEllipsisFix,Nc,ze.noTextSelect];R.labelsObserver=new IntersectionObserver(t=>{for(let e of t){let r=e.target.getRootNode();r.host?r.host.hasTextContent=e.boundingClientRect.width>0:R.labelsObserver.unobserve(e.target)}});k([(0,I.property)({type:Boolean})],R.prototype,"primary",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"outlined",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"dense",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"round",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"disabled",void 0);k([(0,I.property)()],R.prototype,"icon",void 0);k([(0,I.property)()],R.prototype,"iconVariant",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"trailingIcon",void 0);k([(0,I.property)()],R.prototype,"label",void 0);k([(0,I.property)()],R.prototype,"type",void 0);k([(0,I.property)()],R.prototype,"href",void 0);k([(0,I.property)()],R.prototype,"target",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"loading",void 0);k([(0,I.property)({attribute:"aria-label"})],R.prototype,"ariaLabel",void 0);k([(0,I.property)()],R.prototype,"ariaHasPopup",void 0);k([(0,I.property)({attribute:"aria-pressed"})],R.prototype,"ariaPressed",void 0);k([(0,I.property)()],R.prototype,"tooltipPosition",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"hideTooltip",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"forceTooltip",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"activated",void 0);k([(0,I.query)(".ft-button")],R.prototype,"button",void 0);k([(0,I.query)(".ft-button--label")],R.prototype,"labelContainer",void 0);k([(0,I.state)()],R.prototype,"hasTextContent",void 0);k([(0,I.query)(".ft-button--label slot")],R.prototype,"slottedContent",void 0);k([(0,I.query)("[part=tooltip]")],R.prototype,"tooltip",void 0);var kc=f(E());var Dc={"ft-button":R};(0,kc.customElements)(Dc);var Uc=w.FtCssVariableFactory.extend("--ft-chip-color","",w.designSystemVariables.colorOnSurface),he={backgroundColor:w.FtCssVariableFactory.extend("--ft-chip-background-color","",w.designSystemVariables.colorSurface),color:Uc,fontSize:w.FtCssVariableFactory.extend("--ft-chip-font-size","",Te.fontSize),fontWeight:w.FtCssVariableFactory.extend("--ft-chip-font-weight","",Te.fontWeight),iconSize:w.FtCssVariableFactory.create("--ft-chip-icon-size","","SIZE","18px"),borderRadius:w.FtCssVariableFactory.create("--ft-chip-border-radius","","SIZE",""),rippleColor:w.FtCssVariableFactory.extend("--ft-chip-ripple-color","",Uc),horizontalPadding:w.FtCssVariableFactory.create("--ft-chip-horizontal-padding","","SIZE","6px"),verticalPadding:w.FtCssVariableFactory.create("--ft-chip-vertical-padding","","SIZE","6px"),borderColor:w.FtCssVariableFactory.extend("--ft-chip-border-color","",w.designSystemVariables.colorOutline),opacityDisabled:w.FtCssVariableFactory.external(w.designSystemVariables.colorOpacityDisabled,"Design system")},$c=w.FtCssVariableFactory.extend("--ft-chip-highlighted-color","",w.FtCssVariableFactory.extend("--ft-chip-color","",w.designSystemVariables.colorOnPrimary)),Po={backgroundColor:w.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color","",w.FtCssVariableFactory.extend("--ft-chip-background-color","",w.designSystemVariables.colorPrimary)),color:$c,rippleColor:w.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",$c)},Bc={horizontalPadding:w.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),verticalPadding:w.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","","SIZE","4px")},Hc=[w.noTextSelect,Br.css`
610
+ `}focus(){var e;(e=this.button)===null||e===void 0||e.focus()}showTooltip(){var e;(e=this.tooltip)===null||e===void 0||e.show()}showTemporaryTooltip(e,r){var i;return(i=this.tooltip)===null||i===void 0?void 0:i.showTemporaryText(e,r)}setTooltipManual(e){this.tooltip&&(this.tooltip.manual=e)}click(){var e;(e=this.button)===null||e===void 0||e.click()}isDisabled(){return this.disabled||this.loading}contentAvailableCallback(e){super.contentAvailableCallback(e),this.labelContainer&&t.labelsObserver.observe(this.labelContainer)}disconnectedCallback(){super.disconnectedCallback(),this.labelContainer&&t.labelsObserver.unobserve(this.labelContainer)}};R.elementDefinitions={"ft-ripple":M,"ft-tooltip":z,"ft-icon":te,"ft-loader":Ot,"ft-typography":Z};R.styles=[Ke.safariEllipsisFix,Dc,Ke.noTextSelect];R.labelsObserver=new IntersectionObserver(t=>{for(let e of t){let r=e.target.getRootNode();r.host?r.host.hasTextContent=e.boundingClientRect.width>0:R.labelsObserver.unobserve(e.target)}});k([(0,I.property)({type:Boolean})],R.prototype,"primary",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"outlined",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"dense",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"round",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"disabled",void 0);k([(0,I.property)()],R.prototype,"icon",void 0);k([(0,I.property)()],R.prototype,"iconVariant",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"trailingIcon",void 0);k([(0,I.property)()],R.prototype,"label",void 0);k([(0,I.property)()],R.prototype,"type",void 0);k([(0,I.property)()],R.prototype,"href",void 0);k([(0,I.property)()],R.prototype,"target",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"loading",void 0);k([(0,I.property)({attribute:"aria-label"})],R.prototype,"ariaLabel",void 0);k([(0,I.property)()],R.prototype,"ariaHasPopup",void 0);k([(0,I.property)({attribute:"aria-pressed"})],R.prototype,"ariaPressed",void 0);k([(0,I.property)()],R.prototype,"tooltipPosition",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"hideTooltip",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"forceTooltip",void 0);k([(0,I.property)({type:Boolean})],R.prototype,"activated",void 0);k([(0,I.query)(".ft-button")],R.prototype,"button",void 0);k([(0,I.query)(".ft-button--label")],R.prototype,"labelContainer",void 0);k([(0,I.state)()],R.prototype,"hasTextContent",void 0);k([(0,I.query)(".ft-button--label slot")],R.prototype,"slottedContent",void 0);k([(0,I.query)("[part=tooltip]")],R.prototype,"tooltip",void 0);var Uc=f(E());var kc={"ft-button":R};(0,Uc.customElements)(kc);var $c=w.FtCssVariableFactory.extend("--ft-chip-color","",w.designSystemVariables.colorOnSurface),he={backgroundColor:w.FtCssVariableFactory.extend("--ft-chip-background-color","",w.designSystemVariables.colorSurface),color:$c,fontSize:w.FtCssVariableFactory.extend("--ft-chip-font-size","",Te.fontSize),fontWeight:w.FtCssVariableFactory.extend("--ft-chip-font-weight","",Te.fontWeight),iconSize:w.FtCssVariableFactory.create("--ft-chip-icon-size","","SIZE","18px"),borderRadius:w.FtCssVariableFactory.create("--ft-chip-border-radius","","SIZE",""),rippleColor:w.FtCssVariableFactory.extend("--ft-chip-ripple-color","",$c),horizontalPadding:w.FtCssVariableFactory.create("--ft-chip-horizontal-padding","","SIZE","6px"),verticalPadding:w.FtCssVariableFactory.create("--ft-chip-vertical-padding","","SIZE","6px"),borderColor:w.FtCssVariableFactory.extend("--ft-chip-border-color","",w.designSystemVariables.colorOutline),opacityDisabled:w.FtCssVariableFactory.external(w.designSystemVariables.colorOpacityDisabled,"Design system")},Bc=w.FtCssVariableFactory.extend("--ft-chip-highlighted-color","",w.FtCssVariableFactory.extend("--ft-chip-color","",w.designSystemVariables.colorOnPrimary)),Po={backgroundColor:w.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color","",w.FtCssVariableFactory.extend("--ft-chip-background-color","",w.designSystemVariables.colorPrimary)),color:Bc,rippleColor:w.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",Bc)},Fc={horizontalPadding:w.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),verticalPadding:w.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","","SIZE","4px")},Hc=[w.noTextSelect,Hr.css`
611
611
  :host {
612
612
  display: inline-block;
613
613
  max-width: 100%;
@@ -635,7 +635,7 @@
635
635
  border: 1px solid ${he.borderColor};
636
636
  color: ${he.color};
637
637
  ${(0,w.setVariable)(ue.color,he.rippleColor)};
638
- border-radius: var(${(0,Br.unsafeCSS)(he.borderRadius.name)}, calc(var(--chip-internal-content-height) / 2 + var(--chip-internal-vertical-padding)));
638
+ border-radius: var(${(0,Hr.unsafeCSS)(he.borderRadius.name)}, calc(var(--chip-internal-content-height) / 2 + var(--chip-internal-vertical-padding)));
639
639
  padding: calc(var(--chip-internal-vertical-padding) - 1px) calc(var(--chip-internal-horizontal-padding) - 1px);
640
640
  background-color: ${he.backgroundColor};
641
641
  line-height: var(--chip-internal-content-height);
@@ -647,13 +647,13 @@
647
647
 
648
648
  .ft-chip--dense {
649
649
  --chip-internal-icon-padding: 3px;
650
- --chip-internal-vertical-padding: ${Bc.verticalPadding};
651
- --chip-internal-horizontal-padding: ${Bc.horizontalPadding};
650
+ --chip-internal-vertical-padding: ${Fc.verticalPadding};
651
+ --chip-internal-horizontal-padding: ${Fc.horizontalPadding};
652
652
  --chip-internal-line-height: max(16px, calc(var(--chip-internal-font-size) + 2px));
653
653
  }
654
654
 
655
655
  .ft-chip--no-content {
656
- --chip-internal-horizontal-padding: ${he.horizontalPadding.get(Br.css`var(--chip-internal-vertical-padding)`)};
656
+ --chip-internal-horizontal-padding: ${he.horizontalPadding.get(Hr.css`var(--chip-internal-vertical-padding)`)};
657
657
  }
658
658
 
659
659
  .ft-chip--disabled {
@@ -747,8 +747,8 @@
747
747
  .ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-button {
748
748
  order: -1;
749
749
  }
750
- `];var de=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},nn=class extends CustomEvent{constructor(){super("icon-click")}},H=class extends rr.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.iconLabel="",this.hideIconTooltip=!1,this.icon=void 0,this.trailingIcon=!1}render(){var e;let r={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":rr.isSafari};return rn.html`
751
- <div class="${(0,Fc.classMap)(r)}"
750
+ `];var de=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},on=class extends CustomEvent{constructor(){super("icon-click")}},F=class extends or.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.iconLabel="",this.hideIconTooltip=!1,this.icon=void 0,this.trailingIcon=!1}render(){var e;let r={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":or.isSafari};return nn.html`
751
+ <div class="${(0,Vc.classMap)(r)}"
752
752
  aria-label="${this.getLabel()}"
753
753
  tabindex="${this.interactionsOnChip?0:-1}"
754
754
  @keyup=${this.onKeyUp}
@@ -759,7 +759,7 @@
759
759
  </ft-typography>
760
760
  ${this.internalIcon?this.renderIcon():null}
761
761
  </div>
762
- `}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return this.interactionsOnIcon?rn.html`
762
+ `}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return this.interactionsOnIcon?nn.html`
763
763
  <ft-button round
764
764
  class="ft-chip--icon-button"
765
765
  @click=${this.onIconClick}
@@ -770,11 +770,11 @@
770
770
  part="icon-button"
771
771
  ?hideTooltip=${this.hideIconTooltip}
772
772
  ></ft-button>
773
- `:rn.html`
773
+ `:nn.html`
774
774
  <div class="ft-chip--icon-container ft-no-text-select" part="icon-container">
775
775
  <ft-icon .variant=${this.iconVariant} .value=${this.internalIcon} part="icon"></ft-icon>
776
776
  </div>
777
- `}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new nn))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new nn))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,rr.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};H.elementDefinitions={"ft-ripple":M,"ft-typography":Z,"ft-icon":te,"ft-button":R};H.styles=Hc;de([(0,re.property)({type:Boolean})],H.prototype,"highlighted",void 0);de([(0,re.property)({type:Boolean})],H.prototype,"removable",void 0);de([(0,re.property)({type:Boolean})],H.prototype,"disabled",void 0);de([(0,re.property)({type:Boolean})],H.prototype,"clickable",void 0);de([(0,re.property)({type:Boolean})],H.prototype,"iconClickable",void 0);de([(0,re.property)({type:Boolean})],H.prototype,"dense",void 0);de([(0,re.property)({type:Boolean})],H.prototype,"multiLine",void 0);de([(0,re.property)()],H.prototype,"label",void 0);de([(0,re.property)()],H.prototype,"iconLabel",void 0);de([(0,re.property)({type:Boolean})],H.prototype,"hideIconTooltip",void 0);de([(0,re.property)()],H.prototype,"icon",void 0);de([(0,re.property)()],H.prototype,"iconVariant",void 0);de([(0,re.property)({type:Boolean})],H.prototype,"trailingIcon",void 0);de([(0,re.property)()],H.prototype,"typographyVariant",void 0);de([(0,re.query)("ft-typography slot")],H.prototype,"slottedContent",void 0);var jc=f(E());var Vc={"ft-chip":H};(0,jc.customElements)(Vc);var Yc=f(L()),q=f(G()),or=f(E());var Xc=f(er());var Hr=f(L()),nr=f(G()),an=f(E());var zc=f(L()),on=f(E()),np={iconColor:on.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",on.designSystemVariables.colorOnSurfaceMedium)},Kc=zc.css`
777
+ `}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new on))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new on))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,or.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};F.elementDefinitions={"ft-ripple":M,"ft-typography":Z,"ft-icon":te,"ft-button":R};F.styles=Hc;de([(0,re.property)({type:Boolean})],F.prototype,"highlighted",void 0);de([(0,re.property)({type:Boolean})],F.prototype,"removable",void 0);de([(0,re.property)({type:Boolean})],F.prototype,"disabled",void 0);de([(0,re.property)({type:Boolean})],F.prototype,"clickable",void 0);de([(0,re.property)({type:Boolean})],F.prototype,"iconClickable",void 0);de([(0,re.property)({type:Boolean})],F.prototype,"dense",void 0);de([(0,re.property)({type:Boolean})],F.prototype,"multiLine",void 0);de([(0,re.property)()],F.prototype,"label",void 0);de([(0,re.property)()],F.prototype,"iconLabel",void 0);de([(0,re.property)({type:Boolean})],F.prototype,"hideIconTooltip",void 0);de([(0,re.property)()],F.prototype,"icon",void 0);de([(0,re.property)()],F.prototype,"iconVariant",void 0);de([(0,re.property)({type:Boolean})],F.prototype,"trailingIcon",void 0);de([(0,re.property)()],F.prototype,"typographyVariant",void 0);de([(0,re.query)("ft-typography slot")],F.prototype,"slottedContent",void 0);var zc=f(E());var jc={"ft-chip":F};(0,zc.customElements)(jc);var Xc=f(P()),q=f(G()),lr=f(E());var Qc=f(ir());var Vr=f(P()),ar=f(G()),ln=f(E());var Kc=f(P()),sn=f(E()),op={iconColor:sn.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",sn.designSystemVariables.colorOnSurfaceMedium)},Wc=Kc.css`
778
778
  .ft-floating-menu-item {
779
779
  cursor: pointer;
780
780
  display: flex;
@@ -794,7 +794,7 @@
794
794
  }
795
795
 
796
796
  .ft-floating-menu-item ft-icon {
797
- color: ${np.iconColor};
797
+ color: ${op.iconColor};
798
798
  margin-left: 0;
799
799
  flex-shrink: 0;
800
800
  flex-grow: 0;
@@ -809,8 +809,8 @@
809
809
  word-break: break-word;
810
810
  hyphens: auto;
811
811
  }
812
- `;var Wc=f(er()),ir=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},sn=class extends CustomEvent{constructor(e){super("ft-floating-menu-item-select",{detail:e,bubbles:!0,composed:!0})}},oe=class extends an.FtLitElement{constructor(){super(...arguments),this.value="",this.notFocusable=!1,this.disabled=!1}get floatingClasses(){return{"ft-floating-menu-item":!0,"ft-floating-menu-item--disabled":this.disabled}}render(){return Hr.html`
813
- <div class="${(0,Wc.classMap)(this.floatingClasses)}"
812
+ `;var Gc=f(ir()),sr=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},an=class extends CustomEvent{constructor(e){super("ft-floating-menu-item-select",{detail:e,bubbles:!0,composed:!0})}},oe=class extends ln.FtLitElement{constructor(){super(...arguments),this.value="",this.notFocusable=!1,this.disabled=!1}get floatingClasses(){return{"ft-floating-menu-item":!0,"ft-floating-menu-item--disabled":this.disabled}}render(){return Vr.html`
813
+ <div class="${(0,Gc.classMap)(this.floatingClasses)}"
814
814
  tabindex="${this.notFocusable||this.disabled?"-1":"0"}"
815
815
  aria-disabled="${this.disabled}"
816
816
  @keydown=${e=>this.onKeyDown(e)}
@@ -818,14 +818,14 @@
818
818
  <ft-ripple
819
819
  ?disabled=${this.disabled}
820
820
  ></ft-ripple>
821
- ${this.icon?Hr.html`
821
+ ${this.icon?Vr.html`
822
822
  <ft-icon .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
823
- `:Hr.nothing}
823
+ `:Vr.nothing}
824
824
  <ft-typography variant="${_e.body2}">
825
825
  <slot></slot>
826
826
  </ft-typography>
827
827
  </div>
828
- `}onClick(e){this.disabled?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.dispatchEvent(new sn(this.value))}onKeyDown(e){(e.key=="Enter"||e.key==" ")&&(e.preventDefault(),this.dispatchEvent(new sn(this.value)))}};oe.elementDefinitions={"ft-icon":te,"ft-ripple":M,"ft-typography":Z};oe.styles=Kc;ir([(0,nr.property)()],oe.prototype,"iconVariant",void 0);ir([(0,nr.property)()],oe.prototype,"icon",void 0);ir([(0,nr.property)()],oe.prototype,"value",void 0);ir([(0,nr.property)({type:Boolean})],oe.prototype,"notFocusable",void 0);ir([(0,nr.property)({type:Boolean})],oe.prototype,"disabled",void 0);ir([(0,an.ignoreComposingEvents)()],oe.prototype,"onKeyDown",null);var Gc=f(L()),Ee=f(E()),ut={zIndex:Ee.FtCssVariableFactory.create("--ft-floating-menu-z-index","","NUMBER","8"),maxWidth:Ee.FtCssVariableFactory.create("--ft-floating-menu-max-width","","SIZE","300px"),maxHeight:Ee.FtCssVariableFactory.create("--ft-floating-menu-max-height","","SIZE","500px"),textColor:Ee.FtCssVariableFactory.extend("--ft-floating-menu-text-color","",Ee.designSystemVariables.colorOnSurfaceHigh),colorSurface:Ee.FtCssVariableFactory.external(Ee.designSystemVariables.colorSurface,"Design system"),menuElevation:Ee.FtCssVariableFactory.external(Ee.designSystemVariables.elevation02,"Design system"),borderRadiusS:Ee.FtCssVariableFactory.external(Ee.designSystemVariables.borderRadiusS,"Design system")},qc=Gc.css`
828
+ `}onClick(e){this.disabled?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.dispatchEvent(new an(this.value))}onKeyDown(e){(e.key=="Enter"||e.key==" ")&&(e.preventDefault(),this.dispatchEvent(new an(this.value)))}};oe.elementDefinitions={"ft-icon":te,"ft-ripple":M,"ft-typography":Z};oe.styles=Wc;sr([(0,ar.property)()],oe.prototype,"iconVariant",void 0);sr([(0,ar.property)()],oe.prototype,"icon",void 0);sr([(0,ar.property)()],oe.prototype,"value",void 0);sr([(0,ar.property)({type:Boolean})],oe.prototype,"notFocusable",void 0);sr([(0,ar.property)({type:Boolean})],oe.prototype,"disabled",void 0);sr([(0,ln.ignoreComposingEvents)()],oe.prototype,"onKeyDown",null);var qc=f(P()),Ee=f(E()),ut={zIndex:Ee.FtCssVariableFactory.create("--ft-floating-menu-z-index","","NUMBER","8"),maxWidth:Ee.FtCssVariableFactory.create("--ft-floating-menu-max-width","","SIZE","300px"),maxHeight:Ee.FtCssVariableFactory.create("--ft-floating-menu-max-height","","SIZE","500px"),textColor:Ee.FtCssVariableFactory.extend("--ft-floating-menu-text-color","",Ee.designSystemVariables.colorOnSurfaceHigh),colorSurface:Ee.FtCssVariableFactory.external(Ee.designSystemVariables.colorSurface,"Design system"),menuElevation:Ee.FtCssVariableFactory.external(Ee.designSystemVariables.elevation02,"Design system"),borderRadiusS:Ee.FtCssVariableFactory.external(Ee.designSystemVariables.borderRadiusS,"Design system")},Yc=qc.css`
829
829
  .ft-floating-menu {
830
830
  color: ${ut.textColor};
831
831
  display: contents;
@@ -856,8 +856,8 @@
856
856
  .ft-floating-menu--open .ft-floating-menu--options {
857
857
  display: block;
858
858
  }
859
- `;var se=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},ln=class extends CustomEvent{constructor(e){super("change",{detail:{open:e}})}};var cn=class extends CustomEvent{constructor(e){super("select",{detail:e})}},$=class extends or.FtLitElement{constructor(){super(...arguments),this.horizontalAlignment="left",this.verticalAlignment="bottom",this.closeMenuMatchers=[],this.primary=!1,this.icon="SHORTCUT_MENU",this.iconVariant=Ve.fluid_topics,this.disabled=!1,this.menuOpen=!1,this.forceMenuOpen=!1,this.hideOptionsOnClickOutside=e=>{this.menuOpen=this.menuOpen&&e.composedPath().includes(this.container)}}updated(e){super.updated(e),e.has("menuOpen")&&this.dispatchEvent(new ln(this.menuOpen))}render(){let e={"ft-floating-menu":!0,"ft-floating-menu--open":this.forceMenuOpen||this.menuOpen,["ft-floating-menu--"+this.horizontalAlignment.toLowerCase()]:!0,["ft-floating-menu--"+this.verticalAlignment.toLowerCase()]:!0};return Yc.html`
860
- <div part="container" class="${(0,Xc.classMap)(e)}" @keydown=${this.onKeyDown}>
859
+ `;var se=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},cn=class extends CustomEvent{constructor(e){super("change",{detail:{open:e}})}};var un=class extends CustomEvent{constructor(e){super("select",{detail:e})}},$=class extends lr.FtLitElement{constructor(){super(...arguments),this.horizontalAlignment="left",this.verticalAlignment="bottom",this.closeMenuMatchers=[],this.primary=!1,this.icon="SHORTCUT_MENU",this.iconVariant=je.fluid_topics,this.disabled=!1,this.menuOpen=!1,this.forceMenuOpen=!1,this.hideOptionsOnClickOutside=e=>{this.menuOpen=this.menuOpen&&e.composedPath().includes(this.container)}}updated(e){super.updated(e),e.has("menuOpen")&&this.dispatchEvent(new cn(this.menuOpen))}render(){let e={"ft-floating-menu":!0,"ft-floating-menu--open":this.forceMenuOpen||this.menuOpen,["ft-floating-menu--"+this.horizontalAlignment.toLowerCase()]:!0,["ft-floating-menu--"+this.verticalAlignment.toLowerCase()]:!0};return Xc.html`
860
+ <div part="container" class="${(0,Qc.classMap)(e)}" @keydown=${this.onKeyDown}>
861
861
  <slot name="toggle"
862
862
  part="toggle"
863
863
  @click=${this.toggleMenu}
@@ -887,7 +887,7 @@
887
887
  </div>
888
888
  </div>
889
889
  </div>
890
- `}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new cn(e.detail)),this.closeMenu()}onContentClick(e){(0,or.eventPathContainsMatchingElement)(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:r,y:i}=await ii(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${r}px`,this.menuWrapper.style.top=`${i}px`,this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.key=="Escape"&&(this.closeMenu(),e.stopPropagation())}};$.elementDefinitions={"ft-floating-menu-item":oe,"ft-button":R};$.styles=qc;se([(0,q.property)()],$.prototype,"horizontalAlignment",void 0);se([(0,q.property)()],$.prototype,"verticalAlignment",void 0);se([(0,or.jsonProperty)([])],$.prototype,"closeMenuMatchers",void 0);se([(0,q.property)({type:Boolean})],$.prototype,"primary",void 0);se([(0,q.property)()],$.prototype,"label",void 0);se([(0,q.property)()],$.prototype,"tooltipPosition",void 0);se([(0,q.property)()],$.prototype,"icon",void 0);se([(0,q.property)()],$.prototype,"iconVariant",void 0);se([(0,q.property)()],$.prototype,"text",void 0);se([(0,q.property)({type:Boolean})],$.prototype,"disabled",void 0);se([(0,q.state)()],$.prototype,"menuOpen",void 0);se([(0,q.state)()],$.prototype,"forceMenuOpen",void 0);se([(0,q.query)(".ft-floating-menu")],$.prototype,"container",void 0);se([(0,q.query)(".ft-floating-menu--wrapper")],$.prototype,"menuWrapper",void 0);se([(0,q.query)("#actions-button")],$.prototype,"actionButton",void 0);se([(0,q.queryAssignedElements)({slot:"toggle"})],$.prototype,"customToggle",void 0);var Qc=f(L()),un=f(E()),op={color:un.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",un.designSystemVariables.colorOnSurfaceMedium)},Zc=Qc.css`
890
+ `}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new un(e.detail)),this.closeMenu()}onContentClick(e){(0,lr.eventPathContainsMatchingElement)(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:r,y:i}=await oi(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${r}px`,this.menuWrapper.style.top=`${i}px`,this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.key=="Escape"&&(this.closeMenu(),e.stopPropagation())}};$.elementDefinitions={"ft-floating-menu-item":oe,"ft-button":R};$.styles=Yc;se([(0,q.property)()],$.prototype,"horizontalAlignment",void 0);se([(0,q.property)()],$.prototype,"verticalAlignment",void 0);se([(0,lr.jsonProperty)([])],$.prototype,"closeMenuMatchers",void 0);se([(0,q.property)({type:Boolean})],$.prototype,"primary",void 0);se([(0,q.property)()],$.prototype,"label",void 0);se([(0,q.property)()],$.prototype,"tooltipPosition",void 0);se([(0,q.property)()],$.prototype,"icon",void 0);se([(0,q.property)()],$.prototype,"iconVariant",void 0);se([(0,q.property)()],$.prototype,"text",void 0);se([(0,q.property)({type:Boolean})],$.prototype,"disabled",void 0);se([(0,q.state)()],$.prototype,"menuOpen",void 0);se([(0,q.state)()],$.prototype,"forceMenuOpen",void 0);se([(0,q.query)(".ft-floating-menu")],$.prototype,"container",void 0);se([(0,q.query)(".ft-floating-menu--wrapper")],$.prototype,"menuWrapper",void 0);se([(0,q.query)("#actions-button")],$.prototype,"actionButton",void 0);se([(0,q.queryAssignedElements)({slot:"toggle"})],$.prototype,"customToggle",void 0);var Zc=f(P()),dn=f(E()),sp={color:dn.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",dn.designSystemVariables.colorOnSurfaceMedium)},Jc=Zc.css`
891
891
  .ft-floating-menu-label {
892
892
  padding: 4px 8px;
893
893
  }
@@ -898,23 +898,23 @@
898
898
  width: max-content;
899
899
  text-overflow: ellipsis;
900
900
  overflow: hidden;
901
- color: ${op.color}
901
+ color: ${sp.color}
902
902
  }
903
- `;var Jc=f(L()),eu=f(E());var dt=class extends eu.FtLitElement{render(){return Jc.html`
903
+ `;var eu=f(P()),tu=f(E());var dt=class extends tu.FtLitElement{render(){return eu.html`
904
904
  <div class="ft-floating-menu-label">
905
905
  <ft-typography variant="${_e.caption}">
906
906
  <slot></slot>
907
907
  </ft-typography>
908
908
  </div>
909
- `}};dt.elementDefinitions={"ft-typography":Z};dt.styles=Zc;var ru=f(E());var tu={"ft-floating-menu":$,"ft-floating-menu-item":oe,"ft-floating-menu-label":dt};(0,ru.customElements)(tu);var Fr=f(E());function sp(t){var e;return((e=(0,Fr.accessResult)(t))===null||e===void 0?void 0:e.openMode)===Di.EXTERNAL}function Lo(t){return sp(t)?(0,Fr.accessResult)(t).originUrl:(0,Fr.accessResultUrl)(t)}var du=f(nu());var Mo=Xi.build("designedReaderMapMetadata");var ou=f(L());var su=ou.css`
910
- `;var Vr=f(L()),Ot=f(G()),Q=f(E());var me=f(E());var au=f(E()),ap={setTranslationDestinationLanguage:(t,e)=>{t.translation.destinationLanguage=e.payload},setTranslationSourceLanguage:(t,e)=>{t.translation.sourceLanguage=e.payload},setTranslationProfileId:(t,e)=>{t.translation.profileId=e.payload},setTranslationLoading:(t,e)=>{t.translation.isLoading=e.payload},setTranslationError:(t,e)=>{t.translation.isError=e.payload},setTopicsRating:(t,e)=>{for(let r in e.payload)t.topicsRating[r]=e.payload[r]}},lu=t=>au.FtReduxStore.get({name:"ft-reader-"+t,initialState:{mapId:void 0,renderedTopics:[],visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0,mapRating:void 0,topicsRating:{},translation:{sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1},linkPreviewDialogId:void 0},reducers:ap});var Io=class{constructor(e,r){this.mapId=e,this.paginatedToc=r,this.nodeByTocId={},this.nodeByUrl={},this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId,translationError:this.paginatedToc.translationError}}extractPagesToc(e,r,i){return e.flatMap(n=>{var o;return n.pageConfiguration&&this.registerPage(this.buildPage(n,i)),n.tocId==null?this.extractPagesToc(n.children,r,i):[{tocId:n.tocId,title:(o=n.title)!==null&&o!==void 0?o:"",untranslatedTitle:n.untranslatedTitle,depth:r,children:this.extractPagesToc(n.children,r+1,n.tocId)}]})}convertNodes(e,r,i){return e.flatMap(n=>{var o,s,a;if(n.tocId==null)return[...this.convertSectionNodes((o=n.pageToc)!==null&&o!==void 0?o:[],r,n.tocId),...this.convertNodes(n.children,r,n.tocId)];let l=(s=n.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),c={tocId:n.tocId,contentId:n.contentId,title:n.title,untranslatedTitle:n.untranslatedTitle,hasRating:n.hasRating,origin:n.origin,prettyUrl:l,depth:r,parentTocId:i,children:[]};this.register(c);let u=this.convertSectionNodes((a=n.pageToc)!==null&&a!==void 0?a:[],r+1,n.tocId),d=this.convertNodes(n.children,r+1,c.tocId);return c.children=[...u,...d],[c]})}convertSectionNodes(e,r,i){return e.flatMap(n=>{var o;let s=(o=n.prettyUrl)===null||o===void 0?void 0:o.replace(/^\//,""),a={...n,prettyUrl:s,depth:r,parentTocId:i,children:[]};return this.register(a),a.children=this.convertSectionNodes(n.children,r+1,n.tocId),[a]})}buildPage(e,r){var i,n,o,s,a,l,c,u;let d=(i=e.tocId)!==null&&i!==void 0?i:(o=(n=e.pageToc)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.tocId,p={number:this.pages.length+1,title:(s=e.title)!==null&&s!==void 0?s:"",untranslatedTitle:e.untranslatedTitle,rootTocId:d??"root",toc:((a=e.pageToc)!==null&&a!==void 0?a:[]).map(y=>this.nodeByTocId[y.tocId]),topics:[],hiddenTopics:[],rootDepth:d?this.nodeByTocId[d].depth:1,breadcrumb:r?this.buildBreadcrumb(this.nodeByTocId[r]):[]},h=(y,_)=>(_?p.topics:p.hiddenTopics).push(y),v=(c=(l=e.pageConfiguration)===null||l===void 0?void 0:l.parentsVisibility)!==null&&c!==void 0?c:[];p.breadcrumb.forEach((y,_)=>{h(y,v[_])}),e.tocId&&h(e.tocId,e.pageConfiguration.isVisible),p.topics.push(...this.tocIds((u=e.pageToc)!==null&&u!==void 0?u:[]));let A=this.resolveOverridenRootTocIdByParentForcedByPagination(p.breadcrumb,v);return p.rootTocId=A??p.rootTocId,p.rootDepth=A?this.nodeByTocId[A].depth:p.rootDepth,p}resolveOverridenRootTocIdByParentForcedByPagination(e,r){for(let i=0;i<e.length;i++)if(r[i])return e[i]}registerPage(e){for(let r of[...e.topics,...e.hiddenTopics])this.pageByTocId[r]||(this.pageByTocId[r]=e);this.pages.push(e)}tocIds(e){return e.flatMap(r=>[r.tocId,...this.tocIds(r.children)])}buildBreadcrumb(e){let r=[e.tocId];for(;e?.parentTocId;)r.unshift(e.parentTocId),e=this.nodeByTocId[e.parentTocId];return r}register(e){e.prettyUrl&&(this.nodeByUrl[e.prettyUrl]==null?this.nodeByUrl[e.prettyUrl]=e:this.duplicatedPrettyUrls.add(e.prettyUrl)),this.nodeByUrl[`${this.mapId}/${e.tocId}`]=e,this.nodeByTocId[e.tocId]=e}},dn=class{convertPaginatedToc(e,r){return new Io(e,r).build()}};var pn=class extends ne{get mapId(){return this._mapId}set mapId(e){e!==this._mapId&&this.clear(),this._mapId=e}constructor(e,r,i){super(!1,r),this.converter=e,this._mapId=i,this.initCache()}async withMapId(e){return this._mapId?e(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(e=>this.fetchMap(e))),this.cache.register("enrichedToc",()=>this.withMapId(e=>this.fetchPages(e).then(r=>this.converter.convertPaginatedToc(e,r)))),this.cache.register("ratingSummary",()=>{var e,r;return Ze((r=(e=b.getState().session)===null||e===void 0?void 0:e.profile.roles)!==null&&r!==void 0?r:[],"RATING_USER")?this.withMapId(n=>this.fetchMapRating(n)):Promise.resolve()})}clear(){this.cache.clearMatching(e=>e!=="configuration")}makeCacheKey(e,r){return e+(r?"-destinationLanguage-"+r?.destinationLanguage:"")}getMap(e){return this.cache.get(this.makeCacheKey("map",e),()=>this.fetchMap(this.mapId,e))}getMapNow(e){return this.cache.getNow(this.makeCacheKey("map",e))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(e){return this.cache.get(this.makeCacheKey("enrichedToc",e),()=>this.fetchPages(this.mapId,e).then(r=>this.converter.convertPaginatedToc(this.mapId,r)))}getEnrichedTocNow(e){return this.cache.getNow(this.makeCacheKey("enrichedToc",e))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(e){return(await this.getEnrichedToc(e)).toc}async getPagesToc(e){return(await this.getEnrichedToc(e)).pagesToc}async getTranslationError(e){return(await this.getEnrichedToc(e)).translationError}async getTocNode(e,r){return(await this.getEnrichedToc(r)).nodeByTocId[e]}getTocNodeNow(e,r){var i;return(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.nodeByTocId[e]}getTocNodeNowByUrl(e,r){var i,n;let o=this.getMapNow(r);return o?.prettyUrl==e||`${o?.id}/root`===e?(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.toc[0]:(n=this.getEnrichedTocNow(r))===null||n===void 0?void 0:n.nodeByUrl[e]}async getPage(e,r){let i=await this.getEnrichedToc(r);return i.pages[e-1]||i.pages[0]}async getPageByTocId(e,r){let i=await this.getEnrichedToc(r);return i.pageByTocId[e]||i.pages[0]}getTopicInfo(e){return this.cache.get("topic-"+e.tocId,()=>this.fetchTopicMetadata(e))}getTopicContent(e){return this.cache.get("topic-content-"+e.tocId,()=>this.fetchTopicHTMLContent(e))}getTranslatedTopicContent(e,r){return this.cache.get(this.makeCacheKey("translated-topic-content-"+e.tocId,r),()=>this.fetchTranslatedTopicHTMLContent(e,r))}async getTopicMetadataValue(e,r){let i=this.getTocNodeNow(e);if(!i)return;let n=await this.getTopicInfo(i);return n?.metadata.find(o=>o.key==r)}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}clearMapAttachments(){this.cache.clear("map-attachments")}getRelativesForDocument(e,r){return this.cache.get("document-relatives-"+e+"-"+r.join("-"),()=>this.fetchRelativesForDocument(e,r))}getRelativesForTopicInMap(e,r,i){return this.cache.get("topic-relatives-"+[e,r,...i].join("-"),()=>this.fetchRelativesForTopicInMap(e,r,i))}getAttachmentDownloadLink(e){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(e).content}?download=true&locationValue=reader`)}getLink(e,r,i){let n=this.getNavigationData(e,r,i),o=this.getReaderLinkPrefix()+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),s=new URL(o,this.api.tenantBaseUrl);return n.page!=null&&s.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&s.searchParams.set("tocId",n.tocId),n.section!=null&&s.searchParams.set("section",n.section),s.href}getNavigationData(e,r,i,n){var o,s;e=e||"root";let a=this.getEnrichedTocNow(n),l=a?.pageByTocId[e],c=a?.nodeByTocId[e],u=c?.prettyUrl;return{mapId:this.mapId,tocId:e,topicTitle:(o=c?.title)!==null&&o!==void 0?o:"",untranslatedTopicTitle:c?.untranslatedTitle,page:r&&l&&l.number!==r?r:void 0,prettyUrl:u?.replace(/^r\//,""),prettyUrlDuplicated:(s=a?.duplicatedPrettyUrls.has(u??""))!==null&&s!==void 0?s:!1,section:i}}async getAccurateNavigationData(e,r,i,n){return await this.getEnrichedToc(n),this.getNavigationData(e,r,i,n)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(e=>e?.publication)}getTopicRating(e){return this.getRatingSummary().then(r=>{var i;return r?{type:r.topics.type,rating:(i=r.topics)===null||i===void 0?void 0:i.ratings.find(n=>n.tocId===e)}:void 0})}rateMap(e,r){return this.makeRateMapRequest(e,r).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(e,r){return this.makeMapFeedbackRequest(e,r)}rateTopic(e,r,i){return this.makeRateTopicRequest(e,r,i).then(()=>this.clearRatingIfNecessary())}unrateTopic(e){return this.makeUnrateTopicRequest(e).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let e=b.getState().session;e?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(e,r,i){return this.makeTopicFeedbackRequest(e,r,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(e,r){let i=this.getTocNodeNow(e,r),n=[{tocId:i.tocId,title:i.title,untranslatedTitle:i.untranslatedTitle}],o=this.getTocNodeNow(i.parentTocId,r);for(;o;)n.unshift({tocId:o.tocId,title:o.title,untranslatedTitle:o.untranslatedTitle}),o=this.getTocNodeNow(o.parentTocId,r);return n}isFeatureAccessible(e,{session:r}){var i;if(!this.isFeatureAvailable(e))return!1;switch(e){case Ke.FEEDBACK:return Ze(r??[],N.FEEDBACK_USER);case Ke.RATING:return Ze(r??[],N.RATING_USER);case Ke.PRINT:return Ze(r??[],N.PRINT_USER);case Ke.BOOKMARK:return!!r?.sessionAuthenticated;case Ke.COLLECTIONS:return Ze(r??[],N.COLLECTION_USER);case Ke.PERSONAL_BOOKS:return Ze(r??[],N.PERSONAL_BOOK_USER)&&!(!((i=this.getMapNow())===null||i===void 0)&&i.pbkConfidential);default:return!1}}makeAbsolute(e){return this.api.makeAbsolute(e)}};var fn=class t extends pn{static async build(e){return new t(new dn,void 0,e)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(e,r){let i=await this.api.getMap(e,r);return this.fingerprint=i.fingerprint,i}fetchMapRating(e){return this.api.getMapRating(e)}async fetchPages(e,r){return await this.getMap(r),this.api.getPages(e,this.fingerprint,r)}fetchTopicHTMLContent(e){return this.api.getTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(e,r){return this.api.getTranslatedTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint,r)}fetchTopicMetadata(e){return this.api.getTopic(this.mapId,e.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(e,r){let i={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:e,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(i)}fetchRelativesForTopicInMap(e,r,i){let n={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:r,valueFilter:{negative:!1,values:i}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[e]}}],sort:[],facets:[]};return this.api.search(n)}makeMapFeedbackRequest(e,r){return this.api.sendMapFeedback(this.mapId,e,r)}makeRateMapRequest(e,r){return this.api.rateMap(this.mapId,e,r)}makeRateTopicRequest(e,r,i){return this.api.rateTopic(this.mapId,e,r,i)}makeTopicFeedbackRequest(e,r,i){return this.api.sendTopicFeedback(this.mapId,e,r,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(e){return this.api.unrateTopic(this.mapId,e)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(e){return!0}};var lp="topicPivot";function hn(t,e){let r=new URL(t);return e?.values.forEach(i=>{r.searchParams.append(lp,i)}),r.href}var mn=class t{static build(e,r){return new t(lu(e.trim()||"context"),r??fn.build)}loaded(){return(0,me.waitUntil)(()=>this._loaded)}constructor(e,r,i,n){this.store=e,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new me.Debouncer(10),this.analyticsEventsService=n??new ji,this.initService(r)}async initService(e){return this.service=await e(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(e){e!==this.store.getState().mapId&&(this.store.actions.mapId(e),this.service&&(this.service.mapId=e),await this.reload())}setRenderedTopics(e){this.store.actions.renderedTopics(e)}setVisibleTopics(e){this.store.actions.visibleTopics(e)}async awaitService(){return(0,me.waitFor)(()=>this.service)}async navigateToTopic(e,r,i){await this.loaded();let n=await this.awaitService(),o=await(i!=null?n.getPage(i,this.getTranslationSettings()):n.getPageByTocId(e??"root",this.getTranslationSettings()));this.store.actions.currentPage(o);let s=this.resolveValidNonRootTocId(e,o);this.store.actions.scrollTarget({tocId:s,section:r}),this.store.getState().visibleTopics[0]!==s&&this.store.actions.visibleTopics([])}resolveValidNonRootTocId(e,r){var i,n,o;let s=(i=e==="root"?void 0:e)!==null&&i!==void 0?i:r.rootTocId;return r.topics.includes(s)?s:(e!="root"&&!r.hiddenTopics.includes(s)&&this.store.dispatchEvent(new CustomEvent(et.requestedTopicNotFound,{detail:{tocId:s}})),(o=(n=r.topics[0])!==null&&n!==void 0?n:r.hiddenTopics[0])!==null&&o!==void 0?o:"root")}async navigateToPage(e){await this.loaded();let i=await(await this.awaitService()).getPage(e,this.getTranslationSettings());this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var e;!((e=this.service)===null||e===void 0)&&e.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}clear(){var e;this._loaded=!1,this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),this.store.actions.renderedTopics([]),this.store.actions.visibleTopics([]),this.store.actions.translation({sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1}),this.store.actions.mapRating(void 0),(e=this.service)===null||e===void 0||e.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(e){var r,i,n,o,s;try{e&&this.setTranslationLoading(!0);let a=l=>{throw e&&this.setTranslationError(!0),l};await Promise.all([this.loadConfiguration(),(r=this.service)===null||r===void 0?void 0:r.getMap(e).then(l=>this.store.actions.map(l)).catch(a),(i=this.service)===null||i===void 0?void 0:i.getToc(e).then(l=>this.store.actions.toc(l)).catch(a),(n=this.service)===null||n===void 0?void 0:n.getPagesToc(e).then(l=>this.store.actions.pagesToc(l)).catch(a),(o=this.service)===null||o===void 0?void 0:o.getPaginationConfiguration().then(l=>this.store.actions.paginationConfiguration(l)).catch(a),(s=this.service)===null||s===void 0?void 0:s.getTranslationError(e).then(l=>this.setTranslationError(l))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,e&&this.setTranslationLoading(!1)}catch(a){this.errorHandler&&!(a instanceof me.CanceledPromiseError)&&this.errorHandler(a)}}loadConfiguration(){var e;return(e=this.service)===null||e===void 0?void 0:e.getConfiguration().then(r=>this.store.actions.configuration(r))}reloadConfiguration(){var e;return(e=this.service)===null||e===void 0||e.clearConfiguration(),this.loadConfiguration()}async fetchRelatives(){var e,r;let i=(e=this.store.getState().map)===null||e===void 0?void 0:e.metadata.filter(n=>{var o;return n.key==((o=this.store.getState().configuration)===null||o===void 0?void 0:o.relativePivotMetadata)}).flatMap(n=>n.values);if(i!==void 0&&i.length>0){let n=await((r=this.service)===null||r===void 0?void 0:r.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,i)),o=n?.results.flatMap(s=>s.entries);this.store.actions.relatives(o)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(et.clusteringHelperCreated))}createClusteringHelper(){var e,r;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let i=this.store.getState().relatives;if(i){let n=i.find(s=>{var a;return((a=s.map)===null||a===void 0?void 0:a.mapId)==this.store.getState().mapId}),o=(r=(e=b.getState().metadataConfiguration)===null||e===void 0?void 0:e.descriptors)!==null&&r!==void 0?r:[];return new me.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,o)}}async navigateToRelativeTopicIfFound(e){var r,i,n;await this.loaded();let o=await(0,me.waitFor)(()=>{var c;return(c=this.store.getState().configuration)===null||c===void 0?void 0:c.relativeTopicPivotMetadata}),s=this.store.getState().mapId,l=await(await this.awaitService()).getRelativesForTopicInMap(s,o,[e]);if(!((n=(i=(r=l?.results)===null||r===void 0?void 0:r[0])===null||i===void 0?void 0:i.entries)===null||n===void 0)&&n[0]){let c=l.results[0].entries[0].topic.tocId;return await this.navigateToTopic(c),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(e){this.store.actions.searchInDocumentQuery(e)}async setTranslationDestinationLanguage(e){this.store.actions.setTranslationDestinationLanguage(e),e&&this.sendDocumentOnDemandTranslateEvent(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationSourceLanguage(e){this.store.actions.setTranslationSourceLanguage(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationProfileId(e){this.store.actions.setTranslationProfileId(e)}async setTranslationLoading(e){this.store.actions.setTranslationLoading(e)}async setTranslationError(e){this.store.actions.setTranslationError(e)}getTranslationSettings(){var e;let r=this.store.getState();return r.translation.profileId&&r.translation.destinationLanguage?{profileId:r.translation.profileId,destinationLanguage:r.translation.destinationLanguage.code,sourceLanguage:(e=r.map)===null||e===void 0?void 0:e.lang}:void 0}setLinkPreviewDialogId(e){this.store.actions.linkPreviewDialogId(e)}async fetchMapRating(){var e;this.store.actions.mapRating(await((e=this.service)===null||e===void 0?void 0:e.getMapRating()))}async fetchTopicRating(e){var r;let i=await((r=this.service)===null||r===void 0?void 0:r.getTopicRating(e));i&&this.store.actions.setTopicsRating({[e]:i})}registerMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.add(e),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.delete(e),this.updateClusteringHelper()}getAccurateNavigationData(e,r,i){return this.service.getAccurateNavigationData(e,r?.number,i?.section,this.getTranslationSettings())}buildBreadcrumb(e){var r;return(r=this.service)===null||r===void 0?void 0:r.buildBreadcrumb(e,this.getTranslationSettings())}fetchTopicContent(e){var r,i;let n=this.getTranslationSettings();return n?(this.sendTopicAiTranslateEvent(n.destinationLanguage,e),(r=this.service)===null||r===void 0?void 0:r.getTranslatedTopicContent(e,n).then(o=>(o.isTranslationError&&this.setTranslationError(!0),o.content))):(i=this.service)===null||i===void 0?void 0:i.getTopicContent(e)}getTocNode(e){return this.service.getTocNode(e,this.getTranslationSettings())}getPage(e){return this.service.getPage(e,this.getTranslationSettings())}onMapAttachmentsUpdate(){var e;(e=this.service)===null||e===void 0||e.clearMapAttachments(),this.store.dispatchEvent(new Event(et.mapAttachmentsUpdate))}async getRelativeDocumentUrlForLocale(e){var r,i,n;this.store.getState().relatives==null&&await this.fetchRelatives();let o=me.ClusteringHelper.findResultWithMetadataValue((r=this.store.getState().relatives)!==null&&r!==void 0?r:[],"ft:locale",e),s=(0,me.accessResultUrl)(o);if(s){let a=this.store.getState().visibleTopics[0],l=(i=this.store.getState().configuration)===null||i===void 0?void 0:i.relativeTopicPivotMetadata;if(l&&a){let c=await((n=this.service)===null||n===void 0?void 0:n.getTopicMetadataValue(a,l));s=hn(s,c)}}return s}sendDocumentOnDemandTranslateEvent(e){var r;let{editorMode:i,apiIntegrationIdentifier:n,apiIntegrationAppVersion:o}=b.getState(),s=this.store.getState(),a=s.map,l=s.translation.profileId;if(!(i||!a||!n||!o||!l))try{let u={...this.analyticsEventsService.convertMapToAnalyticsDocument(a),title:(r=a.untranslatedTitle)!==null&&r!==void 0?r:a.title};this.analyticsEventsService.sendDocumentOnDemandTranslateEvent({name:"DOCUMENT__ON_DEMAND_TRANSLATE",offline:!1,appName:n,appVersion:o,sourceLanguage:this.parseLanguageToAnalyticsFormat(a.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e.code),profileId:l,document:u,translationOrigin:Ni.AI})}catch(c){console.warn("Failed to send on-demand document translate event:",c)}}sendTopicAiTranslateEvent(e,r){var i;let{editorMode:n,apiIntegrationIdentifier:o,apiIntegrationAppVersion:s}=b.getState(),a=this.store.getState(),l=a.map,c=a.translation.profileId;if(!(n||!l||!o||!s||!c))try{let u=this.buildBreadcrumb(r.tocId);if(!u){console.warn("Failed to build breadcrumb for topic ai translate event");return}let p={...this.analyticsEventsService.convertMapToAnalyticsDocument(l),title:(i=l.untranslatedTitle)!==null&&i!==void 0?i:l.title};this.analyticsEventsService.sendTopicAiTranslateEvent({name:"TOPIC__AI_TRANSLATE",offline:!1,appName:o,appVersion:s,sourceLanguage:this.parseLanguageToAnalyticsFormat(l.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e),breadcrumb:u.map(h=>{var v;return{tocId:h.tocId,title:(v=h.untranslatedTitle)!==null&&v!==void 0?v:h.title}}),document:p,profileId:c})}catch(u){console.warn("Failed to send topic ai translate event:",u)}}parseLanguageToAnalyticsFormat(e){if(!e)return;let r=e.split("-");return r.length===2?{languageCode:r[0],countryCode:r[1]}:{languageCode:r[0],countryCode:""}}};var gn=class extends CustomEvent{constructor(e,r){super("ft-reader-map-loaded",{detail:{map:e,toc:r}})}},yn=class extends CustomEvent{constructor(e,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},vn=class extends CustomEvent{constructor(e){super("ft-reader-navigation-done",{detail:e})}},bn=class extends CustomEvent{constructor(e){super("ft-reader-load-error",{detail:e})}},xn=class extends Event{constructor(){super("ft-reader-map-not-found")}},En=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},Sn=class extends Event{constructor(){super("ft-reader-map-forbidden")}},An=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var ge=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},No=class{constructor(e){this.stateManager=e}searchInDocument(e){this.stateManager.setSearchInDocumentQuery(e??"")}},Y=class extends Q.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new Q.Debouncer(5),this.navigationDebouncer=new Q.Debouncer(10),this.mapLoadedEventDebouncer=new Q.Debouncer(50),this.addStore(b)}render(){return Vr.html`
909
+ `}};dt.elementDefinitions={"ft-typography":Z};dt.styles=Jc;var iu=f(E());var ru={"ft-floating-menu":$,"ft-floating-menu-item":oe,"ft-floating-menu-label":dt};(0,iu.customElements)(ru);var jr=f(E());function ap(t){var e;return((e=(0,jr.accessResult)(t))===null||e===void 0?void 0:e.openMode)===Ui.EXTERNAL}function Mo(t){return ap(t)?(0,jr.accessResult)(t).originUrl:(0,jr.accessResultUrl)(t)}var pu=f(ou());var Io=Zi.build("designedReaderMapMetadata");var su=f(P());var au=su.css`
910
+ `;var zr=f(P()),Lt=f(G()),Q=f(E());var me=f(E());var lu=f(E()),lp={setTranslationDestinationLanguage:(t,e)=>{t.translation.destinationLanguage=e.payload},setTranslationSourceLanguage:(t,e)=>{t.translation.sourceLanguage=e.payload},setTranslationProfileId:(t,e)=>{t.translation.profileId=e.payload},setTranslationLoading:(t,e)=>{t.translation.isLoading=e.payload},setTranslationError:(t,e)=>{t.translation.isError=e.payload},setTopicsRating:(t,e)=>{for(let r in e.payload)t.topicsRating[r]=e.payload[r]}},cu=t=>lu.FtReduxStore.get({name:"ft-reader-"+t,initialState:{mapId:void 0,renderedTopics:[],visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0,mapRating:void 0,topicsRating:{},translation:{sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1},linkPreviewDialogId:void 0},reducers:lp});var No=class{constructor(e,r){this.mapId=e,this.paginatedToc=r,this.nodeByTocId={},this.nodeByUrl={},this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId,translationError:this.paginatedToc.translationError}}extractPagesToc(e,r,i){return e.flatMap(n=>{var o;return n.pageConfiguration&&this.registerPage(this.buildPage(n,i)),n.tocId==null?this.extractPagesToc(n.children,r,i):[{tocId:n.tocId,title:(o=n.title)!==null&&o!==void 0?o:"",untranslatedTitle:n.untranslatedTitle,depth:r,children:this.extractPagesToc(n.children,r+1,n.tocId)}]})}convertNodes(e,r,i){return e.flatMap(n=>{var o,s,a;if(n.tocId==null)return[...this.convertSectionNodes((o=n.pageToc)!==null&&o!==void 0?o:[],r,n.tocId),...this.convertNodes(n.children,r,n.tocId)];let l=(s=n.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),c={tocId:n.tocId,contentId:n.contentId,title:n.title,untranslatedTitle:n.untranslatedTitle,hasRating:n.hasRating,origin:n.origin,prettyUrl:l,depth:r,parentTocId:i,children:[]};this.register(c);let u=this.convertSectionNodes((a=n.pageToc)!==null&&a!==void 0?a:[],r+1,n.tocId),d=this.convertNodes(n.children,r+1,c.tocId);return c.children=[...u,...d],[c]})}convertSectionNodes(e,r,i){return e.flatMap(n=>{var o;let s=(o=n.prettyUrl)===null||o===void 0?void 0:o.replace(/^\//,""),a={...n,prettyUrl:s,depth:r,parentTocId:i,children:[]};return this.register(a),a.children=this.convertSectionNodes(n.children,r+1,n.tocId),[a]})}buildPage(e,r){var i,n,o,s,a,l,c,u;let d=(i=e.tocId)!==null&&i!==void 0?i:(o=(n=e.pageToc)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.tocId,p={number:this.pages.length+1,title:(s=e.title)!==null&&s!==void 0?s:"",untranslatedTitle:e.untranslatedTitle,rootTocId:d??"root",toc:((a=e.pageToc)!==null&&a!==void 0?a:[]).map(y=>this.nodeByTocId[y.tocId]),topics:[],hiddenTopics:[],rootDepth:d?this.nodeByTocId[d].depth:1,breadcrumb:r?this.buildBreadcrumb(this.nodeByTocId[r]):[]},h=(y,_)=>(_?p.topics:p.hiddenTopics).push(y),v=(c=(l=e.pageConfiguration)===null||l===void 0?void 0:l.parentsVisibility)!==null&&c!==void 0?c:[];p.breadcrumb.forEach((y,_)=>{h(y,v[_])}),e.tocId&&h(e.tocId,e.pageConfiguration.isVisible),p.topics.push(...this.tocIds((u=e.pageToc)!==null&&u!==void 0?u:[]));let A=this.resolveOverridenRootTocIdByParentForcedByPagination(p.breadcrumb,v);return p.rootTocId=A??p.rootTocId,p.rootDepth=A?this.nodeByTocId[A].depth:p.rootDepth,p}resolveOverridenRootTocIdByParentForcedByPagination(e,r){for(let i=0;i<e.length;i++)if(r[i])return e[i]}registerPage(e){for(let r of[...e.topics,...e.hiddenTopics])this.pageByTocId[r]||(this.pageByTocId[r]=e);this.pages.push(e)}tocIds(e){return e.flatMap(r=>[r.tocId,...this.tocIds(r.children)])}buildBreadcrumb(e){let r=[e.tocId];for(;e?.parentTocId;)r.unshift(e.parentTocId),e=this.nodeByTocId[e.parentTocId];return r}register(e){e.prettyUrl&&(this.nodeByUrl[e.prettyUrl]==null?this.nodeByUrl[e.prettyUrl]=e:this.duplicatedPrettyUrls.add(e.prettyUrl)),this.nodeByUrl[`${this.mapId}/${e.tocId}`]=e,this.nodeByTocId[e.tocId]=e}},pn=class{convertPaginatedToc(e,r){return new No(e,r).build()}};var fn=class extends ne{get mapId(){return this._mapId}set mapId(e){e!==this._mapId&&this.clear(),this._mapId=e}constructor(e,r,i){super(!1,r),this.converter=e,this._mapId=i,this.initCache()}async withMapId(e){return this._mapId?e(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(e=>this.fetchMap(e))),this.cache.register("enrichedToc",()=>this.withMapId(e=>this.fetchPages(e).then(r=>this.converter.convertPaginatedToc(e,r)))),this.cache.register("ratingSummary",()=>{var e,r;return Ze((r=(e=b.getState().session)===null||e===void 0?void 0:e.profile.roles)!==null&&r!==void 0?r:[],"RATING_USER")?this.withMapId(n=>this.fetchMapRating(n)):Promise.resolve()})}clear(){this.cache.clearMatching(e=>e!=="configuration")}makeCacheKey(e,r){return e+(r?"-destinationLanguage-"+r?.destinationLanguage:"")}getMap(e){return this.cache.get(this.makeCacheKey("map",e),()=>this.fetchMap(this.mapId,e))}getMapNow(e){return this.cache.getNow(this.makeCacheKey("map",e))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(e){return this.cache.get(this.makeCacheKey("enrichedToc",e),()=>this.fetchPages(this.mapId,e).then(r=>this.converter.convertPaginatedToc(this.mapId,r)))}getEnrichedTocNow(e){return this.cache.getNow(this.makeCacheKey("enrichedToc",e))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(e){return(await this.getEnrichedToc(e)).toc}async getPagesToc(e){return(await this.getEnrichedToc(e)).pagesToc}async getTranslationError(e){return(await this.getEnrichedToc(e)).translationError}async getTocNode(e,r){return(await this.getEnrichedToc(r)).nodeByTocId[e]}getTocNodeNow(e,r){var i;return(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.nodeByTocId[e]}getTocNodeNowByUrl(e,r){var i,n;let o=this.getMapNow(r);return o?.prettyUrl==e||`${o?.id}/root`===e?(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.toc[0]:(n=this.getEnrichedTocNow(r))===null||n===void 0?void 0:n.nodeByUrl[e]}async getPage(e,r){let i=await this.getEnrichedToc(r);return i.pages[e-1]||i.pages[0]}async getPageByTocId(e,r){let i=await this.getEnrichedToc(r);return i.pageByTocId[e]||i.pages[0]}getTopicInfo(e){return this.cache.get("topic-"+e.tocId,()=>this.fetchTopicMetadata(e))}getTopicContent(e){return this.cache.get("topic-content-"+e.tocId,()=>this.fetchTopicHTMLContent(e))}getTranslatedTopicContent(e,r){return this.cache.get(this.makeCacheKey("translated-topic-content-"+e.tocId,r),()=>this.fetchTranslatedTopicHTMLContent(e,r))}async getTopicMetadataValue(e,r){let i=this.getTocNodeNow(e);if(!i)return;let n=await this.getTopicInfo(i);return n?.metadata.find(o=>o.key==r)}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}clearMapAttachments(){this.cache.clear("map-attachments")}getRelativesForDocument(e,r){return this.cache.get("document-relatives-"+e+"-"+r.join("-"),()=>this.fetchRelativesForDocument(e,r))}getRelativesForTopicInMap(e,r,i){return this.cache.get("topic-relatives-"+[e,r,...i].join("-"),()=>this.fetchRelativesForTopicInMap(e,r,i))}getAttachmentDownloadLink(e){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(e).content}?download=true&locationValue=reader`)}getLink(e,r,i){let n=this.getNavigationData(e,r,i),o=this.getReaderLinkPrefix()+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),s=new URL(o,this.api.tenantBaseUrl);return n.page!=null&&s.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&s.searchParams.set("tocId",n.tocId),n.section!=null&&s.searchParams.set("section",n.section),s.href}getNavigationData(e,r,i,n){var o,s;e=e||"root";let a=this.getEnrichedTocNow(n),l=a?.pageByTocId[e],c=a?.nodeByTocId[e],u=c?.prettyUrl;return{mapId:this.mapId,tocId:e,topicTitle:(o=c?.title)!==null&&o!==void 0?o:"",untranslatedTopicTitle:c?.untranslatedTitle,page:r&&l&&l.number!==r?r:void 0,prettyUrl:u?.replace(/^r\//,""),prettyUrlDuplicated:(s=a?.duplicatedPrettyUrls.has(u??""))!==null&&s!==void 0?s:!1,section:i}}async getAccurateNavigationData(e,r,i,n){return await this.getEnrichedToc(n),this.getNavigationData(e,r,i,n)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(e=>e?.publication)}getTopicRating(e){return this.getRatingSummary().then(r=>{var i;return r?{type:r.topics.type,rating:(i=r.topics)===null||i===void 0?void 0:i.ratings.find(n=>n.tocId===e)}:void 0})}rateMap(e,r){return this.makeRateMapRequest(e,r).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(e,r){return this.makeMapFeedbackRequest(e,r)}rateTopic(e,r,i){return this.makeRateTopicRequest(e,r,i).then(()=>this.clearRatingIfNecessary())}unrateTopic(e){return this.makeUnrateTopicRequest(e).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let e=b.getState().session;e?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(e,r,i){return this.makeTopicFeedbackRequest(e,r,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(e,r){let i=this.getTocNodeNow(e,r),n=[{tocId:i.tocId,title:i.title,untranslatedTitle:i.untranslatedTitle}],o=this.getTocNodeNow(i.parentTocId,r);for(;o;)n.unshift({tocId:o.tocId,title:o.title,untranslatedTitle:o.untranslatedTitle}),o=this.getTocNodeNow(o.parentTocId,r);return n}isFeatureAccessible(e,{session:r}){var i;if(!this.isFeatureAvailable(e))return!1;switch(e){case We.FEEDBACK:return Ze(r??[],N.FEEDBACK_USER);case We.RATING:return Ze(r??[],N.RATING_USER);case We.PRINT:return Ze(r??[],N.PRINT_USER);case We.BOOKMARK:return!!r?.sessionAuthenticated;case We.COLLECTIONS:return Ze(r??[],N.COLLECTION_USER);case We.PERSONAL_BOOKS:return Ze(r??[],N.PERSONAL_BOOK_USER)&&!(!((i=this.getMapNow())===null||i===void 0)&&i.pbkConfidential);default:return!1}}makeAbsolute(e){return this.api.makeAbsolute(e)}};var hn=class t extends fn{static async build(e){return new t(new pn,void 0,e)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(e,r){let i=await this.api.getMap(e,r);return this.fingerprint=i.fingerprint,i}fetchMapRating(e){return this.api.getMapRating(e)}async fetchPages(e,r){return await this.getMap(r),this.api.getPages(e,this.fingerprint,r)}fetchTopicHTMLContent(e){return this.api.getTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(e,r){return this.api.getTranslatedTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint,r)}fetchTopicMetadata(e){return this.api.getTopic(this.mapId,e.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(e,r){let i={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:e,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(i)}fetchRelativesForTopicInMap(e,r,i){let n={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:r,valueFilter:{negative:!1,values:i}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[e]}}],sort:[],facets:[]};return this.api.search(n)}makeMapFeedbackRequest(e,r){return this.api.sendMapFeedback(this.mapId,e,r)}makeRateMapRequest(e,r){return this.api.rateMap(this.mapId,e,r)}makeRateTopicRequest(e,r,i){return this.api.rateTopic(this.mapId,e,r,i)}makeTopicFeedbackRequest(e,r,i){return this.api.sendTopicFeedback(this.mapId,e,r,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(e){return this.api.unrateTopic(this.mapId,e)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(e){return!0}};var cp="topicPivot";function mn(t,e){let r=new URL(t);return e?.values.forEach(i=>{r.searchParams.append(cp,i)}),r.href}var gn=class t{static build(e,r){return new t(cu(e.trim()||"context"),r??hn.build)}loaded(){return(0,me.waitUntil)(()=>this._loaded)}constructor(e,r,i,n){this.store=e,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new me.Debouncer(10),this.analyticsEventsService=n??new Ki,this.initService(r)}async initService(e){return this.service=await e(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(e){e!==this.store.getState().mapId&&(this.store.actions.mapId(e),this.service&&(this.service.mapId=e),await this.reload())}setRenderedTopics(e){this.store.actions.renderedTopics(e)}setVisibleTopics(e){this.store.actions.visibleTopics(e)}async awaitService(){return(0,me.waitFor)(()=>this.service)}async navigateToTopic(e,r,i){await this.loaded();let n=await this.awaitService(),o=await(i!=null?n.getPage(i,this.getTranslationSettings()):n.getPageByTocId(e??"root",this.getTranslationSettings()));this.store.actions.currentPage(o);let s=this.resolveValidNonRootTocId(e,o);this.store.actions.scrollTarget({tocId:s,section:r}),this.store.getState().visibleTopics[0]!==s&&this.store.actions.visibleTopics([])}resolveValidNonRootTocId(e,r){var i,n,o;let s=(i=e==="root"?void 0:e)!==null&&i!==void 0?i:r.rootTocId;return r.topics.includes(s)?s:(e!="root"&&!r.hiddenTopics.includes(s)&&this.store.dispatchEvent(new CustomEvent(et.requestedTopicNotFound,{detail:{tocId:s}})),(o=(n=r.topics[0])!==null&&n!==void 0?n:r.hiddenTopics[0])!==null&&o!==void 0?o:"root")}async navigateToPage(e){await this.loaded();let i=await(await this.awaitService()).getPage(e,this.getTranslationSettings());this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var e;!((e=this.service)===null||e===void 0)&&e.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}clear(){var e;this._loaded=!1,this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),this.store.actions.renderedTopics([]),this.store.actions.visibleTopics([]),this.store.actions.translation({sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1}),this.store.actions.mapRating(void 0),(e=this.service)===null||e===void 0||e.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(e){var r,i,n,o,s;try{e&&this.setTranslationLoading(!0);let a=l=>{throw e&&this.setTranslationError(!0),l};await Promise.all([this.loadConfiguration(),(r=this.service)===null||r===void 0?void 0:r.getMap(e).then(l=>this.store.actions.map(l)).catch(a),(i=this.service)===null||i===void 0?void 0:i.getToc(e).then(l=>this.store.actions.toc(l)).catch(a),(n=this.service)===null||n===void 0?void 0:n.getPagesToc(e).then(l=>this.store.actions.pagesToc(l)).catch(a),(o=this.service)===null||o===void 0?void 0:o.getPaginationConfiguration().then(l=>this.store.actions.paginationConfiguration(l)).catch(a),(s=this.service)===null||s===void 0?void 0:s.getTranslationError(e).then(l=>this.setTranslationError(l))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,e&&this.setTranslationLoading(!1)}catch(a){this.errorHandler&&!(a instanceof me.CanceledPromiseError)&&this.errorHandler(a)}}loadConfiguration(){var e;return(e=this.service)===null||e===void 0?void 0:e.getConfiguration().then(r=>this.store.actions.configuration(r))}reloadConfiguration(){var e;return(e=this.service)===null||e===void 0||e.clearConfiguration(),this.loadConfiguration()}async fetchRelatives(){var e,r;let i=(e=this.store.getState().map)===null||e===void 0?void 0:e.metadata.filter(n=>{var o;return n.key==((o=this.store.getState().configuration)===null||o===void 0?void 0:o.relativePivotMetadata)}).flatMap(n=>n.values);if(i!==void 0&&i.length>0){let n=await((r=this.service)===null||r===void 0?void 0:r.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,i)),o=n?.results.flatMap(s=>s.entries);this.store.actions.relatives(o)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(et.clusteringHelperCreated))}createClusteringHelper(){var e,r;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let i=this.store.getState().relatives;if(i){let n=i.find(s=>{var a;return((a=s.map)===null||a===void 0?void 0:a.mapId)==this.store.getState().mapId}),o=(r=(e=b.getState().metadataConfiguration)===null||e===void 0?void 0:e.descriptors)!==null&&r!==void 0?r:[];return new me.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,o)}}async navigateToRelativeTopicIfFound(e){var r,i,n;await this.loaded();let o=await(0,me.waitFor)(()=>{var c;return(c=this.store.getState().configuration)===null||c===void 0?void 0:c.relativeTopicPivotMetadata}),s=this.store.getState().mapId,l=await(await this.awaitService()).getRelativesForTopicInMap(s,o,[e]);if(!((n=(i=(r=l?.results)===null||r===void 0?void 0:r[0])===null||i===void 0?void 0:i.entries)===null||n===void 0)&&n[0]){let c=l.results[0].entries[0].topic.tocId;return await this.navigateToTopic(c),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(e){this.store.actions.searchInDocumentQuery(e)}async setTranslationDestinationLanguage(e){this.store.actions.setTranslationDestinationLanguage(e),e&&this.sendDocumentOnDemandTranslateEvent(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationSourceLanguage(e){this.store.actions.setTranslationSourceLanguage(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationProfileId(e){this.store.actions.setTranslationProfileId(e)}async setTranslationLoading(e){this.store.actions.setTranslationLoading(e)}async setTranslationError(e){this.store.actions.setTranslationError(e)}getTranslationSettings(){var e;let r=this.store.getState();return r.translation.profileId&&r.translation.destinationLanguage?{profileId:r.translation.profileId,destinationLanguage:r.translation.destinationLanguage.code,sourceLanguage:(e=r.map)===null||e===void 0?void 0:e.lang}:void 0}setLinkPreviewDialogId(e){this.store.actions.linkPreviewDialogId(e)}async fetchMapRating(){var e;this.store.actions.mapRating(await((e=this.service)===null||e===void 0?void 0:e.getMapRating()))}async fetchTopicRating(e){var r;let i=await((r=this.service)===null||r===void 0?void 0:r.getTopicRating(e));i&&this.store.actions.setTopicsRating({[e]:i})}registerMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.add(e),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.delete(e),this.updateClusteringHelper()}getAccurateNavigationData(e,r,i){return this.service.getAccurateNavigationData(e,r?.number,i?.section,this.getTranslationSettings())}buildBreadcrumb(e){var r;return(r=this.service)===null||r===void 0?void 0:r.buildBreadcrumb(e,this.getTranslationSettings())}fetchTopicContent(e){var r,i;let n=this.getTranslationSettings();return n?(this.sendTopicAiTranslateEvent(n.destinationLanguage,e),(r=this.service)===null||r===void 0?void 0:r.getTranslatedTopicContent(e,n).then(o=>(o.isTranslationError&&this.setTranslationError(!0),o.content))):(i=this.service)===null||i===void 0?void 0:i.getTopicContent(e)}getTocNode(e){return this.service.getTocNode(e,this.getTranslationSettings())}getPage(e){return this.service.getPage(e,this.getTranslationSettings())}onMapAttachmentsUpdate(){var e;(e=this.service)===null||e===void 0||e.clearMapAttachments(),this.store.dispatchEvent(new Event(et.mapAttachmentsUpdate))}async getRelativeDocumentUrlForLocale(e){var r,i,n;this.store.getState().relatives==null&&await this.fetchRelatives();let o=me.ClusteringHelper.findResultWithMetadataValue((r=this.store.getState().relatives)!==null&&r!==void 0?r:[],"ft:locale",e),s=(0,me.accessResultUrl)(o);if(s){let a=this.store.getState().visibleTopics[0],l=(i=this.store.getState().configuration)===null||i===void 0?void 0:i.relativeTopicPivotMetadata;if(l&&a){let c=await((n=this.service)===null||n===void 0?void 0:n.getTopicMetadataValue(a,l));s=mn(s,c)}}return s}sendDocumentOnDemandTranslateEvent(e){var r;let{editorMode:i,apiIntegrationIdentifier:n,apiIntegrationAppVersion:o}=b.getState(),s=this.store.getState(),a=s.map,l=s.translation.profileId;if(!(i||!a||!n||!o||!l))try{let u={...this.analyticsEventsService.convertMapToAnalyticsDocument(a),title:(r=a.untranslatedTitle)!==null&&r!==void 0?r:a.title};this.analyticsEventsService.sendDocumentOnDemandTranslateEvent({name:"DOCUMENT__ON_DEMAND_TRANSLATE",offline:!1,appName:n,appVersion:o,sourceLanguage:this.parseLanguageToAnalyticsFormat(a.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e.code),profileId:l,document:u,translationOrigin:ki.AI})}catch(c){console.warn("Failed to send on-demand document translate event:",c)}}sendTopicAiTranslateEvent(e,r){var i;let{editorMode:n,apiIntegrationIdentifier:o,apiIntegrationAppVersion:s}=b.getState(),a=this.store.getState(),l=a.map,c=a.translation.profileId;if(!(n||!l||!o||!s||!c))try{let u=this.buildBreadcrumb(r.tocId);if(!u){console.warn("Failed to build breadcrumb for topic ai translate event");return}let p={...this.analyticsEventsService.convertMapToAnalyticsDocument(l),title:(i=l.untranslatedTitle)!==null&&i!==void 0?i:l.title};this.analyticsEventsService.sendTopicAiTranslateEvent({name:"TOPIC__AI_TRANSLATE",offline:!1,appName:o,appVersion:s,sourceLanguage:this.parseLanguageToAnalyticsFormat(l.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e),breadcrumb:u.map(h=>{var v;return{tocId:h.tocId,title:(v=h.untranslatedTitle)!==null&&v!==void 0?v:h.title}}),document:p,profileId:c})}catch(u){console.warn("Failed to send topic ai translate event:",u)}}parseLanguageToAnalyticsFormat(e){if(!e)return;let r=e.split("-");return r.length===2?{languageCode:r[0],countryCode:r[1]}:{languageCode:r[0],countryCode:""}}};var yn=class extends CustomEvent{constructor(e,r){super("ft-reader-map-loaded",{detail:{map:e,toc:r}})}},vn=class extends CustomEvent{constructor(e,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},bn=class extends CustomEvent{constructor(e){super("ft-reader-navigation-done",{detail:e})}},xn=class extends CustomEvent{constructor(e){super("ft-reader-load-error",{detail:e})}},En=class extends Event{constructor(){super("ft-reader-map-not-found")}},Sn=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},An=class extends Event{constructor(){super("ft-reader-map-forbidden")}},_n=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var ge=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Do=class{constructor(e){this.stateManager=e}searchInDocument(e){this.stateManager.setSearchInDocumentQuery(e??"")}},Y=class extends Q.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new Q.Debouncer(5),this.navigationDebouncer=new Q.Debouncer(10),this.mapLoadedEventDebouncer=new Q.Debouncer(50),this.addStore(b)}render(){return zr.html`
911
911
  ${this.importStyleIfNeeded()}
912
912
  <slot @register-ft-reader-component=${this.registerComponent}></slot>
913
- `}importStyleIfNeeded(){var e,r;let i=(e=this.stateManager.service)===null||e===void 0?void 0:e.themeStylesheet();return!i||window.location.href.startsWith((r=this.baseUrl)!==null&&r!==void 0?r:"")?Vr.nothing:Vr.html`
913
+ `}importStyleIfNeeded(){var e,r;let i=(e=this.stateManager.service)===null||e===void 0?void 0:e.themeStylesheet();return!i||window.location.href.startsWith((r=this.baseUrl)!==null&&r!==void 0?r:"")?zr.nothing:zr.html`
914
914
  <style>
915
915
  @import "${i}"
916
916
  </style>
917
- `}get stateManager(){return this._stateManager==null&&(this._stateManager=mn.build(this.id||(0,Q.randomId)(6),this.readerServiceProvider),this._stateManager.errorHandler=e=>this.handleLoadError(e),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then(e=>{let r=e.fontsStylesheet();if(r&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${r}"]`)){let i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",r),document.head.append(i)}window.FluidTopicsReaderService=new No(this.stateManager)}),b.addEventListener(Qe.eventName,this.updateConfiguration)}disconnectedCallback(){super.disconnectedCallback(),b.addEventListener(Qe.eventName,this.updateConfiguration)}update(e){super.update(e),e.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),e.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),e.has("searchInDocumentQuery")&&this.searchInDocumentQuery!=null&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId","topicPivot"].some(r=>e.has(r))&&this.mapId&&this.navigateToTarget(),e.has("session")&&this.reload()}contentAvailableCallback(e){var r,i;if(super.contentAvailableCallback(e),(e.has("map")||e.has("toc"))&&this.sendLoadedEventIfLoaded(),e.has("scrollTarget")&&((r=this.scrollTarget)===null||r===void 0?void 0:r.tocId)==null){let n=e.get("scrollTarget");n?.tocId!=null&&this.scrollToTargetDebouncer.run(()=>this.stateManager.getAccurateNavigationData(n.tocId,this.currentPage,n).then(o=>this.dispatchEvent(new vn(o))))}(e.has("visibleTopics")||e.has("scrollTarget"))&&((i=this.scrollTarget)===null||i===void 0?void 0:i.tocId)==null&&Promise.all(this.visibleTopics.map(n=>this.stateManager.getAccurateNavigationData(n,this.currentPage))).then(n=>{let o=n.filter(s=>s!=null&&s.topicTitle!=="").map(s=>({tocId:s.tocId,title:s.topicTitle,page:s.page,prettyUrl:s.prettyUrl,prettyUrlDuplicated:s.prettyUrlDuplicated,breadcrumb:this.stateManager.buildBreadcrumb(s.tocId)}));this.dispatchEvent(new yn(this.map,o))})}clear(){this.stateManager.clear()}async reload(){await this.stateManager.reload(),await this.navigateToTarget()}async navigateToTarget(){await this.stateManager.loaded(),await this.navigationDebouncer.run(async()=>{this.topicPivot!=null?!await this.stateManager.navigateToRelativeTopicIfFound(this.topicPivot)&&this.lastNotifiedNotFoundRelative!==this.mapId+this.topicPivot?(this.dispatchEvent(new An),this.lastNotifiedNotFoundRelative=this.mapId+this.topicPivot):this.lastNotifiedNotFoundRelative=void 0:this.tocId!=null?await this.stateManager.navigateToTopic(this.tocId,this.section,this.page):this.page!=null&&await this.stateManager.navigateToPage(this.page)}),this.tocId&&!this.section&&(this.stateManager.store.commands.clear(/^focus-topic-/),this.stateManager.store.commands.add({type:`focus-topic-${this.tocId}`}))}registerComponent(e){e.stopPropagation();let r=e.composedPath()[0];this.register(r)}register(e){e.setReaderStateManager(this.stateManager)}handleLoadError(e){let r=e;r.status===401?this.dispatchEvent(new En):r.status===403?this.dispatchEvent(new Sn):r.status===404?this.dispatchEvent(new xn):this.dispatchEvent(new bn(e))}reloadBookmarks(){xo.reloadBookmarks()}async reloadRating(){var e,r;await((e=this.stateManager.service)===null||e===void 0?void 0:e.reloadRating()),(r=this.stateManager.store)===null||r===void 0||r.dispatchEvent(new CustomEvent("rating-changed"))}sendLoadedEventIfLoaded(){this.mapLoadedEventDebouncer.run(()=>{this.map&&this.toc&&this.dispatchEvent(new gn(this.map,this.toc))})}};Y.styles=su;ge([(0,Q.redux)({store:b.name})],Y.prototype,"baseUrl",void 0);ge([(0,Q.redux)({store:b.name})],Y.prototype,"session",void 0);ge([(0,Ot.property)()],Y.prototype,"mapId",void 0);ge([(0,Ot.property)()],Y.prototype,"tocId",void 0);ge([(0,Ot.property)()],Y.prototype,"section",void 0);ge([(0,Ot.property)()],Y.prototype,"topicPivot",void 0);ge([(0,Ot.property)()],Y.prototype,"searchInDocumentQuery",void 0);ge([(0,Q.numberProperty)({min:1})],Y.prototype,"page",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"map",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"toc",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"visibleTopics",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"currentPage",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"scrollTarget",void 0);ge([(0,Ot.property)({attribute:!1})],Y.prototype,"readerServiceProvider",void 0);var uu=f(E());var cu={"ft-reader-context":Y};(0,uu.customElements)(cu);var jr=class{constructor(e){this.contentLocales=e}localize(e){var r,i;return e?.key!=="ft:locale"?e:{...e,displayValue:(r=this.findLocaleValue(e))!==null&&r!==void 0?r:e.displayValue,displayTooltipValue:(i=this.findLocaleValue(e))!==null&&i!==void 0?i:e.displayTooltipValue}}findLocaleValue(e){var r;return(r=this.contentLocales.find(i=>i.lang===e.value))===null||r===void 0?void 0:r.label}};var ae=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},F=class extends Ga(Yi(zr)){constructor(){super(),this.multiLine=!1,this.useForSwitchingToRelatives=!1,this.displayLabel=!1,this.hierarchicalValueTruncatingLevel=3,this.forceTooltip=!1,this.editorMode=!1,this.translateValues=!1,this.relatives=[],this.noValueMessage="No value",this.addI18nContext(Mo)}setReaderStateManager(e){super.setReaderStateManager(e),this.key&&this.useForSwitchingToRelatives&&e.registerMetadataForSwitchToRelatives(this.key)}updateRelatives(){var e,r,i,n;this.useForSwitchingToRelatives&&this.key?this.relatives=(n=(r=(e=this.stateManager)===null||e===void 0?void 0:e.clusteringHelper)===null||r===void 0?void 0:r.computeClustersItemsForMetadata(this.key,((i=this.map)===null||i===void 0?void 0:i.lang)||"en",this.noValueMessage,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.key)))!==null&&n!==void 0?n:[]:this.relatives=[]}render(){return ye.html`
917
+ `}get stateManager(){return this._stateManager==null&&(this._stateManager=gn.build(this.id||(0,Q.randomId)(6),this.readerServiceProvider),this._stateManager.errorHandler=e=>this.handleLoadError(e),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then(e=>{let r=e.fontsStylesheet();if(r&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${r}"]`)){let i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",r),document.head.append(i)}window.FluidTopicsReaderService=new Do(this.stateManager)}),b.addEventListener(Ve.eventName,this.updateConfiguration)}disconnectedCallback(){super.disconnectedCallback(),b.addEventListener(Ve.eventName,this.updateConfiguration)}update(e){super.update(e),e.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),e.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),e.has("searchInDocumentQuery")&&this.searchInDocumentQuery!=null&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId","topicPivot"].some(r=>e.has(r))&&this.mapId&&this.navigateToTarget(),e.has("session")&&this.reload()}contentAvailableCallback(e){var r,i;if(super.contentAvailableCallback(e),(e.has("map")||e.has("toc"))&&this.sendLoadedEventIfLoaded(),e.has("scrollTarget")&&((r=this.scrollTarget)===null||r===void 0?void 0:r.tocId)==null){let n=e.get("scrollTarget");n?.tocId!=null&&this.scrollToTargetDebouncer.run(()=>this.stateManager.getAccurateNavigationData(n.tocId,this.currentPage,n).then(o=>this.dispatchEvent(new bn(o))))}(e.has("visibleTopics")||e.has("scrollTarget"))&&((i=this.scrollTarget)===null||i===void 0?void 0:i.tocId)==null&&Promise.all(this.visibleTopics.map(n=>this.stateManager.getAccurateNavigationData(n,this.currentPage))).then(n=>{let o=n.filter(s=>s!=null&&s.topicTitle!=="").map(s=>({tocId:s.tocId,title:s.topicTitle,page:s.page,prettyUrl:s.prettyUrl,prettyUrlDuplicated:s.prettyUrlDuplicated,breadcrumb:this.stateManager.buildBreadcrumb(s.tocId)}));this.dispatchEvent(new vn(this.map,o))})}clear(){this.stateManager.clear()}async reload(){await this.stateManager.reload(),await this.navigateToTarget()}async navigateToTarget(){await this.stateManager.loaded(),await this.navigationDebouncer.run(async()=>{this.topicPivot!=null?!await this.stateManager.navigateToRelativeTopicIfFound(this.topicPivot)&&this.lastNotifiedNotFoundRelative!==this.mapId+this.topicPivot?(this.dispatchEvent(new _n),this.lastNotifiedNotFoundRelative=this.mapId+this.topicPivot):this.lastNotifiedNotFoundRelative=void 0:this.tocId!=null?await this.stateManager.navigateToTopic(this.tocId,this.section,this.page):this.page!=null&&await this.stateManager.navigateToPage(this.page)}),this.tocId&&!this.section&&(this.stateManager.store.commands.clear(/^focus-topic-/),this.stateManager.store.commands.add({type:`focus-topic-${this.tocId}`}))}registerComponent(e){e.stopPropagation();let r=e.composedPath()[0];this.register(r)}register(e){e.setReaderStateManager(this.stateManager)}handleLoadError(e){let r=e;r.status===401?this.dispatchEvent(new Sn):r.status===403?this.dispatchEvent(new An):r.status===404?this.dispatchEvent(new En):this.dispatchEvent(new xn(e))}reloadBookmarks(){Eo.reloadBookmarks()}async reloadRating(){var e,r;await((e=this.stateManager.service)===null||e===void 0?void 0:e.reloadRating()),(r=this.stateManager.store)===null||r===void 0||r.dispatchEvent(new CustomEvent("rating-changed"))}sendLoadedEventIfLoaded(){this.mapLoadedEventDebouncer.run(()=>{this.map&&this.toc&&this.dispatchEvent(new yn(this.map,this.toc))})}};Y.styles=au;ge([(0,Q.redux)({store:b.name})],Y.prototype,"baseUrl",void 0);ge([(0,Q.redux)({store:b.name})],Y.prototype,"session",void 0);ge([(0,Lt.property)()],Y.prototype,"mapId",void 0);ge([(0,Lt.property)()],Y.prototype,"tocId",void 0);ge([(0,Lt.property)()],Y.prototype,"section",void 0);ge([(0,Lt.property)()],Y.prototype,"topicPivot",void 0);ge([(0,Lt.property)()],Y.prototype,"searchInDocumentQuery",void 0);ge([(0,Q.numberProperty)({min:1})],Y.prototype,"page",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"map",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"toc",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"visibleTopics",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"currentPage",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"scrollTarget",void 0);ge([(0,Lt.property)({attribute:!1})],Y.prototype,"readerServiceProvider",void 0);var du=f(E());var uu={"ft-reader-context":Y};(0,du.customElements)(uu);var Kr=class{constructor(e){this.contentLocales=e}localize(e){var r,i;return e?.key!=="ft:locale"?e:{...e,displayValue:(r=this.findLocaleValue(e))!==null&&r!==void 0?r:e.displayValue,displayTooltipValue:(i=this.findLocaleValue(e))!==null&&i!==void 0?i:e.displayTooltipValue}}findLocaleValue(e){var r;return(r=this.contentLocales.find(i=>i.lang===e.value))===null||r===void 0?void 0:r.label}};var ae=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},H=class extends qa(Qi(Wr)){constructor(){super(),this.multiLine=!1,this.useForSwitchingToRelatives=!1,this.displayLabel=!1,this.hierarchicalValueTruncatingLevel=3,this.forceTooltip=!1,this.editorMode=!1,this.translateValues=!1,this.relatives=[],this.noValueMessage="No value",this.addI18nContext(Io)}setReaderStateManager(e){super.setReaderStateManager(e),this.key&&this.useForSwitchingToRelatives&&e.registerMetadataForSwitchToRelatives(this.key)}updateRelatives(){var e,r,i,n;this.useForSwitchingToRelatives&&this.key?this.relatives=(n=(r=(e=this.stateManager)===null||e===void 0?void 0:e.clusteringHelper)===null||r===void 0?void 0:r.computeClustersItemsForMetadata(this.key,((i=this.map)===null||i===void 0?void 0:i.lang)||"en",this.noValueMessage,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.key)))!==null&&n!==void 0?n:[]:this.relatives=[]}render(){return ye.html`
918
918
  ${this.useForSwitchingToRelatives&&this.relatives.length>0?this.renderSwitchToRelatives():this.renderChip()}
919
919
  ${this.hideIfEmpty()}
920
920
  `}renderSwitchToRelatives(){return ye.html`
@@ -922,7 +922,7 @@
922
922
  <ft-floating-menu part="floating-menu" text="Toggle collapsible" trailingIcon>
923
923
  ${this.renderChip(!0)}
924
924
  <ft-floating-menu-label>${this.metadataLabel}</ft-floating-menu-label>
925
- ${(0,du.repeat)(this.relatives,e=>e.metadata.value,e=>this.renderRelativeItem(e.result,e.metadata))}
925
+ ${(0,pu.repeat)(this.relatives,e=>e.metadata.value,e=>this.renderRelativeItem(e.result,e.metadata))}
926
926
  </ft-floating-menu>
927
927
  </div>
928
928
  `}renderChip(e=!1){var r,i,n,o,s,a;let l=!this.forceTooltip&&this.displayLabel&&((r=this.flatMetadata)===null||r===void 0?void 0:r.displayTooltipValue)==((i=this.flatMetadata)===null||i===void 0?void 0:i.displayValue),c=`${this.metadataLabel}: ${(o=(n=this.flatMetadata)===null||n===void 0?void 0:n.displayTooltipValue)!==null&&o!==void 0?o:this.noValueMessage}`,u=ye.html`
@@ -946,9 +946,9 @@
946
946
  text="${c}">
947
947
  ${u}
948
948
  </ft-tooltip>
949
- `}get metadataValue(){return this.flatMetadata?this.flatMetadata.displayValue:this.editorMode?this.key?`no value for ${this.key}`:"no metadata selected":this.noValueMessage}renderRelativeItem(e,r){var i,n;let o=this.translateValues&&(n=new jr((i=this.availableContentLocales)!==null&&i!==void 0?i:[]).localize(r))!==null&&n!==void 0?n:r;return ye.html`
949
+ `}get metadataValue(){return this.flatMetadata?this.flatMetadata.displayValue:this.editorMode?this.key?`no value for ${this.key}`:"no metadata selected":this.noValueMessage}renderRelativeItem(e,r){var i,n;let o=this.translateValues&&(n=new Kr((i=this.availableContentLocales)!==null&&i!==void 0?i:[]).localize(r))!==null&&n!==void 0?n:r;return ye.html`
950
950
  <a part="relative-item-link"
951
- href="${Lo(e)}"
951
+ href="${Mo(e)}"
952
952
  @click=${s=>this.addTopicPivotParam(s,e)}>
953
953
  <ft-ripple part="relative-item-ripple"></ft-ripple>
954
954
  <ft-floating-menu-item part="relative-item" value="${o.value}" notFocusable>
@@ -963,7 +963,7 @@
963
963
  display: none !important;
964
964
  }
965
965
  </style>
966
- `:ye.nothing}addTopicPivotParam(e,r){let i=this.stateManager.store.getState().visibleTopics[0];i&&r.type=="MAP"&&this.relativeTopicPivotMetadata&&(e.stopPropagation(),e.preventDefault(),this.service.getTopicMetadataValue(i,this.relativeTopicPivotMetadata).then(n=>{var o;let s=hn((o=Lo(r))!==null&&o!==void 0?o:"",n),a=document.createElement("a");a.href=s,(e.ctrlKey||e.metaKey)&&(a.target="_blank"),this.append(a),a.click()}))}willUpdate(e){var r,i,n,o,s;super.willUpdate(e),e.has("key")&&this.useForSwitchingToRelatives&&(e.get("key")&&((r=this.stateManager)===null||r===void 0||r.unregisterMetadataForSwitchToRelatives(e.get("key"))),this.key&&((i=this.stateManager)===null||i===void 0||i.registerMetadataForSwitchToRelatives(this.key))),e.has("useForSwitchingToRelatives")&&this.key&&(this.useForSwitchingToRelatives?(n=this.stateManager)===null||n===void 0||n.registerMetadataForSwitchToRelatives(this.key):(o=this.stateManager)===null||o===void 0||o.unregisterMetadataForSwitchToRelatives(this.key)),(e.has("translateValues")||e.has("metadata")||e.has("hierarchicalValueTruncatingLevel")||e.has("availableContentLocales")||this.dateFormatOptionsChanged(e))&&(this.flatMetadata=this.metadata?Se.ClusteringHelper.flattenMetadata(this.metadata,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.metadata.key)):void 0,this.translateValues&&(this.flatMetadata=new jr((s=this.availableContentLocales)!==null&&s!==void 0?s:[]).localize(this.flatMetadata)))}get metadataLabel(){var e,r,i,n,o,s;return this.metadata?this.metadata.label:(s=(n=(i=(r=(e=this.stateManager)===null||e===void 0?void 0:e.clusteringHelper)===null||r===void 0?void 0:r.getMetadataDescriptor(this.key))===null||i===void 0?void 0:i.label)!==null&&n!==void 0?n:(o=this.relatives.find(a=>a.metadata.value))===null||o===void 0?void 0:o.metadata.label)!==null&&s!==void 0?s:this.key}};F.elementDefinitions={"ft-chip":H,"ft-floating-menu":$,"ft-floating-menu-item":oe,"ft-floating-menu-label":dt,"ft-ripple":M,"ft-tooltip":z};F.styles=Ho;ae([(0,Ue.property)(),(0,Se.reduxReactive)()],F.prototype,"key",void 0);ae([(0,Ue.property)({type:Boolean})],F.prototype,"multiLine",void 0);ae([(0,Ue.property)({type:Boolean})],F.prototype,"useForSwitchingToRelatives",void 0);ae([(0,Ue.property)({type:Boolean})],F.prototype,"displayLabel",void 0);ae([(0,Se.numberProperty)()],F.prototype,"hierarchicalValueTruncatingLevel",void 0);ae([(0,Ue.property)({type:Boolean})],F.prototype,"forceTooltip",void 0);ae([(0,Ue.property)({attribute:!1})],F.prototype,"editorMode",void 0);ae([(0,Ue.property)({type:Boolean})],F.prototype,"translateValues",void 0);ae([(0,Se.redux)({store:"reader",selector:(t,e)=>{var r,i;return(i=(r=t.map)===null||r===void 0?void 0:r.metadata)===null||i===void 0?void 0:i.find(n=>n.key===e.key)}})],F.prototype,"metadata",void 0);ae([(0,Ue.state)()],F.prototype,"flatMetadata",void 0);ae([(0,Se.redux)({store:"reader"})],F.prototype,"map",void 0);ae([(0,Se.redux)({store:"reader",selector:t=>{var e;return(e=t.configuration)===null||e===void 0?void 0:e.relativeTopicPivotMetadata}})],F.prototype,"relativeTopicPivotMetadata",void 0);ae([(0,Ue.state)()],F.prototype,"relatives",void 0);ae([(0,Se.redux)({store:b.name})],F.prototype,"availableContentLocales",void 0);ae([Ql(Mo.properties.itemWithNoValueForSwitchToRelatives())],F.prototype,"noValueMessage",void 0);ae([(0,Se.reduxEventListener)({eventName:et.clusteringHelperCreated})],F.prototype,"updateRelatives",null);var pu={"ft-reader-metadata":F};(0,fu.customElements)(pu);})();
966
+ `:ye.nothing}addTopicPivotParam(e,r){let i=this.stateManager.store.getState().visibleTopics[0];i&&r.type=="MAP"&&this.relativeTopicPivotMetadata&&(e.stopPropagation(),e.preventDefault(),this.service.getTopicMetadataValue(i,this.relativeTopicPivotMetadata).then(n=>{var o;let s=mn((o=Mo(r))!==null&&o!==void 0?o:"",n),a=document.createElement("a");a.href=s,(e.ctrlKey||e.metaKey)&&(a.target="_blank"),this.append(a),a.click()}))}willUpdate(e){var r,i,n,o,s;super.willUpdate(e),e.has("key")&&this.useForSwitchingToRelatives&&(e.get("key")&&((r=this.stateManager)===null||r===void 0||r.unregisterMetadataForSwitchToRelatives(e.get("key"))),this.key&&((i=this.stateManager)===null||i===void 0||i.registerMetadataForSwitchToRelatives(this.key))),e.has("useForSwitchingToRelatives")&&this.key&&(this.useForSwitchingToRelatives?(n=this.stateManager)===null||n===void 0||n.registerMetadataForSwitchToRelatives(this.key):(o=this.stateManager)===null||o===void 0||o.unregisterMetadataForSwitchToRelatives(this.key)),(e.has("translateValues")||e.has("metadata")||e.has("hierarchicalValueTruncatingLevel")||e.has("availableContentLocales")||this.dateFormatOptionsChanged(e))&&(this.flatMetadata=this.metadata?Se.ClusteringHelper.flattenMetadata(this.metadata,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.metadata.key)):void 0,this.translateValues&&(this.flatMetadata=new Kr((s=this.availableContentLocales)!==null&&s!==void 0?s:[]).localize(this.flatMetadata)))}get metadataLabel(){var e,r,i,n,o,s;return this.metadata?this.metadata.label:(s=(n=(i=(r=(e=this.stateManager)===null||e===void 0?void 0:e.clusteringHelper)===null||r===void 0?void 0:r.getMetadataDescriptor(this.key))===null||i===void 0?void 0:i.label)!==null&&n!==void 0?n:(o=this.relatives.find(a=>a.metadata.value))===null||o===void 0?void 0:o.metadata.label)!==null&&s!==void 0?s:this.key}};H.elementDefinitions={"ft-chip":F,"ft-floating-menu":$,"ft-floating-menu-item":oe,"ft-floating-menu-label":dt,"ft-ripple":M,"ft-tooltip":z};H.styles=Ho;ae([(0,Ue.property)(),(0,Se.reduxReactive)()],H.prototype,"key",void 0);ae([(0,Ue.property)({type:Boolean})],H.prototype,"multiLine",void 0);ae([(0,Ue.property)({type:Boolean})],H.prototype,"useForSwitchingToRelatives",void 0);ae([(0,Ue.property)({type:Boolean})],H.prototype,"displayLabel",void 0);ae([(0,Se.numberProperty)()],H.prototype,"hierarchicalValueTruncatingLevel",void 0);ae([(0,Ue.property)({type:Boolean})],H.prototype,"forceTooltip",void 0);ae([(0,Ue.property)({attribute:!1})],H.prototype,"editorMode",void 0);ae([(0,Ue.property)({type:Boolean})],H.prototype,"translateValues",void 0);ae([(0,Se.redux)({store:"reader",selector:(t,e)=>{var r,i;return(i=(r=t.map)===null||r===void 0?void 0:r.metadata)===null||i===void 0?void 0:i.find(n=>n.key===e.key)}})],H.prototype,"metadata",void 0);ae([(0,Ue.state)()],H.prototype,"flatMetadata",void 0);ae([(0,Se.redux)({store:"reader"})],H.prototype,"map",void 0);ae([(0,Se.redux)({store:"reader",selector:t=>{var e;return(e=t.configuration)===null||e===void 0?void 0:e.relativeTopicPivotMetadata}})],H.prototype,"relativeTopicPivotMetadata",void 0);ae([(0,Ue.state)()],H.prototype,"relatives",void 0);ae([(0,Se.redux)({store:b.name})],H.prototype,"availableContentLocales",void 0);ae([Zl(Io.properties.itemWithNoValueForSwitchToRelatives())],H.prototype,"noValueMessage",void 0);ae([(0,Se.reduxEventListener)({eventName:et.clusteringHelperCreated})],H.prototype,"updateRelatives",null);var fu={"ft-reader-metadata":H};(0,hu.customElements)(fu);})();
967
967
  /*! Bundled license information:
968
968
 
969
969
  lit-html/lit-html.js: