@fluid-topics/ft-tooltip 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-tooltip.light.js +8 -8
- package/build/ft-tooltip.min.js +33 -33
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";(()=>{var ha=Object.create;var Bn=Object.defineProperty;var ma=Object.getOwnPropertyDescriptor;var ya=Object.getOwnPropertyNames;var ga=Object.getPrototypeOf,va=Object.prototype.hasOwnProperty;var Lr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Ea=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ya(t))!va.call(e,s)&&s!==r&&Bn(e,s,{get:()=>t[s],enumerable:!(n=ma(t,s))||n.enumerable});return e};var
|
|
1
|
+
"use strict";(()=>{var ha=Object.create;var Bn=Object.defineProperty;var ma=Object.getOwnPropertyDescriptor;var ya=Object.getOwnPropertyNames;var ga=Object.getPrototypeOf,va=Object.prototype.hasOwnProperty;var Lr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Ea=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ya(t))!va.call(e,s)&&s!==r&&Bn(e,s,{get:()=>t[s],enumerable:!(n=ma(t,s))||n.enumerable});return e};var A=(e,t,r)=>(r=e!=null?ha(ga(e)):{},Ea(t||!e||!e.__esModule?Bn(r,"default",{value:e,enumerable:!0}):r,e));var T=Lr((tl,Hn)=>{Hn.exports=ftGlobals.wcUtils});var se=Lr((rl,jn)=>{jn.exports=ftGlobals.lit});var ee=Lr((nl,Vn)=>{Vn.exports=ftGlobals.litDecorators});var da=A(T());var la=A(se()),G=A(ee()),q=A(T());var Vr=globalThis,zn=e=>e,Dt=Vr.trustedTypes,Kn=Dt?Dt.createPolicy("lit-html",{createHTML:e=>e}):void 0,Jn="$lit$",fe=`lit$${Math.random().toFixed(9).slice(2)}$`,Qn="?"+fe,Sa=`<${Qn}>`,Ae=document,Lt=()=>Ae.createComment(""),ct=e=>e===null||typeof e!="object"&&typeof e!="function",zr=Array.isArray,xa=e=>zr(e)||typeof e?.[Symbol.iterator]=="function",Ur=`[
|
|
2
2
|
\f\r]`,at=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wn=/-->/g,qn=/>/g,Se=RegExp(`>|${Ur}(?:([^\\s"'>=/]+)(${Ur}*=${Ur}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Gn=/'/g,Yn=/"/g,Zn=/^(?:script|style|textarea|title)$/i,Kr=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),es=Kr(1),ts=Kr(2),rs=Kr(3),lt=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),Xn=new WeakMap,Ae=xe.createTreeWalker(xe,129);function ns(e,t){if(!zr(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Kn!==void 0?Kn.createHTML(t):t}var xa=(e,t)=>{let r=e.length-1,n=[],s,i=t===2?"<svg>":t===3?"<math>":"",o=at;for(let a=0;a<r;a++){let c=e[a],l,u,d=-1,f=0;for(;f<c.length&&(o.lastIndex=f,u=o.exec(c),u!==null);)f=o.lastIndex,o===at?u[1]==="!--"?o=Wn:u[1]!==void 0?o=qn:u[2]!==void 0?(Zn.test(u[2])&&(s=RegExp("</"+u[2],"g")),o=Se):u[3]!==void 0&&(o=Se):o===Se?u[0]===">"?(o=s??at,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,l=u[1],o=u[3]===void 0?Se:u[3]==='"'?Yn:Gn):o===Yn||o===Gn?o=Se:o===Wn||o===qn?o=at:(o=Se,s=void 0);let h=o===Se&&e[a+1].startsWith("/>")?" ":"";i+=o===at?c+Sa:d>=0?(n.push(l),c.slice(0,d)+Jn+c.slice(d)+fe+h):c+fe+(d===-2?a:h)}return[ns(e,i+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},ut=class e{constructor({strings:t,_$litType$:r},n){let s;this.parts=[];let i=0,o=0,a=t.length-1,c=this.parts,[l,u]=xa(t,r);if(this.el=e.createElement(l,n),Ae.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(s=Ae.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(let d of s.getAttributeNames())if(d.endsWith(Jn)){let f=u[o++],h=s.getAttribute(d).split(fe),y=/([.?@])?(.*)/.exec(f);c.push({type:1,index:i,name:y[2],strings:h,ctor:y[1]==="."?$r:y[1]==="?"?Br:y[1]==="@"?Hr:De}),s.removeAttribute(d)}else d.startsWith(fe)&&(c.push({type:6,index:i}),s.removeAttribute(d));if(Zn.test(s.tagName)){let d=s.textContent.split(fe),f=d.length-1;if(f>0){s.textContent=Dt?Dt.emptyScript:"";for(let h=0;h<f;h++)s.append(d[h],Lt()),Ae.nextNode(),c.push({type:2,index:++i});s.append(d[f],Lt())}}}else if(s.nodeType===8)if(s.data===Qn)c.push({type:2,index:i});else{let d=-1;for(;(d=s.data.indexOf(fe,d+1))!==-1;)c.push({type:7,index:i}),d+=fe.length-1}i++}}static createElement(t,r){let n=xe.createElement("template");return n.innerHTML=t,n}};function Pe(e,t,r=e,n){if(t===lt)return t;let s=n!==void 0?r._$Co?.[n]:r._$Cl,i=ct(t)?void 0:t._$litDirective$;return s?.constructor!==i&&(s?._$AO?.(!1),i===void 0?s=void 0:(s=new i(e),s._$AT(e,r,n)),n!==void 0?(r._$Co??=[])[n]=s:r._$Cl=s),s!==void 0&&(t=Pe(e,s._$AS(e,t.values),s,n)),t}var Fr=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:n}=this._$AD,s=(t?.creationScope??xe).importNode(r,!0);Ae.currentNode=s;let i=Ae.nextNode(),o=0,a=0,c=n[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new Ut(i,i.nextSibling,this,t):c.type===1?l=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(l=new jr(i,this,t)),this._$AV.push(l),c=n[++a]}o!==c?.index&&(i=Ae.nextNode(),o++)}return Ae.currentNode=xe,s}p(t){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}},Ut=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,n,s){this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Pe(this,t,r),ct(t)?t===N||t==null||t===""?(this._$AH!==N&&this._$AR(),this._$AH=N):t!==this._$AH&&t!==lt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Aa(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==N&&ct(this._$AH)?this._$AA.nextSibling.data=t:this.T(xe.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:n}=t,s=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=ut.createElement(ns(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(r);else{let i=new Fr(s,this),o=i.u(this.options);i.p(r),this.T(o),this._$AH=i}}_$AC(t){let r=Xn.get(t.strings);return r===void 0&&Xn.set(t.strings,r=new ut(t)),r}k(t){zr(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,s=0;for(let i of t)s===r.length?r.push(n=new e(this.O(Lt()),this.O(Lt()),this,this.options)):n=r[s],n._$AI(i),s++;s<r.length&&(this._$AR(n&&n._$AB.nextSibling,s),r.length=s)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let n=zn(t).nextSibling;zn(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},De=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,s,i){this.type=1,this._$AH=N,this._$AN=void 0,this.element=t,this.name=r,this._$AM=s,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=N}_$AI(t,r=this,n,s){let i=this.strings,o=!1;if(i===void 0)t=Pe(this,t,r,0),o=!ct(t)||t!==this._$AH&&t!==lt,o&&(this._$AH=t);else{let a=t,c,l;for(t=i[0],c=0;c<i.length-1;c++)l=Pe(this,a[n+c],r,c),l===lt&&(l=this._$AH[c]),o||=!ct(l)||l!==this._$AH[c],l===N?t=N:t!==N&&(t+=(l??"")+i[c+1]),this._$AH[c]=l}o&&!s&&this.j(t)}j(t){t===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},$r=class extends De{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===N?void 0:t}},Br=class extends De{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==N)}},Hr=class extends De{constructor(t,r,n,s,i){super(t,r,n,s,i),this.type=5}_$AI(t,r=this){if((t=Pe(this,t,r,0)??N)===lt)return;let n=this._$AH,s=t===N&&n!==N||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==N&&(n===N||s);s&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},jr=class{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Pe(this,t)}};var ba=Vr.litHtmlPolyfillSupport;ba?.(ut,Ut),(Vr.litHtmlVersions??=[]).push("3.3.3");var is=Symbol.for(""),_a=e=>{if(e?.r===is)return e?._$litStatic$},Wr=e=>({_$litStatic$:e,r:is});var ss=new Map,qr=e=>(t,...r)=>{let n=r.length,s,i,o=[],a=[],c,l=0,u=!1;for(;l<n;){for(c=t[l];l<n&&(i=r[l],(s=_a(i))!==void 0);)c+=s+t[++l],u=!0;l!==n&&a.push(i),o.push(c),l++}if(l===n&&o.push(t[n]),u){let d=o.join("$$lit$$");(t=ss.get(d))===void 0&&(o.raw=o,ss.set(d,t=o)),r=a}return e(t,...r)},Gr=qr(es),ol=qr(ts),al=qr(rs);var Yr=x(ee()),Es=x(T());var Le;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(Le||(Le={}));var z=x(se()),p=x(T()),os=p.FtCssVariableFactory.extend("--ft-typography-font-family","",p.designSystemVariables.titleFont),ie=p.FtCssVariableFactory.extend("--ft-typography-font-family","",p.designSystemVariables.contentFont),v={fontFamily:ie,fontSize:p.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:p.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:p.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:p.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:p.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},Ue={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-title-font-family","",os),fontSize:p.FtCssVariableFactory.extend("--ft-typography-title-font-size","",v.fontSize,"20px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",v.letterSpacing,"0.15px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-title-line-height","",v.lineHeight,"1.2"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",v.textTransform,"inherit")},Fe={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",os),fontSize:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",v.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",v.letterSpacing,"0.105px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",v.lineHeight,"1.7"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",v.textTransform,"inherit")},$e={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",v.fontSize,"16px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",v.fontWeight,"600"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",v.letterSpacing,"0.144px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",v.lineHeight,"1.5"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",v.textTransform,"inherit")},Be={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",v.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",v.letterSpacing,"0.098px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",v.lineHeight,"1.7"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",v.textTransform,"inherit")},He={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",v.fontSize,"16px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",v.letterSpacing,"0.496px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",v.lineHeight,"1.5"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",v.textTransform,"inherit")},je={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",v.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",v.letterSpacing,"0.252px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",v.lineHeight,"1.4"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",v.textTransform,"inherit")},Ve={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",v.fontSize,"12px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",v.letterSpacing,"0.396px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",v.lineHeight,"1.33"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",v.textTransform,"inherit")},ze={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",v.fontSize,"10px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",v.letterSpacing,"0.33px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",v.lineHeight,"1.6"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",v.textTransform,"inherit")},Ke={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",v.fontSize,"10px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",v.letterSpacing,"1.5px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",v.lineHeight,"1.6"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",v.textTransform,"uppercase")},We={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-button-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-button-font-size","",v.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",v.fontWeight,"600"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",v.letterSpacing,"1.246px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-button-line-height","",v.lineHeight,"1.15"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",v.textTransform,"uppercase")},as=z.css`
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Gn=/'/g,Yn=/"/g,Zn=/^(?:script|style|textarea|title)$/i,Kr=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),es=Kr(1),ts=Kr(2),rs=Kr(3),lt=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),Xn=new WeakMap,xe=Ae.createTreeWalker(Ae,129);function ns(e,t){if(!zr(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Kn!==void 0?Kn.createHTML(t):t}var Aa=(e,t)=>{let r=e.length-1,n=[],s,i=t===2?"<svg>":t===3?"<math>":"",o=at;for(let a=0;a<r;a++){let c=e[a],l,u,d=-1,f=0;for(;f<c.length&&(o.lastIndex=f,u=o.exec(c),u!==null);)f=o.lastIndex,o===at?u[1]==="!--"?o=Wn:u[1]!==void 0?o=qn:u[2]!==void 0?(Zn.test(u[2])&&(s=RegExp("</"+u[2],"g")),o=Se):u[3]!==void 0&&(o=Se):o===Se?u[0]===">"?(o=s??at,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,l=u[1],o=u[3]===void 0?Se:u[3]==='"'?Yn:Gn):o===Yn||o===Gn?o=Se:o===Wn||o===qn?o=at:(o=Se,s=void 0);let h=o===Se&&e[a+1].startsWith("/>")?" ":"";i+=o===at?c+Sa:d>=0?(n.push(l),c.slice(0,d)+Jn+c.slice(d)+fe+h):c+fe+(d===-2?a:h)}return[ns(e,i+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},ut=class e{constructor({strings:t,_$litType$:r},n){let s;this.parts=[];let i=0,o=0,a=t.length-1,c=this.parts,[l,u]=Aa(t,r);if(this.el=e.createElement(l,n),xe.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(s=xe.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(let d of s.getAttributeNames())if(d.endsWith(Jn)){let f=u[o++],h=s.getAttribute(d).split(fe),y=/([.?@])?(.*)/.exec(f);c.push({type:1,index:i,name:y[2],strings:h,ctor:y[1]==="."?$r:y[1]==="?"?Br:y[1]==="@"?Hr:De}),s.removeAttribute(d)}else d.startsWith(fe)&&(c.push({type:6,index:i}),s.removeAttribute(d));if(Zn.test(s.tagName)){let d=s.textContent.split(fe),f=d.length-1;if(f>0){s.textContent=Dt?Dt.emptyScript:"";for(let h=0;h<f;h++)s.append(d[h],Lt()),xe.nextNode(),c.push({type:2,index:++i});s.append(d[f],Lt())}}}else if(s.nodeType===8)if(s.data===Qn)c.push({type:2,index:i});else{let d=-1;for(;(d=s.data.indexOf(fe,d+1))!==-1;)c.push({type:7,index:i}),d+=fe.length-1}i++}}static createElement(t,r){let n=Ae.createElement("template");return n.innerHTML=t,n}};function Pe(e,t,r=e,n){if(t===lt)return t;let s=n!==void 0?r._$Co?.[n]:r._$Cl,i=ct(t)?void 0:t._$litDirective$;return s?.constructor!==i&&(s?._$AO?.(!1),i===void 0?s=void 0:(s=new i(e),s._$AT(e,r,n)),n!==void 0?(r._$Co??=[])[n]=s:r._$Cl=s),s!==void 0&&(t=Pe(e,s._$AS(e,t.values),s,n)),t}var Fr=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:n}=this._$AD,s=(t?.creationScope??Ae).importNode(r,!0);xe.currentNode=s;let i=xe.nextNode(),o=0,a=0,c=n[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new Ut(i,i.nextSibling,this,t):c.type===1?l=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(l=new jr(i,this,t)),this._$AV.push(l),c=n[++a]}o!==c?.index&&(i=xe.nextNode(),o++)}return xe.currentNode=Ae,s}p(t){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}},Ut=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,n,s){this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Pe(this,t,r),ct(t)?t===N||t==null||t===""?(this._$AH!==N&&this._$AR(),this._$AH=N):t!==this._$AH&&t!==lt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):xa(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==N&&ct(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ae.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:n}=t,s=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=ut.createElement(ns(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(r);else{let i=new Fr(s,this),o=i.u(this.options);i.p(r),this.T(o),this._$AH=i}}_$AC(t){let r=Xn.get(t.strings);return r===void 0&&Xn.set(t.strings,r=new ut(t)),r}k(t){zr(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,s=0;for(let i of t)s===r.length?r.push(n=new e(this.O(Lt()),this.O(Lt()),this,this.options)):n=r[s],n._$AI(i),s++;s<r.length&&(this._$AR(n&&n._$AB.nextSibling,s),r.length=s)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let n=zn(t).nextSibling;zn(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},De=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,s,i){this.type=1,this._$AH=N,this._$AN=void 0,this.element=t,this.name=r,this._$AM=s,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=N}_$AI(t,r=this,n,s){let i=this.strings,o=!1;if(i===void 0)t=Pe(this,t,r,0),o=!ct(t)||t!==this._$AH&&t!==lt,o&&(this._$AH=t);else{let a=t,c,l;for(t=i[0],c=0;c<i.length-1;c++)l=Pe(this,a[n+c],r,c),l===lt&&(l=this._$AH[c]),o||=!ct(l)||l!==this._$AH[c],l===N?t=N:t!==N&&(t+=(l??"")+i[c+1]),this._$AH[c]=l}o&&!s&&this.j(t)}j(t){t===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},$r=class extends De{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===N?void 0:t}},Br=class extends De{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==N)}},Hr=class extends De{constructor(t,r,n,s,i){super(t,r,n,s,i),this.type=5}_$AI(t,r=this){if((t=Pe(this,t,r,0)??N)===lt)return;let n=this._$AH,s=t===N&&n!==N||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==N&&(n===N||s);s&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},jr=class{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Pe(this,t)}};var ba=Vr.litHtmlPolyfillSupport;ba?.(ut,Ut),(Vr.litHtmlVersions??=[]).push("3.3.3");var is=Symbol.for(""),_a=e=>{if(e?.r===is)return e?._$litStatic$},Wr=e=>({_$litStatic$:e,r:is});var ss=new Map,qr=e=>(t,...r)=>{let n=r.length,s,i,o=[],a=[],c,l=0,u=!1;for(;l<n;){for(c=t[l];l<n&&(i=r[l],(s=_a(i))!==void 0);)c+=s+t[++l],u=!0;l!==n&&a.push(i),o.push(c),l++}if(l===n&&o.push(t[n]),u){let d=o.join("$$lit$$");(t=ss.get(d))===void 0&&(o.raw=o,ss.set(d,t=o)),r=a}return e(t,...r)},Gr=qr(es),ol=qr(ts),al=qr(rs);var Yr=A(ee()),Es=A(T());var Le;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(Le||(Le={}));var z=A(se()),p=A(T()),os=p.FtCssVariableFactory.extend("--ft-typography-font-family","",p.designSystemVariables.titleFont),ie=p.FtCssVariableFactory.extend("--ft-typography-font-family","",p.designSystemVariables.contentFont),v={fontFamily:ie,fontSize:p.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:p.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:p.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:p.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:p.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},Ue={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-title-font-family","",os),fontSize:p.FtCssVariableFactory.extend("--ft-typography-title-font-size","",v.fontSize,"20px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",v.letterSpacing,"0.15px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-title-line-height","",v.lineHeight,"1.2"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",v.textTransform,"inherit")},Fe={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",os),fontSize:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",v.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",v.letterSpacing,"0.105px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",v.lineHeight,"1.7"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",v.textTransform,"inherit")},$e={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",v.fontSize,"16px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",v.fontWeight,"600"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",v.letterSpacing,"0.144px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",v.lineHeight,"1.5"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",v.textTransform,"inherit")},Be={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",v.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",v.letterSpacing,"0.098px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",v.lineHeight,"1.7"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",v.textTransform,"inherit")},He={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",v.fontSize,"16px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",v.letterSpacing,"0.496px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",v.lineHeight,"1.5"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",v.textTransform,"inherit")},je={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",v.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",v.letterSpacing,"0.252px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",v.lineHeight,"1.4"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",v.textTransform,"inherit")},Ve={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",v.fontSize,"12px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",v.letterSpacing,"0.396px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",v.lineHeight,"1.33"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",v.textTransform,"inherit")},ze={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",v.fontSize,"10px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",v.letterSpacing,"0.33px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",v.lineHeight,"1.6"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",v.textTransform,"inherit")},Ke={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",v.fontSize,"10px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",v.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",v.letterSpacing,"1.5px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",v.lineHeight,"1.6"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",v.textTransform,"uppercase")},We={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-button-font-family","",ie),fontSize:p.FtCssVariableFactory.extend("--ft-typography-button-font-size","",v.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",v.fontWeight,"600"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",v.letterSpacing,"1.246px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-button-line-height","",v.lineHeight,"1.15"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",v.textTransform,"uppercase")},as=z.css`
|
|
4
4
|
.ft-typography--title {
|
|
5
5
|
font-family: ${Ue.fontFamily};
|
|
6
6
|
font-size: ${Ue.fontSize};
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
</${Wr(this.element)}>
|
|
104
104
|
`:Gr`
|
|
105
105
|
<slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
|
|
106
|
-
`}};oe.styles=[as,cs,ls,us,ds,fs,ps,hs,ms,ys,gs];vs([(0,Yr.property)()],oe.prototype,"element",void 0);vs([(0,Yr.property)()],oe.prototype,"variant",void 0);var
|
|
106
|
+
`}};oe.styles=[as,cs,ls,us,ds,fs,ps,hs,ms,ys,gs];vs([(0,Yr.property)()],oe.prototype,"element",void 0);vs([(0,Yr.property)()],oe.prototype,"variant",void 0);var xs=A(T());var Ss={"ft-typography":oe};(0,xs.customElements)(Ss);var As=A(se()),pe=A(T()),dt={distance:pe.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:pe.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:pe.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:pe.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",pe.designSystemVariables.borderRadiusS),maxWidth:pe.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},bs=As.css`
|
|
107
107
|
.ft-tooltip--container {
|
|
108
108
|
display: block;
|
|
109
109
|
}
|
|
@@ -134,15 +134,15 @@
|
|
|
134
134
|
position: relative;
|
|
135
135
|
word-break: break-word;
|
|
136
136
|
}
|
|
137
|
-
`;var ws=["top","right","bottom","left"],_s=["start","end"],Jr=ws.reduce((e,t)=>e.concat(t,t+"-"+_s[0],t+"-"+_s[1]),[]),ft=Math.min,he=Math.max,pt=Math.round;var te=e=>({x:e,y:e}),wa={left:"right",right:"left",bottom:"top",top:"bottom"};function Cs(e,t,r){return he(e,ft(t,r))}function Ft(e,t){return typeof e=="function"?e(t):e}function ht(e){return e.split("-")[0]}function me(e){return e.split("-")[1]}function Qr(e){return e==="x"?"y":"x"}function Zr(e){return e==="y"?"height":"width"}function $t(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function en(e){return Qr($t(e))}function Ts(e,t,r){r===void 0&&(r=!1);let n=me(e),s=en(e),i=Zr(s),o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Xr(o)),[o,Xr(o)]}function Os(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Xr(e){let t=ht(e);return wa[t]+e.slice(t.length)}function Ca(e){var t,r,n,s;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(n=e.bottom)!=null?n:0,left:(s=e.left)!=null?s:0}}function Rs(e){return typeof e!="number"?Ca(e):{top:e,right:e,bottom:e,left:e}}function be(e){let{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Is(e,t,r){let{reference:n,floating:s}=e,i=$t(t),o=en(t),a=Zr(o),c=ht(t),l=i==="y",u=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2,h;switch(c){case"top":h={x:u,y:n.y-s.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}let y=me(t);return y&&(h[o]+=f*(y==="end"?1:-1)*(r&&l?-1:1)),h}async function Ms(e,t){var r;t===void 0&&(t={});let{x:n,y:s,platform:i,rects:o,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Ft(t,e),y=Rs(h),m=a[f?d==="floating"?"reference":"floating":d],S=be(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(m)))==null||r?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),w=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),A=await(i.isElement==null?void 0:i.isElement(g))&&await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1},_=be(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:g,strategy:c}):w);return{top:(S.top-_.top+y.top)/A.y,bottom:(_.bottom-S.bottom+y.bottom)/A.y,left:(S.left-_.left+y.left)/A.x,right:(_.right-S.right+y.right)/A.x}}var Ta=50,Ns=async(e,t,r)=>{let{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:Ms},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=Is(l,n,c),f=n,h=0,y={};for(let E=0;E<i.length;E++){let m=i[E];if(!m)continue;let{name:S,fn:w}=m,{x:g,y:A,data:_,reset:R}=await w({x:u,y:d,initialPlacement:n,placement:f,strategy:s,middlewareData:y,rects:l,platform:a,elements:{reference:e,floating:t}});u=g??u,d=A??d,y[S]={...y[S],..._},R&&h<Ta&&(h++,typeof R=="object"&&(R.placement&&(f=R.placement),R.rects&&(l=R.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):R.rects),{x:u,y:d}=Is(l,f,c)),E=-1)}return{x:u,y:d,placement:f,strategy:s,middlewareData:y}};function Oa(e,t,r){return(e?[...r.filter(s=>me(s)===e),...r.filter(s=>me(s)!==e)]:r.filter(s=>ht(s)===s)).filter(s=>e?me(s)===e||(t?Os(s)!==s:!1):!0)}var ks=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,s;let{rects:i,middlewareData:o,placement:a,platform:c,elements:l}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Jr,autoAlignment:h=!0,...y}=Ft(e,t),E=d!==void 0||f===Jr?Oa(d||null,h,f):f,m=((r=o.autoPlacement)==null?void 0:r.index)||0,S=E[m];if(S==null)return{};if(a!==S)return{reset:{placement:E[0]}};let w=await c.detectOverflow(t,y),g=Ts(S,i,await(c.isRTL==null?void 0:c.isRTL(l.floating))),A=[w[ht(S)],w[g[0]],w[g[1]]],_=[...((n=o.autoPlacement)==null?void 0:n.overflows)||[],{placement:S,overflows:A}],R=E[m+1];if(R)return{data:{index:m+1,overflows:_},reset:{placement:R}};let C=_.map(V=>{let Ee=me(V.placement);return[V.placement,Ee&&u?V.overflows.slice(0,2).reduce((fa,pa)=>fa+pa,0):V.overflows[0],V.overflows]}).sort((V,Ee)=>V[1]-Ee[1]),ot=((s=C.filter(V=>V[2].slice(0,me(V[0])?2:3).every(Ee=>Ee<=0))[0])==null?void 0:s[0])||C[0][0];return ot!==a?{data:{index:m+1,overflows:_},reset:{placement:ot}}:{}}}};var Ps=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:s,platform:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x:g,y:A}=w;return{x:g,y:A}}},...l}=Ft(e,t),u={x:r,y:n},d=await i.detectOverflow(t,l),f=$t(s),h=Qr(f),y=u[h],E=u[f],m=(w,g)=>Cs(g+d[w==="y"?"top":"left"],g,g-d[w==="y"?"bottom":"right"]);o&&(y=m(h,y)),a&&(E=m(f,E));let S=c.fn({...t,[h]:y,[f]:E});return{...S,data:{x:S.x-r,y:S.y-n,enabled:{[h]:o,[f]:a}}}}}};function Ht(){return typeof window<"u"}function we(e){return Ls(e)?(e.nodeName||"").toLowerCase():"#document"}function F(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(Ls(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ls(e){return Ht()?e instanceof Node||e instanceof F(e).Node:!1}function Y(e){return Ht()?e instanceof Element||e instanceof F(e).Element:!1}function ce(e){return Ht()?e instanceof HTMLElement||e instanceof F(e).HTMLElement:!1}function Ds(e){return!Ht()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof F(e).ShadowRoot}function mt(e){let{overflow:t,overflowX:r,overflowY:n,display:s}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function Us(e){return/^(table|td|th)$/.test(we(e))}function yt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Ra=/transform|translate|scale|rotate|perspective|filter/,Ia=/paint|layout|strict|content/,_e=e=>!!e&&e!=="none",tn;function qe(e){let t=Y(e)?X(e):e;return _e(t.transform)||_e(t.translate)||_e(t.scale)||_e(t.rotate)||_e(t.perspective)||!jt()&&(_e(t.backdropFilter)||_e(t.filter))||Ra.test(t.willChange||"")||Ia.test(t.contain||"")}function Fs(e){let t=ye(e);for(;ce(t)&&!Ge(t);){if(qe(t))return t;if(yt(t))return null;t=ye(t)}return null}function jt(){return tn==null&&(tn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tn}function Ge(e){return/^(html|body|#document)$/.test(we(e))}function X(e){return F(e).getComputedStyle(e)}function gt(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ye(e){if(we(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ds(e)&&e.host||ae(e);return Ds(t)?t.host:t}function $s(e){let t=ye(e);return Ge(t)?(e.ownerDocument||e).body:ce(t)&&mt(t)?t:$s(t)}function Bt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let s=$s(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=F(s);if(i){let a=Vt(o);return t.concat(o,o.visualViewport||[],mt(s)?s:[],a&&r?Bt(a):[])}else return t.concat(s,Bt(s,[],r))}function Vt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function js(e){let t=X(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,s=ce(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=pt(r)!==i||pt(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Vs(e){return Y(e)?e:e.contextElement}function Ye(e){let t=Vs(e);if(!ce(t))return te(1);let r=t.getBoundingClientRect(),{width:n,height:s,$:i}=js(t),o=(i?pt(r.width):r.width)/n,a=(i?pt(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var Ma=te(0);function zs(e){let t=F(e);return!jt()||!t.visualViewport?Ma:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Na(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===F(e)}function vt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let s=e.getBoundingClientRect(),i=Vs(e),o=te(1);t&&(n?Y(n)&&(o=Ye(n)):o=Ye(e));let a=Na(i,r,n)?zs(i):te(0),c=(s.left+a.x)/o.x,l=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i&&n){let f=F(i),h=Y(n)?F(n):n,y=f,E=Vt(y);for(;E&&h!==y;){let m=Ye(E),S=E.getBoundingClientRect(),w=X(E),g=S.left+(E.clientLeft+parseFloat(w.paddingLeft))*m.x,A=S.top+(E.clientTop+parseFloat(w.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,d*=m.y,c+=g,l+=A,y=F(E),E=Vt(y)}}return be({width:u,height:d,x:c,y:l})}function zt(e,t){let r=gt(e).scrollLeft;return t?t.left+r:vt(ae(e)).left+r}function Ks(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-zt(e,r),s=r.top+t.scrollTop;return{x:n,y:s}}function ka(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e,i=s==="fixed",o=ae(n),a=t?yt(t.floating):!1;if(n===o||a&&i)return r;let c={scrollLeft:0,scrollTop:0},l=te(1),u=te(0),d=ce(n);if((d||!i)&&((we(n)!=="body"||mt(o))&&(c=gt(n)),d)){let h=vt(n);l=Ye(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}let f=o&&!d&&!i?Ks(o,c):te(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:r.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Pa(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Da(e){let t=gt(e),r=e.ownerDocument.body,n=he(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=he(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),i=-t.scrollLeft+zt(e),o=-t.scrollTop;return X(r).direction==="rtl"&&(i+=he(e.clientWidth,r.clientWidth)-n),{width:n,height:s,x:i,y:o}}var La=25;function Ua(e,t,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",s=F(e),i=ae(e),o=s.visualViewport,a=i.clientWidth,c=i.clientHeight,l=0,u=0;if(o){let f=!jt()||t==="fixed";n?f||(l=-o.offsetLeft,u=-o.offsetTop):(a=o.width,c=o.height,f&&(l=o.offsetLeft,u=o.offsetTop))}if(zt(i)<=0){let f=i.ownerDocument,h=f.body,y=getComputedStyle(h),E=f.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,m=Math.abs(i.clientWidth-h.clientWidth-E),S=getComputedStyle(i).scrollbarGutter==="stable both-edges"?m/2:m;S<=La&&(a-=S)}return{width:a,height:c,x:l,y:u}}function Fa(e,t){let r=vt(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=Ye(e),o=e.clientWidth*i.x,a=e.clientHeight*i.y,c=s*i.x,l=n*i.y;return{width:o,height:a,x:c,y:l}}function Bs(e,t,r){let n;if(t==="viewport"||t==="layoutViewport")n=Ua(e,r,t);else if(t==="document")n=Da(ae(e));else if(Y(t))n=Fa(t,r);else{let s=zs(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return be(n)}function $a(e,t){let r=t.get(e);if(r)return r;let n=Bt(e,[],!1).filter(a=>Y(a)&&we(a)!=="body"),s=null,i=X(e).position==="fixed",o=i?ye(e):e;for(;Y(o)&&!Ge(o);){let a=X(o),c=qe(o),l=s?s.position:i?"fixed":"";!c&&(l==="fixed"||l==="absolute"&&a.position==="static")?n=n.filter(d=>d!==o):s=a,o=ye(o)}return t.set(e,n),n}function Ba(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e,o=[...r==="clippingAncestors"?yt(t)?[]:$a(t,this._c):[].concat(r),n],a=Bs(t,o[0],s),c=a.top,l=a.right,u=a.bottom,d=a.left;for(let f=1;f<o.length;f++){let h=Bs(t,o[f],s);c=he(h.top,c),l=ft(h.right,l),u=ft(h.bottom,u),d=he(h.left,d)}return{width:l-d,height:u-c,x:d,y:c}}function Ha(e){let{width:t,height:r}=js(e);return{width:t,height:r}}function ja(e,t,r){let n=ce(t),s=ae(t),i=r==="fixed",o=vt(e,!0,i,t),a={scrollLeft:0,scrollTop:0},c=te(0);if((n||!i)&&((we(t)!=="body"||mt(s))&&(a=gt(t)),n)){let f=vt(t,!0,i,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}!n&&s&&(c.x=zt(s));let l=s&&!n&&!i?Ks(s,a):te(0),u=o.left+a.scrollLeft-c.x-l.x,d=o.top+a.scrollTop-c.y-l.y;return{x:u,y:d,width:o.width,height:o.height}}function rn(e){return X(e).position==="static"}function Hs(e,t){if(!ce(e)||X(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ae(e)===r&&(r=r.ownerDocument.body),r}function Ws(e,t){let r=F(e);if(yt(e))return r;if(!ce(e)){let s=ye(e);for(;s&&!Ge(s);){if(Y(s)&&!rn(s))return s;s=ye(s)}return r}let n=Hs(e,t);for(;n&&Us(n)&&rn(n);)n=Hs(n,t);return n&&Ge(n)&&rn(n)&&!qe(n)?r:n||Fs(e)||r}var Va=async function(e){let t=this.getOffsetParent||Ws,r=this.getDimensions,n=await r(e.floating);return{reference:ja(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function za(e){return X(e).direction==="rtl"}var Kt={convertOffsetParentRelativeRectToViewportRelativeRect:ka,getDocumentElement:ae,getClippingRect:Ba,getOffsetParent:Ws,getElementRects:Va,getClientRects:Pa,getDimensions:Ha,getScale:Ye,isElement:Y,isRTL:za};var qs=ks,Gs=Ps;var Ys=(e,t,r)=>{let n=new Map,s=r??{},i={...Kt,...s.platform,_c:n};return Ns(e,t,{...s,platform:i})};function Xs(e){return Ka(e)}function nn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Ka(e){for(let t=e;t;t=nn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=nn(e);t;t=nn(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||qe(r)||t.tagName==="BODY"))return t}return null}async function Js(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},Ys(e,t,{strategy:n.strategy,platform:{...Kt,getOffsetParent:s=>Kt.getOffsetParent(s,Xs)},middleware:[Gs({crossAxis:!0}),qs({allowedPlacements:[n.placement]})]})}var it=x(T());var Cn=x(ee());var Qs=x(ee(),1);var sn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function Zs(e,t){return(0,Qs.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Et(e);try{return JSON.parse(r)}catch{return Et(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:St,...t??{}})}function Wa(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Xe(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Xe(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!Xe(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Xe(e,t){try{return Wa(e,t)}catch{return!1}}function St(e,t){return!Xe(e,t)}function Et(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Wt(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var ei=x(ee(),1);var on=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:St,attribute:!1,...t};(0,ei.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[n]),store:t.store})}};var qt=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Ce=x(ee(),1);var Gt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){s(a);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ri=x(se(),1);var Yt=globalThis,qa=Yt.ShadowRoot&&(Yt.ShadyCSS===void 0||Yt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ti=(e,t)=>{if(qa)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),s=Yt.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,e.appendChild(n)}};var Xt=class extends ri.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return ti(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){sn(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function ni(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var Qe=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},ai,si=Symbol("constructorPrototype"),ii=Symbol("constructorName"),ci=Symbol("exportpartsDebouncer"),oi=Symbol("dynamicDependenciesLoaded"),Je=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Je.eventName="exportparts-updated";var re=class extends Xt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ai]=new Gt(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[ci].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[ii]=this.constructor.name,this[si]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ii]&&Object.setPrototypeOf(this,this[si])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[oi]||(r[oi]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Je.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Je.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Je)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=ni(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,s,i,o,a;let c=f=>f!=null&&f.trim().length>0,l=t.filter(c).map(f=>f.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let h=(i=(s=f.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&i!==void 0?i:[],y=(a=(o=f.getAttribute("exportparts"))===null||o===void 0?void 0:o.split(",").map(m=>m.split(":")[1]))!==null&&a!==void 0?a:[],E=[...h,...y].filter(c).map(m=>m.trim());for(let m of E)u.add(m)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(f=>l.map(h=>`${f}:${h}--${f}`));this.exportparts=[...this.part,...d].join(", ")}};ai=ci;Qe([(0,Ce.property)()],re.prototype,"exportpartsPrefix",void 0);Qe([Zs([])],re.prototype,"exportpartsPrefixes",void 0);Qe([(0,Ce.property)({reflect:!0})],re.prototype,"exportparts",void 0);Qe([(0,Ce.property)()],re.prototype,"customStylesheet",void 0);Qe([(0,Ce.property)()],re.prototype,"elementToFocus",void 0);Qe([(0,Ce.state)()],re.prototype,"useAdoptedStyleSheets",void 0);function Jt(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var At=Symbol("internalReduxEventsUnsubscribers"),ge=Symbol("internalStoresUnsubscribers"),Te=Symbol("internalStores"),Ga=Wt(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Te].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Te].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Te].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[Te].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Te].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Te].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[ge].has(o.store):this[ge].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c;this[ge].set(o,a.subscribe(()=>this.updateFromStores())),this[At].set(o,[]),Jt(a)&&a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((l,u)=>{if(typeof this[u]=="function"&&(!l.store||a.name===l.store)){let d=f=>this[u](f);a.addEventListener(l.eventName,d),this[At].get(o).push(()=>a.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[ge].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[ge].has(o)&&this[ge].get(o)(),this[ge].delete(o),(a=this[At].get(o))===null||a===void 0||a.forEach(c=>c()),this[At].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ge,r=Te,n=At,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),li=class extends Ga(re){};function k(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Ya=typeof Symbol=="function"&&Symbol.observable||"@@observable",ui=Ya,an=()=>Math.random().toString(36).substring(7).split("").join("."),Xa={INIT:`@@redux/INIT${an()}`,REPLACE:`@@redux/REPLACE${an()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${an()}`},Qt=Xa;function Zt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function cn(e,t,r){if(typeof e!="function")throw new Error(k(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(k(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(k(1));return r(cn)(e,t)}let n=e,s=t,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((m,S)=>{o.set(S,m)}))}function u(){if(c)throw new Error(k(3));return s}function d(m){if(typeof m!="function")throw new Error(k(4));if(c)throw new Error(k(5));let S=!0;l();let w=a++;return o.set(w,m),function(){if(S){if(c)throw new Error(k(6));S=!1,l(),o.delete(w),i=null}}}function f(m){if(!Zt(m))throw new Error(k(7));if(typeof m.type>"u")throw new Error(k(8));if(typeof m.type!="string")throw new Error(k(17));if(c)throw new Error(k(9));try{c=!0,s=n(s,m)}finally{c=!1}return(i=o).forEach(w=>{w()}),m}function h(m){if(typeof m!="function")throw new Error(k(10));n=m,f({type:Qt.REPLACE})}function y(){let m=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(k(11));function w(){let A=S;A.next&&A.next(u())}return w(),{unsubscribe:m(w)}},[ui](){return this}}}return f({type:Qt.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:h,[ui]:y}}function Ja(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Qt.INIT})>"u")throw new Error(k(12));if(typeof r(void 0,{type:Qt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(k(13))})}function di(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),s,i;try{Ja(r)}catch(o){i=o}return function(a={},c){if(i)throw i;let l=!1,u={};for(let d=0;d<n.length;d++){let f=n[d],h=r[f],y=a[f],E=h(y,c);if(typeof E>"u"){let m=c&&c.type;throw new Error(k(14))}u[f]=E,l=l||E!==y}return l=l||n.length!==Object.keys(a).length,l?u:a}}function xt(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function fi(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(k(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=e.map(c=>c(o));return i=xt(...a)(s.dispatch),{...s,dispatch:i}}}function pi(e){return Zt(e)&&"type"in e&&typeof e.type=="string"}var xi=Symbol.for("immer-nothing"),hi=Symbol.for("immer-draftable"),L=Symbol.for("immer-state");function J(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var B=Object,et=B.getPrototypeOf,nr="constructor",lr="prototype",fn="configurable",sr="enumerable",tr="writable",bt="value",ne=e=>!!e&&!!e[L];function H(e){return e?bi(e)||dr(e)||!!e[hi]||!!e[nr]?.[hi]||fr(e)||pr(e):!1}var Qa=B[lr][nr].toString(),mi=new WeakMap;function bi(e){if(!e||!Sn(e))return!1;let t=et(e);if(t===null||t===B[lr])return!0;let r=B.hasOwnProperty.call(t,nr)&&t[nr];if(r===Object)return!0;if(!Ze(r))return!1;let n=mi.get(r);return n===void 0&&(n=Function.toString.call(r),mi.set(r,n)),n===Qa}function ur(e,t,r=!0){Ct(e)===0?(r?Reflect.ownKeys(e):B.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Ct(e){let t=e[L];return t?t.type_:dr(e)?1:fr(e)?2:pr(e)?3:0}var ln=(e,t,r=Ct(e))=>r===2?e.has(t):B[lr].hasOwnProperty.call(e,t),pn=(e,t,r=Ct(e))=>r===2?e.get(t):e[t],ir=(e,t,r,n=Ct(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Za(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var dr=Array.isArray,fr=e=>e instanceof Map,pr=e=>e instanceof Set,Sn=e=>typeof e=="object",Ze=e=>typeof e=="function",un=e=>typeof e=="boolean";function ec(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var le=e=>e.copy_||e.base_;var An=e=>e.modified_?e.copy_:e.base_;function hn(e,t){if(fr(e))return new Map(e);if(pr(e))return new Set(e);if(dr(e))return Array[lr].slice.call(e);let r=bi(e);if(t===!0||t==="class_only"&&!r){let n=B.getOwnPropertyDescriptors(e);delete n[L];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[tr]===!1&&(a[tr]=!0,a[fn]=!0),(a.get||a.set)&&(n[o]={[fn]:!0,[tr]:!0,[sr]:a[sr],[bt]:e[o]})}return B.create(et(e),n)}else{let n=et(e);if(n!==null&&r)return{...e};let s=B.create(n);return B.assign(s,e)}}function xn(e,t=!1){return hr(e)||ne(e)||!H(e)||(Ct(e)>1&&B.defineProperties(e,{set:er,add:er,clear:er,delete:er}),B.freeze(e),t&&ur(e,(r,n)=>{xn(n,!0)},!1)),e}function tc(){J(2)}var er={[bt]:tc};function hr(e){return e===null||!Sn(e)?!0:B.isFrozen(e)}var or="MapSet",mn="Patches",yi="ArrayMethods",_i={};function Oe(e){let t=_i[e];return t||J(0,e),t}var gi=e=>!!_i[e];var _t,wi=()=>_t,rc=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:gi(or)?Oe(or):void 0,arrayMethodsPlugin_:gi(yi)?Oe(yi):void 0});function vi(e,t){t&&(e.patchPlugin_=Oe(mn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yn(e){gn(e),e.drafts_.forEach(nc),e.drafts_=null}function gn(e){e===_t&&(_t=e.parent_)}var Ei=e=>_t=rc(_t,e);function nc(e){let t=e[L];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Si(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[L].modified_&&(yn(t),J(4)),H(e)&&(e=Ai(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[L].base_,e,t)}else e=Ai(t,r);return sc(t,e,!0),yn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==xi?e:void 0}function Ai(e,t){if(hr(t))return t;let r=t[L];if(!r)return ar(t,e.handledSet_,e);if(!mr(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Oi(r,e)}return r.copy_}function sc(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&xn(t,r)}function Ci(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var mr=(e,t)=>e.scope_===t,ic=[];function Ti(e,t,r,n){let s=le(e),i=e.type_;if(n!==void 0&&pn(s,n,i)===t){ir(s,n,r,i);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;ur(s,(c,l)=>{if(ne(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??ic;for(let a of o)ir(s,a,r,i)}function oc(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!mr(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=An(i);Ti(e,i.draft_??i,o,r),Oi(i,s)})}function Oi(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}Ci(e)}}function ac(e,t,r){let{scope_:n}=e;if(ne(r)){let s=r[L];mr(s,n)&&s.callbacks_.push(function(){rr(e);let o=An(s);Ti(e,r,o,t)})}else H(r)&&e.callbacks_.push(function(){let i=le(e);e.type_===3?i.has(r)&&ar(r,n.handledSet_,n):pn(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ar(pn(e.copy_,t,e.type_),n.handledSet_,n)})}function ar(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ne(e)||t.has(e)||!H(e)||hr(e)||(t.add(e),ur(e,(n,s)=>{if(ne(s)){let i=s[L];if(mr(i,r)){let o=An(i);ir(e,n,o,e.type_),Ci(i)}}else H(s)&&ar(s,t,r)})),e}function cc(e,t){let r=dr(e),n={type_:r?1:0,scope_:t?t.scope_:wi(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=cr;r&&(s=[n],i=wt);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var cr={get(e,t){if(t===L)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=le(e);if(!ln(s,t,e.type_))return uc(e,s,t);let i=s[t];if(e.finalized_||!H(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&ec(t))return i;if(i===dn(e.base_,t)||lc(e,t,i)){rr(e);let o=e.type_===1?+t:t,a=En(e.scope_,i,e,o);return e.copy_[o]=a}return i},has(e,t){return t in le(e)},ownKeys(e){return Reflect.ownKeys(le(e))},set(e,t,r){let n=Ri(le(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=dn(le(e),t),i=s?.[L];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(Za(r,s)&&(r!==void 0||ln(e.base_,t,e.type_)))return!0;rr(e),vn(e)}return e.copy_[t]===r&&(r!==void 0||ln(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),ac(e,t,r)),!0},deleteProperty(e,t){return rr(e),dn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),vn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=le(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[tr]:!0,[fn]:e.type_!==1||t!=="length",[sr]:n[sr],[bt]:r[t]}},defineProperty(){J(11)},getPrototypeOf(e){return et(e.base_)},setPrototypeOf(){J(12)}},wt={};for(let e in cr){let t=cr[e];wt[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}wt.deleteProperty=function(e,t){return wt.set.call(this,e,t,void 0)};wt.set=function(e,t,r){return cr.set.call(this,e[0],t,r,e[0])};function dn(e,t){let r=e[L];return(r?le(r):e)[t]}function lc(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!H(r)||r[L]?!1:e.baseRefs_.has(r)}function uc(e,t,r){let n=Ri(t,r);return n?bt in n?n[bt]:n.get?.call(e.draft_):void 0}function Ri(e,t){if(!(t in e))return;let r=et(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=et(r)}}function vn(e){e.modified_||(e.modified_=!0,e.parent_&&vn(e.parent_))}function rr(e){e.copy_||(e.assigned_=new Map,e.copy_=hn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var dc=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Ze(t)&&!Ze(r)){let i=r;r=t;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}Ze(r)||J(6),n!==void 0&&!Ze(n)&&J(7);let s;if(H(t)){let i=Ei(this),o=En(i,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?yn(i):gn(i)}return vi(i,n),Si(s,i)}else if(!t||!Sn(t)){if(s=r(t),s===void 0&&(s=t),s===xi&&(s=void 0),this.autoFreeze_&&xn(s,!0),n){let i=[],o=[];Oe(mn).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else J(1,t)},this.produceWithPatches=(t,r)=>{if(Ze(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,s;return[this.produce(t,r,(o,a)=>{n=o,s=a}),n,s]},un(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),un(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),un(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){H(e)||J(8),ne(e)&&(e=Ii(e));let t=Ei(this),r=En(t,e,void 0);return r[L].isManual_=!0,gn(t),r}finishDraft(e,t){let r=e&&e[L];(!r||!r.isManual_)&&J(9);let{scope_:n}=r;return vi(n,t),Si(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=Oe(mn).applyPatches_;return ne(e)?n(e,t):this.produce(e,s=>n(s,t))}};function En(e,t,r,n){let[s,i]=fr(t)?Oe(or).proxyMap_(t,r):pr(t)?Oe(or).proxySet_(t,r):cc(t,r);return(r?.scope_??wi()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?oc(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),s}function Ii(e){return ne(e)||J(10,e),Mi(e)}function Mi(e){if(!H(e)||hr(e))return e;let t=e[L],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=hn(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=hn(e,!0);return ur(r,(s,i)=>{ir(r,s,Mi(i))},n),t&&(t.finalized_=!1),r}var fc=new dc,bn=fc.produce;function Ni(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var ki=Ni(),Pi=Ni;var pc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?xt:xt.apply(null,arguments)},Ru=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},hc=e=>e&&typeof e.match=="function";function ve(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(ue(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>pi(n)&&n.type===e,r}var $i=class Tt extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Tt.prototype)}static get[Symbol.species](){return Tt}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Tt(...t[0].concat(this)):new Tt(...t.concat(this))}};function Di(e){return H(e)?bn(e,()=>{}):e}function yr(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function mc(e){return typeof e=="boolean"}var yc=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},o=new $i;return r&&(mc(r)?o.push(ki):o.push(Pi(r.extraArgument))),o},gc="RTK_autoBatch";var Li=e=>t=>{setTimeout(t,e)},vc=(e,t)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(o),r())},i=e(s),o=setTimeout(s,t)},Ec=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?vc(window.requestAnimationFrame,100):Li(10):e.type==="callback"?e.queueNotification:Li(e.timeout),l=()=>{o=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>s&&u(),f=n.subscribe(d);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[gc],i=!s,i&&(o||(o=!0,c(l))),n.dispatch(u)}finally{s=!0}}})},Sc=e=>function(r){let{autoBatch:n=!0}=r??{},s=new $i(e);return n&&s.push(Ec(typeof n=="object"?n:void 0)),s};function Bi(e){let t=yc(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(Zt(r))c=di(r);else throw new Error(ue(1));let l;typeof n=="function"?l=n(t):l=t();let u=xt;s&&(u=pc({trace:!1,...typeof s=="object"&&s}));let d=fi(...l),f=Sc(d),h=typeof a=="function"?a(f):f(),y=u(...h);return cn(c,o,y)}function Hi(e){let t={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(ue(28));if(a in t)throw new Error(ue(29));return t[a]=o,s},addAsyncThunk(i,o){return o.pending&&(t[i.pending.type]=o.pending),o.rejected&&(t[i.rejected.type]=o.rejected),o.fulfilled&&(t[i.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return r.push({matcher:i,reducer:o}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function Ac(e){return typeof e=="function"}function xc(e,t){let[r,n,s]=Hi(t),i;if(Ac(e))i=()=>Di(e());else{let a=Di(e);i=()=>a}function o(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[s]),l.reduce((u,d)=>{if(d)if(ne(u)){let h=d(u,c);return h===void 0?u:h}else{if(H(u))return bn(u,f=>d(f,c));{let f=d(u,c);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return o.getInitialState=i,o}var bc=(e,t)=>hc(e)?e.match(t):e(t);function _c(...e){return t=>e.some(r=>bc(r,t))}var wc="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Cc=(e=21)=>{let t="",r=e;for(;r--;)t+=wc[Math.random()*64|0];return t},Tc=["name","message","stack","code"],_n=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Ui=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Oc=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Tc)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Fi="External signal was aborted",Rc=(()=>{function e(t,r,n){let s=ve(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=ve(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=ve(t+"/rejected",(c,l,u,d,f)=>({payload:d,error:(n&&n.serializeError||Oc)(c||"Rejected"),meta:{...f||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,d,f)=>{let h=n?.idGenerator?n.idGenerator(c):Cc(),y=new AbortController,E,m;function S(g){m=g,y.abort()}l&&(l.aborted?S(Fi):l.addEventListener("abort",()=>S(Fi),{once:!0}));let w=(async function(){let g;try{let _=n?.condition?.(c,{getState:d,extra:f});if(Mc(_)&&(_=await _),_===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let R=new Promise((C,I)=>{E=()=>{I({name:"AbortError",message:m||"Aborted"})},y.signal.addEventListener("abort",E,{once:!0})});u(i(h,c,n?.getPendingMeta?.({requestId:h,arg:c},{getState:d,extra:f}))),g=await Promise.race([R,Promise.resolve(r(c,{dispatch:u,getState:d,extra:f,requestId:h,signal:y.signal,abort:S,rejectWithValue:((C,I)=>new _n(C,I)),fulfillWithValue:((C,I)=>new Ui(C,I))})).then(C=>{if(C instanceof _n)throw C;return C instanceof Ui?s(C.payload,h,c,C.meta):s(C,h,c)})])}catch(_){g=_ instanceof _n?o(null,h,c,_.payload,_.meta):o(_,h,c)}finally{E&&y.signal.removeEventListener("abort",E)}return n&&!n.dispatchConditionRejection&&o.match(g)&&g.meta.condition||u(g),g})();return Object.assign(w,{abort:S,requestId:h,arg:c,unwrap(){return w.then(Ic)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:_c(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function Ic(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Mc(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ji=Symbol.for("rtk-slice-createasyncthunk"),Mu={[ji]:Rc};function Nc(e,t){return`${e}/${t}`}function kc({creators:e}={}){let t=e?.asyncThunk?.[ji];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(ue(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(Dc()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(g,A){let _=typeof g=="string"?g:g.type;if(!_)throw new Error(ue(12));if(_ in c.sliceCaseReducersByType)throw new Error(ue(13));return c.sliceCaseReducersByType[_]=A,l},addMatcher(g,A){return c.sliceMatchers.push({matcher:g,reducer:A}),l},exposeAction(g,A){return c.actionCreators[g]=A,l},exposeCaseReducer(g,A){return c.sliceCaseReducersByName[g]=A,l}};a.forEach(g=>{let A=o[g],_={reducerName:g,type:Nc(s,g),createNotation:typeof n.reducers=="function"};Uc(A)?$c(_,A,l,t):Lc(_,A,l)});function u(){let[g={},A=[],_=void 0]=typeof n.extraReducers=="function"?Hi(n.extraReducers):[n.extraReducers],R={...g,...c.sliceCaseReducersByType};return xc(n.initialState,C=>{for(let I in R)C.addCase(I,R[I]);for(let I of c.sliceMatchers)C.addMatcher(I.matcher,I.reducer);for(let I of A)C.addMatcher(I.matcher,I.reducer);_&&C.addDefaultCase(_)})}let d=g=>g,f=new Map,h=new WeakMap,y;function E(g,A){return y||(y=u()),y(g,A)}function m(){return y||(y=u()),y.getInitialState()}function S(g,A=!1){function _(C){let I=C[g];return typeof I>"u"&&A&&(I=yr(h,_,m)),I}function R(C=d){let I=yr(f,A,()=>new WeakMap);return yr(I,C,()=>{let ot={};for(let[V,Ee]of Object.entries(n.selectors??{}))ot[V]=Pc(Ee,C,()=>yr(h,C,m),A);return ot})}return{reducerPath:g,getSelectors:R,get selectors(){return R(_)},selectSlice:_}}let w={name:s,reducer:E,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:m,...S(i),injectInto(g,{reducerPath:A,..._}={}){let R=A??i;return g.inject({reducerPath:R,reducer:E},_),{...w,...S(R,!0)}}};return w}}function Pc(e,t,r,n){function s(i,...o){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var Vi=kc();function Dc(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Lc({type:e,reducerName:t,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!Fc(n))throw new Error(ue(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?ve(e,o):ve(e))}function Uc(e){return e._reducerDefinitionType==="asyncThunk"}function Fc(e){return e._reducerDefinitionType==="reducerWithPrepare"}function $c({type:e,reducerName:t},r,n,s){if(!s)throw new Error(ue(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=s(e,i,u);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:o||gr,pending:a||gr,rejected:c||gr,settled:l||gr})}function gr(){}var zi="listener",Ki="completed",Wi="cancelled",Nu=`task-${Wi}`,ku=`task-${Ki}`,Pu=`${zi}-${Wi}`,Du=`${zi}-${Ki}`;var{assign:qi}=Object;var wn="listenerMiddleware";var Bc=qi(ve(`${wn}/add`),{withTypes:()=>Bc}),Lu=ve(`${wn}/removeAll`),Hc=qi(ve(`${wn}/remove`),{withTypes:()=>Hc});function ue(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var jc=Wt(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),vr=class extends jc(Object){};window.ftReduxStores||(window.ftReduxStores={});var Gi=class e extends vr{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Jt(i))return i;if(s==null)return;let o=Vi({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=Bi({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=Et(o.getInitialState());for(let d of l.keeping)u[d]=(c??u)[d];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new qt,this.injectInto=(i,o)=>this.reduxSlice.injectInto(i,o),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,o,a)=>{let c=o,l=i[c];return l?(...u)=>{let d=l(...u.map(s));return this.reduxStore.dispatch(d),d}:u=>{let d=c,f=this.getState()[d];Xe(f,u)||this.setState({[d]:s(u)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Er=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return i?c:s?`${a} ${c}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Sr=x(T()),Vc="ft-app-info",tt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};tt.eventName="authentication-change";var Ot=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ot.eventName="ui-locale-changed";var zc={session:(e,t)=>{(0,Sr.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>b.dispatchEvent(new tt(t.payload)),0))}},b=Sr.FtReduxStore.get({name:Vc,reducers:zc,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,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Yi=x(T()),Ar=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},fd=(0,Yi.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(b)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(a=>a.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?a=>Er.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ar([(0,Cn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Ar([(0,Cn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Ar([on({store:b.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),Ar([on({store:b.name})],t.prototype,"uiLocale",void 0),t});var Xi;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Xi||(Xi={}));var Ji;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Ji||(Ji={}));var Qi;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Qi||(Qi={}));var Zi;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Zi||(Zi={}));var eo;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(eo||(eo={}));var to;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(to||(to={}));var ro;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(ro||(ro={}));var no;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(no||(no={}));var so;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(so||(so={}));var io;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(io||(io={}));var oo;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(oo||(oo={}));var ao;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(ao||(ao={}));var co;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(co||(co={}));var lo;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(lo||(lo={}));var uo;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(uo||(uo={}));var fo;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(fo||(fo={}));var po;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(po||(po={}));var ho;(function(e){e.ASC="ASC",e.DESC="DESC"})(ho||(ho={}));var mo;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(mo||(mo={}));var yo;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(yo||(yo={}));var go;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(go||(go={}));var vo;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(vo||(vo={}));var Eo;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Eo||(Eo={}));var So;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(So||(So={}));var Ao;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Ao||(Ao={}));var xo;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(xo||(xo={}));var bo;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(bo||(bo={}));var M;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(M||(M={}));var K;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(K||(K={}));var _o;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(_o||(_o={}));var wo;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(wo||(wo={}));var Co;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Co||(Co={}));var To;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(To||(To={}));var Oo;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Oo||(Oo={}));var Ro;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ro||(Ro={}));var Io;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Io||(Io={}));var Mo;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Mo||(Mo={}));var No;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(No||(No={}));var ko;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(ko||(ko={}));var Po;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Po||(Po={}));var Do;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Do||(Do={}));var Kc={[M.PERSONAL_BOOK_SHARE_USER]:[M.PERSONAL_BOOK_USER],[M.HTML_EXPORT_USER]:[M.PERSONAL_BOOK_USER],[M.PDF_EXPORT_USER]:[M.PERSONAL_BOOK_USER],[M.KHUB_ADMIN]:[M.CONTENT_PUBLISHER],[M.ADMIN]:[M.KHUB_ADMIN,M.USERS_ADMIN,M.PORTAL_ADMIN,M.BEHAVIOR_DATA_USER],[M.GENERATIVE_AI_EXPORT_USER]:[M.GENERATIVE_AI_USER]};function Lo(e,t){return e===t||(Kc[e]??[]).some(r=>Lo(r,t))}function Uo(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>Lo(n,t))}var Cr=x(T());var Tn=x(T());var Re=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=b.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=b.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var rt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Re.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Re.await()}};var j=class extends rt{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[c])=>a.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new Tn.CacheRegistry,this.cache=t?s.commonCache:new Tn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var xr=class extends j{async listMySearches(){let{session:t}=b.getState();return Uo(t,M.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var br=class extends j{async listMyBookmarks(){let t=b.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var _r=class extends j{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=b.getState().session;return!!t?.sessionAuthenticated}};var wr=class extends j{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=b.getState().session;return!!t?.sessionAuthenticated}};var Wc="ft-user-assets",qc={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(K).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:s}=t.payload;Rn(e,r,[...On(e,r),s]),Fo(e,r,1,n),$o(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Rn(e,r,On(e,r).map(s=>s.id===n.id?n:s)),$o(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;Rn(e,r,On(e,r).filter(i=>i.id!==s)),Fo(e,r,-1,n)}},Bo={[K.SEARCHES]:"savedSearches",[K.BOOKMARKS]:"bookmarks",[K.BOOKS]:void 0,[K.COLLECTIONS]:void 0},On=(e,t)=>{var r;let n=Bo[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Rn=(e,t,r)=>{let n=Bo[t];n&&(e[n]=r)},Fo=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===K.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},$o=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},U=Cr.FtReduxStore.get({name:Wc,reducers:qc,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(K).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),In=class{constructor(t=new _r,r=new wr){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=b.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new br,this.savedSearchesService=new xr,b.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=b.getState();(0,Cr.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),U.actions.clearAssetCount(),U.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),U.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),U.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();U.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();U.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&U.getState().assetCounts.allAsset[t]!==r.count&&U.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&U.getState().assetCounts.bookmarkByMap[t]!==r.count&&U.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(U.getState().assetCounts.bookmarkByMap).length!==0;t===K.BOOKMARKS&&r&&U.actions.clearBookmarkCountByMap(),U.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;U.actions.bookmarks(r)}}},Gc=new In;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Gc);var Mn=class{addCommand(t,r=!1){b.commands.add(t,r)}consumeCommand(t){return b.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Mn;var W=x(T());var Ho,nt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Yc=Symbol("clearAfterUnitTest"),Tr=class extends(0,W.withEventBus)(j){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ho]=()=>{this.defaultMessages={},this.cache=new W.CacheRegistry,this.listeners={}},this.currentUiLocale=b.getState().uiLocale,b.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=b.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,W.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var s;let i=t.toLowerCase(),o=this.resolveContext(i);return new W.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof W.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new nt({loadedContexts:t})),this.dispatchEvent(new nt({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new nt({loadedContexts:[t]})),this.dispatchEvent(new nt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,W.delay)(0).then(()=>n()).catch(()=>null)))}};Ho=Yc;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Tr{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Tr{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Rt=window.FluidTopicsI18nService,Nn=window.FluidTopicsCustomI18nService;var jo=x(T()),kn=class{highlightHtml(t,r,n){(0,jo.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new kn;var Vo=x(T());var Pn=class{isDate(t){var r,n,s,i;return(i=(s=((n=(r=b.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===t))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,o;if(t==null)return"";try{return Vo.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:b.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Pn;var zo=x(T());var It=class{static get(t,r){var n,s,i,o;let a=b.getState(),{lang:c,region:l}=(i=(s=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new zo.SearchPlaceConverter(a.baseUrl,t??20,(o=a.localesConfiguration)===null||o===void 0?void 0:o.allLanguagesAllowed,r??`${c}-${l}`)}};var Dn=class{urlToSearchRequest(t){return It.get().parse(t)}searchRequestToUrl(t){return It.get().serialize(t)}};window.FluidTopicsUrlService=new Dn;var de=x(T());var Ie=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Ie.eventName="change";var Ln=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Ko=new Ln;var Or=class e extends de.WithEventBus{static build(){return new e(window.history,Ko,()=>window.location,!1)}constructor(t,r,n,s){var i,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,de.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ie(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,o,a])=>{let c=r(),l={...c===this.currentIndex?this.currentState:void 0,...i,index:c,href:typeof a=="string"?a:(a??this.windowLocation()).href};n.apply(s,[l,o,a]),this.setCurrentState(l,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Ie.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ie.eventName,t)}currentItem(){return(0,de.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,de.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,de.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,de.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Or.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Wo=x(se());var qo=Wo.css`
|
|
138
|
-
`;var Xo=
|
|
137
|
+
`;var ws=["top","right","bottom","left"],_s=["start","end"],Jr=ws.reduce((e,t)=>e.concat(t,t+"-"+_s[0],t+"-"+_s[1]),[]),ft=Math.min,he=Math.max,pt=Math.round;var te=e=>({x:e,y:e}),wa={left:"right",right:"left",bottom:"top",top:"bottom"};function Cs(e,t,r){return he(e,ft(t,r))}function Ft(e,t){return typeof e=="function"?e(t):e}function ht(e){return e.split("-")[0]}function me(e){return e.split("-")[1]}function Qr(e){return e==="x"?"y":"x"}function Zr(e){return e==="y"?"height":"width"}function $t(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function en(e){return Qr($t(e))}function Ts(e,t,r){r===void 0&&(r=!1);let n=me(e),s=en(e),i=Zr(s),o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Xr(o)),[o,Xr(o)]}function Os(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Xr(e){let t=ht(e);return wa[t]+e.slice(t.length)}function Ca(e){var t,r,n,s;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(n=e.bottom)!=null?n:0,left:(s=e.left)!=null?s:0}}function Rs(e){return typeof e!="number"?Ca(e):{top:e,right:e,bottom:e,left:e}}function be(e){let{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Is(e,t,r){let{reference:n,floating:s}=e,i=$t(t),o=en(t),a=Zr(o),c=ht(t),l=i==="y",u=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2,h;switch(c){case"top":h={x:u,y:n.y-s.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}let y=me(t);return y&&(h[o]+=f*(y==="end"?1:-1)*(r&&l?-1:1)),h}async function Ms(e,t){var r;t===void 0&&(t={});let{x:n,y:s,platform:i,rects:o,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Ft(t,e),y=Rs(h),m=a[f?d==="floating"?"reference":"floating":d],S=be(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(m)))==null||r?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),w=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(g))&&await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1},_=be(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:g,strategy:c}):w);return{top:(S.top-_.top+y.top)/x.y,bottom:(_.bottom-S.bottom+y.bottom)/x.y,left:(S.left-_.left+y.left)/x.x,right:(_.right-S.right+y.right)/x.x}}var Ta=50,Ns=async(e,t,r)=>{let{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:Ms},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=Is(l,n,c),f=n,h=0,y={};for(let E=0;E<i.length;E++){let m=i[E];if(!m)continue;let{name:S,fn:w}=m,{x:g,y:x,data:_,reset:R}=await w({x:u,y:d,initialPlacement:n,placement:f,strategy:s,middlewareData:y,rects:l,platform:a,elements:{reference:e,floating:t}});u=g??u,d=x??d,y[S]={...y[S],..._},R&&h<Ta&&(h++,typeof R=="object"&&(R.placement&&(f=R.placement),R.rects&&(l=R.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):R.rects),{x:u,y:d}=Is(l,f,c)),E=-1)}return{x:u,y:d,placement:f,strategy:s,middlewareData:y}};function Oa(e,t,r){return(e?[...r.filter(s=>me(s)===e),...r.filter(s=>me(s)!==e)]:r.filter(s=>ht(s)===s)).filter(s=>e?me(s)===e||(t?Os(s)!==s:!1):!0)}var ks=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,s;let{rects:i,middlewareData:o,placement:a,platform:c,elements:l}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Jr,autoAlignment:h=!0,...y}=Ft(e,t),E=d!==void 0||f===Jr?Oa(d||null,h,f):f,m=((r=o.autoPlacement)==null?void 0:r.index)||0,S=E[m];if(S==null)return{};if(a!==S)return{reset:{placement:E[0]}};let w=await c.detectOverflow(t,y),g=Ts(S,i,await(c.isRTL==null?void 0:c.isRTL(l.floating))),x=[w[ht(S)],w[g[0]],w[g[1]]],_=[...((n=o.autoPlacement)==null?void 0:n.overflows)||[],{placement:S,overflows:x}],R=E[m+1];if(R)return{data:{index:m+1,overflows:_},reset:{placement:R}};let C=_.map(V=>{let Ee=me(V.placement);return[V.placement,Ee&&u?V.overflows.slice(0,2).reduce((fa,pa)=>fa+pa,0):V.overflows[0],V.overflows]}).sort((V,Ee)=>V[1]-Ee[1]),ot=((s=C.filter(V=>V[2].slice(0,me(V[0])?2:3).every(Ee=>Ee<=0))[0])==null?void 0:s[0])||C[0][0];return ot!==a?{data:{index:m+1,overflows:_},reset:{placement:ot}}:{}}}};var Ps=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:s,platform:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...l}=Ft(e,t),u={x:r,y:n},d=await i.detectOverflow(t,l),f=$t(s),h=Qr(f),y=u[h],E=u[f],m=(w,g)=>Cs(g+d[w==="y"?"top":"left"],g,g-d[w==="y"?"bottom":"right"]);o&&(y=m(h,y)),a&&(E=m(f,E));let S=c.fn({...t,[h]:y,[f]:E});return{...S,data:{x:S.x-r,y:S.y-n,enabled:{[h]:o,[f]:a}}}}}};function Ht(){return typeof window<"u"}function we(e){return Ls(e)?(e.nodeName||"").toLowerCase():"#document"}function F(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(Ls(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ls(e){return Ht()?e instanceof Node||e instanceof F(e).Node:!1}function Y(e){return Ht()?e instanceof Element||e instanceof F(e).Element:!1}function ce(e){return Ht()?e instanceof HTMLElement||e instanceof F(e).HTMLElement:!1}function Ds(e){return!Ht()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof F(e).ShadowRoot}function mt(e){let{overflow:t,overflowX:r,overflowY:n,display:s}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function Us(e){return/^(table|td|th)$/.test(we(e))}function yt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Ra=/transform|translate|scale|rotate|perspective|filter/,Ia=/paint|layout|strict|content/,_e=e=>!!e&&e!=="none",tn;function qe(e){let t=Y(e)?X(e):e;return _e(t.transform)||_e(t.translate)||_e(t.scale)||_e(t.rotate)||_e(t.perspective)||!jt()&&(_e(t.backdropFilter)||_e(t.filter))||Ra.test(t.willChange||"")||Ia.test(t.contain||"")}function Fs(e){let t=ye(e);for(;ce(t)&&!Ge(t);){if(qe(t))return t;if(yt(t))return null;t=ye(t)}return null}function jt(){return tn==null&&(tn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tn}function Ge(e){return/^(html|body|#document)$/.test(we(e))}function X(e){return F(e).getComputedStyle(e)}function gt(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ye(e){if(we(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ds(e)&&e.host||ae(e);return Ds(t)?t.host:t}function $s(e){let t=ye(e);return Ge(t)?(e.ownerDocument||e).body:ce(t)&&mt(t)?t:$s(t)}function Bt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let s=$s(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=F(s);if(i){let a=Vt(o);return t.concat(o,o.visualViewport||[],mt(s)?s:[],a&&r?Bt(a):[])}else return t.concat(s,Bt(s,[],r))}function Vt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function js(e){let t=X(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,s=ce(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=pt(r)!==i||pt(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Vs(e){return Y(e)?e:e.contextElement}function Ye(e){let t=Vs(e);if(!ce(t))return te(1);let r=t.getBoundingClientRect(),{width:n,height:s,$:i}=js(t),o=(i?pt(r.width):r.width)/n,a=(i?pt(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var Ma=te(0);function zs(e){let t=F(e);return!jt()||!t.visualViewport?Ma:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Na(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===F(e)}function vt(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let s=e.getBoundingClientRect(),i=Vs(e),o=te(1);t&&(n?Y(n)&&(o=Ye(n)):o=Ye(e));let a=Na(i,r,n)?zs(i):te(0),c=(s.left+a.x)/o.x,l=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i&&n){let f=F(i),h=Y(n)?F(n):n,y=f,E=Vt(y);for(;E&&h!==y;){let m=Ye(E),S=E.getBoundingClientRect(),w=X(E),g=S.left+(E.clientLeft+parseFloat(w.paddingLeft))*m.x,x=S.top+(E.clientTop+parseFloat(w.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,d*=m.y,c+=g,l+=x,y=F(E),E=Vt(y)}}return be({width:u,height:d,x:c,y:l})}function zt(e,t){let r=gt(e).scrollLeft;return t?t.left+r:vt(ae(e)).left+r}function Ks(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-zt(e,r),s=r.top+t.scrollTop;return{x:n,y:s}}function ka(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e,i=s==="fixed",o=ae(n),a=t?yt(t.floating):!1;if(n===o||a&&i)return r;let c={scrollLeft:0,scrollTop:0},l=te(1),u=te(0),d=ce(n);if((d||!i)&&((we(n)!=="body"||mt(o))&&(c=gt(n)),d)){let h=vt(n);l=Ye(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}let f=o&&!d&&!i?Ks(o,c):te(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:r.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Pa(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Da(e){let t=gt(e),r=e.ownerDocument.body,n=he(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=he(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),i=-t.scrollLeft+zt(e),o=-t.scrollTop;return X(r).direction==="rtl"&&(i+=he(e.clientWidth,r.clientWidth)-n),{width:n,height:s,x:i,y:o}}var La=25;function Ua(e,t,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",s=F(e),i=ae(e),o=s.visualViewport,a=i.clientWidth,c=i.clientHeight,l=0,u=0;if(o){let f=!jt()||t==="fixed";n?f||(l=-o.offsetLeft,u=-o.offsetTop):(a=o.width,c=o.height,f&&(l=o.offsetLeft,u=o.offsetTop))}if(zt(i)<=0){let f=i.ownerDocument,h=f.body,y=getComputedStyle(h),E=f.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,m=Math.abs(i.clientWidth-h.clientWidth-E),S=getComputedStyle(i).scrollbarGutter==="stable both-edges"?m/2:m;S<=La&&(a-=S)}return{width:a,height:c,x:l,y:u}}function Fa(e,t){let r=vt(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=Ye(e),o=e.clientWidth*i.x,a=e.clientHeight*i.y,c=s*i.x,l=n*i.y;return{width:o,height:a,x:c,y:l}}function Bs(e,t,r){let n;if(t==="viewport"||t==="layoutViewport")n=Ua(e,r,t);else if(t==="document")n=Da(ae(e));else if(Y(t))n=Fa(t,r);else{let s=zs(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return be(n)}function $a(e,t){let r=t.get(e);if(r)return r;let n=Bt(e,[],!1).filter(a=>Y(a)&&we(a)!=="body"),s=null,i=X(e).position==="fixed",o=i?ye(e):e;for(;Y(o)&&!Ge(o);){let a=X(o),c=qe(o),l=s?s.position:i?"fixed":"";!c&&(l==="fixed"||l==="absolute"&&a.position==="static")?n=n.filter(d=>d!==o):s=a,o=ye(o)}return t.set(e,n),n}function Ba(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e,o=[...r==="clippingAncestors"?yt(t)?[]:$a(t,this._c):[].concat(r),n],a=Bs(t,o[0],s),c=a.top,l=a.right,u=a.bottom,d=a.left;for(let f=1;f<o.length;f++){let h=Bs(t,o[f],s);c=he(h.top,c),l=ft(h.right,l),u=ft(h.bottom,u),d=he(h.left,d)}return{width:l-d,height:u-c,x:d,y:c}}function Ha(e){let{width:t,height:r}=js(e);return{width:t,height:r}}function ja(e,t,r){let n=ce(t),s=ae(t),i=r==="fixed",o=vt(e,!0,i,t),a={scrollLeft:0,scrollTop:0},c=te(0);if((n||!i)&&((we(t)!=="body"||mt(s))&&(a=gt(t)),n)){let f=vt(t,!0,i,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}!n&&s&&(c.x=zt(s));let l=s&&!n&&!i?Ks(s,a):te(0),u=o.left+a.scrollLeft-c.x-l.x,d=o.top+a.scrollTop-c.y-l.y;return{x:u,y:d,width:o.width,height:o.height}}function rn(e){return X(e).position==="static"}function Hs(e,t){if(!ce(e)||X(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ae(e)===r&&(r=r.ownerDocument.body),r}function Ws(e,t){let r=F(e);if(yt(e))return r;if(!ce(e)){let s=ye(e);for(;s&&!Ge(s);){if(Y(s)&&!rn(s))return s;s=ye(s)}return r}let n=Hs(e,t);for(;n&&Us(n)&&rn(n);)n=Hs(n,t);return n&&Ge(n)&&rn(n)&&!qe(n)?r:n||Fs(e)||r}var Va=async function(e){let t=this.getOffsetParent||Ws,r=this.getDimensions,n=await r(e.floating);return{reference:ja(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function za(e){return X(e).direction==="rtl"}var Kt={convertOffsetParentRelativeRectToViewportRelativeRect:ka,getDocumentElement:ae,getClippingRect:Ba,getOffsetParent:Ws,getElementRects:Va,getClientRects:Pa,getDimensions:Ha,getScale:Ye,isElement:Y,isRTL:za};var qs=ks,Gs=Ps;var Ys=(e,t,r)=>{let n=new Map,s=r??{},i={...Kt,...s.platform,_c:n};return Ns(e,t,{...s,platform:i})};function Xs(e){return Ka(e)}function nn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Ka(e){for(let t=e;t;t=nn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=nn(e);t;t=nn(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||qe(r)||t.tagName==="BODY"))return t}return null}async function Js(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},Ys(e,t,{strategy:n.strategy,platform:{...Kt,getOffsetParent:s=>Kt.getOffsetParent(s,Xs)},middleware:[Gs({crossAxis:!0}),qs({allowedPlacements:[n.placement]})]})}var it=A(T());var Cn=A(ee());var Qs=A(ee(),1);var sn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function Zs(e,t){return(0,Qs.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Et(e);try{return JSON.parse(r)}catch{return Et(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:St,...t??{}})}function Wa(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Xe(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Xe(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!Xe(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Xe(e,t){try{return Wa(e,t)}catch{return!1}}function St(e,t){return!Xe(e,t)}function Et(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Wt(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var ei=A(ee(),1);var on=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:St,attribute:!1,...t};(0,ei.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[n]),store:t.store})}};var qt=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Ce=A(ee(),1);var Gt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){s(a);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ri=A(se(),1);var Yt=globalThis,qa=Yt.ShadowRoot&&(Yt.ShadyCSS===void 0||Yt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ti=(e,t)=>{if(qa)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),s=Yt.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,e.appendChild(n)}};var Xt=class extends ri.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return ti(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){sn(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function ni(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var Qe=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},ai,si=Symbol("constructorPrototype"),ii=Symbol("constructorName"),ci=Symbol("exportpartsDebouncer"),oi=Symbol("dynamicDependenciesLoaded"),Je=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Je.eventName="exportparts-updated";var re=class extends Xt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ai]=new Gt(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[ci].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[ii]=this.constructor.name,this[si]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ii]&&Object.setPrototypeOf(this,this[si])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[oi]||(r[oi]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Je.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Je.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Je)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=ni(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,s,i,o,a;let c=f=>f!=null&&f.trim().length>0,l=t.filter(c).map(f=>f.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let h=(i=(s=f.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&i!==void 0?i:[],y=(a=(o=f.getAttribute("exportparts"))===null||o===void 0?void 0:o.split(",").map(m=>m.split(":")[1]))!==null&&a!==void 0?a:[],E=[...h,...y].filter(c).map(m=>m.trim());for(let m of E)u.add(m)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(f=>l.map(h=>`${f}:${h}--${f}`));this.exportparts=[...this.part,...d].join(", ")}};ai=ci;Qe([(0,Ce.property)()],re.prototype,"exportpartsPrefix",void 0);Qe([Zs([])],re.prototype,"exportpartsPrefixes",void 0);Qe([(0,Ce.property)({reflect:!0})],re.prototype,"exportparts",void 0);Qe([(0,Ce.property)()],re.prototype,"customStylesheet",void 0);Qe([(0,Ce.property)()],re.prototype,"elementToFocus",void 0);Qe([(0,Ce.state)()],re.prototype,"useAdoptedStyleSheets",void 0);function Jt(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var xt=Symbol("internalReduxEventsUnsubscribers"),ge=Symbol("internalStoresUnsubscribers"),Te=Symbol("internalStores"),Ga=Wt(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Te].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Te].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Te].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[Te].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Te].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Te].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[ge].has(o.store):this[ge].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c;this[ge].set(o,a.subscribe(()=>this.updateFromStores())),this[xt].set(o,[]),Jt(a)&&a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((l,u)=>{if(typeof this[u]=="function"&&(!l.store||a.name===l.store)){let d=f=>this[u](f);a.addEventListener(l.eventName,d),this[xt].get(o).push(()=>a.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[ge].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[ge].has(o)&&this[ge].get(o)(),this[ge].delete(o),(a=this[xt].get(o))===null||a===void 0||a.forEach(c=>c()),this[xt].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ge,r=Te,n=xt,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),li=class extends Ga(re){};function k(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Ya=typeof Symbol=="function"&&Symbol.observable||"@@observable",ui=Ya,an=()=>Math.random().toString(36).substring(7).split("").join("."),Xa={INIT:`@@redux/INIT${an()}`,REPLACE:`@@redux/REPLACE${an()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${an()}`},Qt=Xa;function Zt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function cn(e,t,r){if(typeof e!="function")throw new Error(k(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(k(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(k(1));return r(cn)(e,t)}let n=e,s=t,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((m,S)=>{o.set(S,m)}))}function u(){if(c)throw new Error(k(3));return s}function d(m){if(typeof m!="function")throw new Error(k(4));if(c)throw new Error(k(5));let S=!0;l();let w=a++;return o.set(w,m),function(){if(S){if(c)throw new Error(k(6));S=!1,l(),o.delete(w),i=null}}}function f(m){if(!Zt(m))throw new Error(k(7));if(typeof m.type>"u")throw new Error(k(8));if(typeof m.type!="string")throw new Error(k(17));if(c)throw new Error(k(9));try{c=!0,s=n(s,m)}finally{c=!1}return(i=o).forEach(w=>{w()}),m}function h(m){if(typeof m!="function")throw new Error(k(10));n=m,f({type:Qt.REPLACE})}function y(){let m=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(k(11));function w(){let x=S;x.next&&x.next(u())}return w(),{unsubscribe:m(w)}},[ui](){return this}}}return f({type:Qt.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:h,[ui]:y}}function Ja(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Qt.INIT})>"u")throw new Error(k(12));if(typeof r(void 0,{type:Qt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(k(13))})}function di(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),s,i;try{Ja(r)}catch(o){i=o}return function(a={},c){if(i)throw i;let l=!1,u={};for(let d=0;d<n.length;d++){let f=n[d],h=r[f],y=a[f],E=h(y,c);if(typeof E>"u"){let m=c&&c.type;throw new Error(k(14))}u[f]=E,l=l||E!==y}return l=l||n.length!==Object.keys(a).length,l?u:a}}function At(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function fi(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(k(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=e.map(c=>c(o));return i=At(...a)(s.dispatch),{...s,dispatch:i}}}function pi(e){return Zt(e)&&"type"in e&&typeof e.type=="string"}var Ai=Symbol.for("immer-nothing"),hi=Symbol.for("immer-draftable"),L=Symbol.for("immer-state");function J(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var B=Object,et=B.getPrototypeOf,nr="constructor",lr="prototype",fn="configurable",sr="enumerable",tr="writable",bt="value",ne=e=>!!e&&!!e[L];function H(e){return e?bi(e)||dr(e)||!!e[hi]||!!e[nr]?.[hi]||fr(e)||pr(e):!1}var Qa=B[lr][nr].toString(),mi=new WeakMap;function bi(e){if(!e||!Sn(e))return!1;let t=et(e);if(t===null||t===B[lr])return!0;let r=B.hasOwnProperty.call(t,nr)&&t[nr];if(r===Object)return!0;if(!Ze(r))return!1;let n=mi.get(r);return n===void 0&&(n=Function.toString.call(r),mi.set(r,n)),n===Qa}function ur(e,t,r=!0){Ct(e)===0?(r?Reflect.ownKeys(e):B.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Ct(e){let t=e[L];return t?t.type_:dr(e)?1:fr(e)?2:pr(e)?3:0}var ln=(e,t,r=Ct(e))=>r===2?e.has(t):B[lr].hasOwnProperty.call(e,t),pn=(e,t,r=Ct(e))=>r===2?e.get(t):e[t],ir=(e,t,r,n=Ct(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Za(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var dr=Array.isArray,fr=e=>e instanceof Map,pr=e=>e instanceof Set,Sn=e=>typeof e=="object",Ze=e=>typeof e=="function",un=e=>typeof e=="boolean";function ec(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var le=e=>e.copy_||e.base_;var xn=e=>e.modified_?e.copy_:e.base_;function hn(e,t){if(fr(e))return new Map(e);if(pr(e))return new Set(e);if(dr(e))return Array[lr].slice.call(e);let r=bi(e);if(t===!0||t==="class_only"&&!r){let n=B.getOwnPropertyDescriptors(e);delete n[L];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[tr]===!1&&(a[tr]=!0,a[fn]=!0),(a.get||a.set)&&(n[o]={[fn]:!0,[tr]:!0,[sr]:a[sr],[bt]:e[o]})}return B.create(et(e),n)}else{let n=et(e);if(n!==null&&r)return{...e};let s=B.create(n);return B.assign(s,e)}}function An(e,t=!1){return hr(e)||ne(e)||!H(e)||(Ct(e)>1&&B.defineProperties(e,{set:er,add:er,clear:er,delete:er}),B.freeze(e),t&&ur(e,(r,n)=>{An(n,!0)},!1)),e}function tc(){J(2)}var er={[bt]:tc};function hr(e){return e===null||!Sn(e)?!0:B.isFrozen(e)}var or="MapSet",mn="Patches",yi="ArrayMethods",_i={};function Oe(e){let t=_i[e];return t||J(0,e),t}var gi=e=>!!_i[e];var _t,wi=()=>_t,rc=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:gi(or)?Oe(or):void 0,arrayMethodsPlugin_:gi(yi)?Oe(yi):void 0});function vi(e,t){t&&(e.patchPlugin_=Oe(mn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yn(e){gn(e),e.drafts_.forEach(nc),e.drafts_=null}function gn(e){e===_t&&(_t=e.parent_)}var Ei=e=>_t=rc(_t,e);function nc(e){let t=e[L];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Si(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[L].modified_&&(yn(t),J(4)),H(e)&&(e=xi(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[L].base_,e,t)}else e=xi(t,r);return sc(t,e,!0),yn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ai?e:void 0}function xi(e,t){if(hr(t))return t;let r=t[L];if(!r)return ar(t,e.handledSet_,e);if(!mr(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Oi(r,e)}return r.copy_}function sc(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&An(t,r)}function Ci(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var mr=(e,t)=>e.scope_===t,ic=[];function Ti(e,t,r,n){let s=le(e),i=e.type_;if(n!==void 0&&pn(s,n,i)===t){ir(s,n,r,i);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;ur(s,(c,l)=>{if(ne(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??ic;for(let a of o)ir(s,a,r,i)}function oc(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!mr(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=xn(i);Ti(e,i.draft_??i,o,r),Oi(i,s)})}function Oi(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}Ci(e)}}function ac(e,t,r){let{scope_:n}=e;if(ne(r)){let s=r[L];mr(s,n)&&s.callbacks_.push(function(){rr(e);let o=xn(s);Ti(e,r,o,t)})}else H(r)&&e.callbacks_.push(function(){let i=le(e);e.type_===3?i.has(r)&&ar(r,n.handledSet_,n):pn(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ar(pn(e.copy_,t,e.type_),n.handledSet_,n)})}function ar(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ne(e)||t.has(e)||!H(e)||hr(e)||(t.add(e),ur(e,(n,s)=>{if(ne(s)){let i=s[L];if(mr(i,r)){let o=xn(i);ir(e,n,o,e.type_),Ci(i)}}else H(s)&&ar(s,t,r)})),e}function cc(e,t){let r=dr(e),n={type_:r?1:0,scope_:t?t.scope_:wi(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=cr;r&&(s=[n],i=wt);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var cr={get(e,t){if(t===L)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=le(e);if(!ln(s,t,e.type_))return uc(e,s,t);let i=s[t];if(e.finalized_||!H(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&ec(t))return i;if(i===dn(e.base_,t)||lc(e,t,i)){rr(e);let o=e.type_===1?+t:t,a=En(e.scope_,i,e,o);return e.copy_[o]=a}return i},has(e,t){return t in le(e)},ownKeys(e){return Reflect.ownKeys(le(e))},set(e,t,r){let n=Ri(le(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=dn(le(e),t),i=s?.[L];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(Za(r,s)&&(r!==void 0||ln(e.base_,t,e.type_)))return!0;rr(e),vn(e)}return e.copy_[t]===r&&(r!==void 0||ln(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),ac(e,t,r)),!0},deleteProperty(e,t){return rr(e),dn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),vn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=le(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[tr]:!0,[fn]:e.type_!==1||t!=="length",[sr]:n[sr],[bt]:r[t]}},defineProperty(){J(11)},getPrototypeOf(e){return et(e.base_)},setPrototypeOf(){J(12)}},wt={};for(let e in cr){let t=cr[e];wt[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}wt.deleteProperty=function(e,t){return wt.set.call(this,e,t,void 0)};wt.set=function(e,t,r){return cr.set.call(this,e[0],t,r,e[0])};function dn(e,t){let r=e[L];return(r?le(r):e)[t]}function lc(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!H(r)||r[L]?!1:e.baseRefs_.has(r)}function uc(e,t,r){let n=Ri(t,r);return n?bt in n?n[bt]:n.get?.call(e.draft_):void 0}function Ri(e,t){if(!(t in e))return;let r=et(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=et(r)}}function vn(e){e.modified_||(e.modified_=!0,e.parent_&&vn(e.parent_))}function rr(e){e.copy_||(e.assigned_=new Map,e.copy_=hn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var dc=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Ze(t)&&!Ze(r)){let i=r;r=t;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}Ze(r)||J(6),n!==void 0&&!Ze(n)&&J(7);let s;if(H(t)){let i=Ei(this),o=En(i,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?yn(i):gn(i)}return vi(i,n),Si(s,i)}else if(!t||!Sn(t)){if(s=r(t),s===void 0&&(s=t),s===Ai&&(s=void 0),this.autoFreeze_&&An(s,!0),n){let i=[],o=[];Oe(mn).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else J(1,t)},this.produceWithPatches=(t,r)=>{if(Ze(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,s;return[this.produce(t,r,(o,a)=>{n=o,s=a}),n,s]},un(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),un(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),un(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){H(e)||J(8),ne(e)&&(e=Ii(e));let t=Ei(this),r=En(t,e,void 0);return r[L].isManual_=!0,gn(t),r}finishDraft(e,t){let r=e&&e[L];(!r||!r.isManual_)&&J(9);let{scope_:n}=r;return vi(n,t),Si(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=Oe(mn).applyPatches_;return ne(e)?n(e,t):this.produce(e,s=>n(s,t))}};function En(e,t,r,n){let[s,i]=fr(t)?Oe(or).proxyMap_(t,r):pr(t)?Oe(or).proxySet_(t,r):cc(t,r);return(r?.scope_??wi()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?oc(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),s}function Ii(e){return ne(e)||J(10,e),Mi(e)}function Mi(e){if(!H(e)||hr(e))return e;let t=e[L],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=hn(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=hn(e,!0);return ur(r,(s,i)=>{ir(r,s,Mi(i))},n),t&&(t.finalized_=!1),r}var fc=new dc,bn=fc.produce;function Ni(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var ki=Ni(),Pi=Ni;var pc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?At:At.apply(null,arguments)},Ru=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},hc=e=>e&&typeof e.match=="function";function ve(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(ue(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>pi(n)&&n.type===e,r}var $i=class Tt extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Tt.prototype)}static get[Symbol.species](){return Tt}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Tt(...t[0].concat(this)):new Tt(...t.concat(this))}};function Di(e){return H(e)?bn(e,()=>{}):e}function yr(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function mc(e){return typeof e=="boolean"}var yc=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},o=new $i;return r&&(mc(r)?o.push(ki):o.push(Pi(r.extraArgument))),o},gc="RTK_autoBatch";var Li=e=>t=>{setTimeout(t,e)},vc=(e,t)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(o),r())},i=e(s),o=setTimeout(s,t)},Ec=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?vc(window.requestAnimationFrame,100):Li(10):e.type==="callback"?e.queueNotification:Li(e.timeout),l=()=>{o=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>s&&u(),f=n.subscribe(d);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[gc],i=!s,i&&(o||(o=!0,c(l))),n.dispatch(u)}finally{s=!0}}})},Sc=e=>function(r){let{autoBatch:n=!0}=r??{},s=new $i(e);return n&&s.push(Ec(typeof n=="object"?n:void 0)),s};function Bi(e){let t=yc(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(Zt(r))c=di(r);else throw new Error(ue(1));let l;typeof n=="function"?l=n(t):l=t();let u=At;s&&(u=pc({trace:!1,...typeof s=="object"&&s}));let d=fi(...l),f=Sc(d),h=typeof a=="function"?a(f):f(),y=u(...h);return cn(c,o,y)}function Hi(e){let t={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(ue(28));if(a in t)throw new Error(ue(29));return t[a]=o,s},addAsyncThunk(i,o){return o.pending&&(t[i.pending.type]=o.pending),o.rejected&&(t[i.rejected.type]=o.rejected),o.fulfilled&&(t[i.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return r.push({matcher:i,reducer:o}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function xc(e){return typeof e=="function"}function Ac(e,t){let[r,n,s]=Hi(t),i;if(xc(e))i=()=>Di(e());else{let a=Di(e);i=()=>a}function o(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[s]),l.reduce((u,d)=>{if(d)if(ne(u)){let h=d(u,c);return h===void 0?u:h}else{if(H(u))return bn(u,f=>d(f,c));{let f=d(u,c);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return o.getInitialState=i,o}var bc=(e,t)=>hc(e)?e.match(t):e(t);function _c(...e){return t=>e.some(r=>bc(r,t))}var wc="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Cc=(e=21)=>{let t="",r=e;for(;r--;)t+=wc[Math.random()*64|0];return t},Tc=["name","message","stack","code"],_n=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Ui=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Oc=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Tc)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Fi="External signal was aborted",Rc=(()=>{function e(t,r,n){let s=ve(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=ve(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=ve(t+"/rejected",(c,l,u,d,f)=>({payload:d,error:(n&&n.serializeError||Oc)(c||"Rejected"),meta:{...f||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,d,f)=>{let h=n?.idGenerator?n.idGenerator(c):Cc(),y=new AbortController,E,m;function S(g){m=g,y.abort()}l&&(l.aborted?S(Fi):l.addEventListener("abort",()=>S(Fi),{once:!0}));let w=(async function(){let g;try{let _=n?.condition?.(c,{getState:d,extra:f});if(Mc(_)&&(_=await _),_===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let R=new Promise((C,I)=>{E=()=>{I({name:"AbortError",message:m||"Aborted"})},y.signal.addEventListener("abort",E,{once:!0})});u(i(h,c,n?.getPendingMeta?.({requestId:h,arg:c},{getState:d,extra:f}))),g=await Promise.race([R,Promise.resolve(r(c,{dispatch:u,getState:d,extra:f,requestId:h,signal:y.signal,abort:S,rejectWithValue:((C,I)=>new _n(C,I)),fulfillWithValue:((C,I)=>new Ui(C,I))})).then(C=>{if(C instanceof _n)throw C;return C instanceof Ui?s(C.payload,h,c,C.meta):s(C,h,c)})])}catch(_){g=_ instanceof _n?o(null,h,c,_.payload,_.meta):o(_,h,c)}finally{E&&y.signal.removeEventListener("abort",E)}return n&&!n.dispatchConditionRejection&&o.match(g)&&g.meta.condition||u(g),g})();return Object.assign(w,{abort:S,requestId:h,arg:c,unwrap(){return w.then(Ic)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:_c(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function Ic(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Mc(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ji=Symbol.for("rtk-slice-createasyncthunk"),Mu={[ji]:Rc};function Nc(e,t){return`${e}/${t}`}function kc({creators:e}={}){let t=e?.asyncThunk?.[ji];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(ue(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(Dc()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(g,x){let _=typeof g=="string"?g:g.type;if(!_)throw new Error(ue(12));if(_ in c.sliceCaseReducersByType)throw new Error(ue(13));return c.sliceCaseReducersByType[_]=x,l},addMatcher(g,x){return c.sliceMatchers.push({matcher:g,reducer:x}),l},exposeAction(g,x){return c.actionCreators[g]=x,l},exposeCaseReducer(g,x){return c.sliceCaseReducersByName[g]=x,l}};a.forEach(g=>{let x=o[g],_={reducerName:g,type:Nc(s,g),createNotation:typeof n.reducers=="function"};Uc(x)?$c(_,x,l,t):Lc(_,x,l)});function u(){let[g={},x=[],_=void 0]=typeof n.extraReducers=="function"?Hi(n.extraReducers):[n.extraReducers],R={...g,...c.sliceCaseReducersByType};return Ac(n.initialState,C=>{for(let I in R)C.addCase(I,R[I]);for(let I of c.sliceMatchers)C.addMatcher(I.matcher,I.reducer);for(let I of x)C.addMatcher(I.matcher,I.reducer);_&&C.addDefaultCase(_)})}let d=g=>g,f=new Map,h=new WeakMap,y;function E(g,x){return y||(y=u()),y(g,x)}function m(){return y||(y=u()),y.getInitialState()}function S(g,x=!1){function _(C){let I=C[g];return typeof I>"u"&&x&&(I=yr(h,_,m)),I}function R(C=d){let I=yr(f,x,()=>new WeakMap);return yr(I,C,()=>{let ot={};for(let[V,Ee]of Object.entries(n.selectors??{}))ot[V]=Pc(Ee,C,()=>yr(h,C,m),x);return ot})}return{reducerPath:g,getSelectors:R,get selectors(){return R(_)},selectSlice:_}}let w={name:s,reducer:E,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:m,...S(i),injectInto(g,{reducerPath:x,..._}={}){let R=x??i;return g.inject({reducerPath:R,reducer:E},_),{...w,...S(R,!0)}}};return w}}function Pc(e,t,r,n){function s(i,...o){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var Vi=kc();function Dc(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Lc({type:e,reducerName:t,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!Fc(n))throw new Error(ue(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?ve(e,o):ve(e))}function Uc(e){return e._reducerDefinitionType==="asyncThunk"}function Fc(e){return e._reducerDefinitionType==="reducerWithPrepare"}function $c({type:e,reducerName:t},r,n,s){if(!s)throw new Error(ue(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=s(e,i,u);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:o||gr,pending:a||gr,rejected:c||gr,settled:l||gr})}function gr(){}var zi="listener",Ki="completed",Wi="cancelled",Nu=`task-${Wi}`,ku=`task-${Ki}`,Pu=`${zi}-${Wi}`,Du=`${zi}-${Ki}`;var{assign:qi}=Object;var wn="listenerMiddleware";var Bc=qi(ve(`${wn}/add`),{withTypes:()=>Bc}),Lu=ve(`${wn}/removeAll`),Hc=qi(ve(`${wn}/remove`),{withTypes:()=>Hc});function ue(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var jc=Wt(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),vr=class extends jc(Object){};window.ftReduxStores||(window.ftReduxStores={});var Gi=class e extends vr{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Jt(i))return i;if(s==null)return;let o=Vi({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=Bi({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=Et(o.getInitialState());for(let d of l.keeping)u[d]=(c??u)[d];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new qt,this.injectInto=(i,o)=>this.reduxSlice.injectInto(i,o),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,o,a)=>{let c=o,l=i[c];return l?(...u)=>{let d=l(...u.map(s));return this.reduxStore.dispatch(d),d}:u=>{let d=c,f=this.getState()[d];Xe(f,u)||this.setState({[d]:s(u)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Er=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return i?c:s?`${a} ${c}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Sr=A(T()),Vc="ft-app-info",tt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};tt.eventName="authentication-change";var Ot=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ot.eventName="ui-locale-changed";var zc={session:(e,t)=>{(0,Sr.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>b.dispatchEvent(new tt(t.payload)),0))}},b=Sr.FtReduxStore.get({name:Vc,reducers:zc,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,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Yi=A(T()),xr=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},fd=(0,Yi.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(b)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(a=>a.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?a=>Er.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return xr([(0,Cn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),xr([(0,Cn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),xr([on({store:b.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),xr([on({store:b.name})],t.prototype,"uiLocale",void 0),t});var Xi;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Xi||(Xi={}));var Ji;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Ji||(Ji={}));var Qi;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Qi||(Qi={}));var Zi;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Zi||(Zi={}));var eo;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(eo||(eo={}));var to;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(to||(to={}));var ro;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(ro||(ro={}));var no;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(no||(no={}));var so;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(so||(so={}));var io;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(io||(io={}));var oo;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(oo||(oo={}));var ao;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(ao||(ao={}));var co;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(co||(co={}));var lo;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(lo||(lo={}));var uo;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(uo||(uo={}));var fo;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(fo||(fo={}));var po;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(po||(po={}));var ho;(function(e){e.ASC="ASC",e.DESC="DESC"})(ho||(ho={}));var mo;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(mo||(mo={}));var yo;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(yo||(yo={}));var go;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(go||(go={}));var vo;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(vo||(vo={}));var Eo;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Eo||(Eo={}));var So;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(So||(So={}));var xo;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(xo||(xo={}));var Ao;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Ao||(Ao={}));var bo;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(bo||(bo={}));var M;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(M||(M={}));var K;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(K||(K={}));var _o;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(_o||(_o={}));var wo;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(wo||(wo={}));var Co;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Co||(Co={}));var To;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(To||(To={}));var Oo;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Oo||(Oo={}));var Ro;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ro||(Ro={}));var Io;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Io||(Io={}));var Mo;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Mo||(Mo={}));var No;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(No||(No={}));var ko;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(ko||(ko={}));var Po;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Po||(Po={}));var Do;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Do||(Do={}));var Kc={[M.PERSONAL_BOOK_SHARE_USER]:[M.PERSONAL_BOOK_USER],[M.HTML_EXPORT_USER]:[M.PERSONAL_BOOK_USER],[M.PDF_EXPORT_USER]:[M.PERSONAL_BOOK_USER],[M.KHUB_ADMIN]:[M.CONTENT_PUBLISHER],[M.ADMIN]:[M.KHUB_ADMIN,M.USERS_ADMIN,M.PORTAL_ADMIN,M.BEHAVIOR_DATA_USER],[M.GENERATIVE_AI_EXPORT_USER]:[M.GENERATIVE_AI_USER]};function Lo(e,t){return e===t||(Kc[e]??[]).some(r=>Lo(r,t))}function Uo(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>Lo(n,t))}var Cr=A(T());var Tn=A(T());var Re=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=b.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=b.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var rt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Re.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Re.await()}};var j=class extends rt{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[c])=>a.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new Tn.CacheRegistry,this.cache=t?s.commonCache:new Tn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Ar=class extends j{async listMySearches(){let{session:t}=b.getState();return Uo(t,M.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var br=class extends j{async listMyBookmarks(){let t=b.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var _r=class extends j{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=b.getState().session;return!!t?.sessionAuthenticated}};var wr=class extends j{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=b.getState().session;return!!t?.sessionAuthenticated}};var Wc="ft-user-assets",qc={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(K).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:s}=t.payload;Rn(e,r,[...On(e,r),s]),Fo(e,r,1,n),$o(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Rn(e,r,On(e,r).map(s=>s.id===n.id?n:s)),$o(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;Rn(e,r,On(e,r).filter(i=>i.id!==s)),Fo(e,r,-1,n)}},Bo={[K.SEARCHES]:"savedSearches",[K.BOOKMARKS]:"bookmarks",[K.BOOKS]:void 0,[K.COLLECTIONS]:void 0},On=(e,t)=>{var r;let n=Bo[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Rn=(e,t,r)=>{let n=Bo[t];n&&(e[n]=r)},Fo=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===K.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},$o=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},U=Cr.FtReduxStore.get({name:Wc,reducers:qc,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(K).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),In=class{constructor(t=new _r,r=new wr){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=b.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new br,this.savedSearchesService=new Ar,b.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=b.getState();(0,Cr.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),U.actions.clearAssetCount(),U.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),U.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),U.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();U.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();U.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&U.getState().assetCounts.allAsset[t]!==r.count&&U.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&U.getState().assetCounts.bookmarkByMap[t]!==r.count&&U.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(U.getState().assetCounts.bookmarkByMap).length!==0;t===K.BOOKMARKS&&r&&U.actions.clearBookmarkCountByMap(),U.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;U.actions.bookmarks(r)}}},Gc=new In;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Gc);var Mn=class{addCommand(t,r=!1){b.commands.add(t,r)}consumeCommand(t){return b.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Mn;var W=A(T());var Ho,nt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Yc=Symbol("clearAfterUnitTest"),Tr=class extends(0,W.withEventBus)(j){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ho]=()=>{this.defaultMessages={},this.cache=new W.CacheRegistry,this.listeners={}},this.currentUiLocale=b.getState().uiLocale,b.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=b.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,W.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var s;let i=t.toLowerCase(),o=this.resolveContext(i);return new W.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof W.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new nt({loadedContexts:t})),this.dispatchEvent(new nt({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new nt({loadedContexts:[t]})),this.dispatchEvent(new nt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,W.delay)(0).then(()=>n()).catch(()=>null)))}};Ho=Yc;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Tr{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Tr{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Rt=window.FluidTopicsI18nService,Nn=window.FluidTopicsCustomI18nService;var jo=A(T()),kn=class{highlightHtml(t,r,n){(0,jo.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new kn;var Vo=A(T());var Pn=class{isDate(t){var r,n,s,i;return(i=(s=((n=(r=b.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===t))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,o;if(t==null)return"";try{return Vo.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:b.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Pn;var zo=A(T());var It=class{static get(t,r){var n,s,i,o;let a=b.getState(),{lang:c,region:l}=(i=(s=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new zo.SearchPlaceConverter(a.baseUrl,t??20,(o=a.localesConfiguration)===null||o===void 0?void 0:o.allLanguagesAllowed,r??`${c}-${l}`)}};var Dn=class{urlToSearchRequest(t){return It.get().parse(t)}searchRequestToUrl(t){return It.get().serialize(t)}};window.FluidTopicsUrlService=new Dn;var de=A(T());var Ie=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Ie.eventName="change";var Ln=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Ko=new Ln;var Or=class e extends de.WithEventBus{static build(){return new e(window.history,Ko,()=>window.location,!1)}constructor(t,r,n,s){var i,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,de.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ie(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,o,a])=>{let c=r(),l={...c===this.currentIndex?this.currentState:void 0,...i,index:c,href:typeof a=="string"?a:(a??this.windowLocation()).href};n.apply(s,[l,o,a]),this.setCurrentState(l,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Ie.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ie.eventName,t)}currentItem(){return(0,de.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,de.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,de.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,de.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Or.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Wo=A(se());var qo=Wo.css`
|
|
138
|
+
`;var Xo=A(se()),$=A(ee()),ke=A(T());var Me=A(T());function Go(e,t){let{authenticationRequired:r,session:n}=b.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Rr=class extends rt{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Un=class e extends Me.FtStateManager{static build(t){return new e(b,t)}constructor(t,r){super(),this.store=t,this.cache=new Me.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Rr,this.cleanSessionDebouncer=new Me.Debouncer,this.reloadDebouncer=new Me.Debouncer(500),this.apiProvider=r??(()=>Re.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(tt.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 t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Go(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ot(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Yo=Un.build();var Ne=class extends Event{constructor(t,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var Mt=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:s,callbackRef:i}of n){let o=s.deref(),a=i.deref();o===void 0||a===void 0||o.dispatchEvent(new Ne(t.context,o,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,s=this.pendingContextRequests.get(t.context);s===void 0&&this.pendingContextRequests.set(t.context,s={callbacks:new WeakMap,requests:[]});let i=s.callbacks.get(r);i===void 0&&s.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var P=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},O=class extends ke.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Yo,this.contextRoot=new Mt}render(){return Xo.html`
|
|
139
139
|
<slot></slot>
|
|
140
|
-
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Rt.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};O.elementDefinitions={};O.styles=qo;P([(0,$.property)()],O.prototype,"baseUrl",void 0);P([(0,$.property)()],O.prototype,"tenantId",void 0);P([(0,$.property)()],O.prototype,"apiIntegrationIdentifier",void 0);P([(0,$.property)()],O.prototype,"apiIntegrationAppVersion",void 0);P([(0,$.property)()],O.prototype,"uiLocale",void 0);P([(0,ke.jsonProperty)(null)],O.prototype,"availableUiLocales",void 0);P([(0,ke.jsonProperty)(null)],O.prototype,"metadataConfiguration",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"editorMode",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"noCustom",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"openExternalDocumentInNewTab",void 0);P([(0,$.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],O.prototype,"noCustomComponent",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"withManualResources",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"navigatorOnline",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"forcedOffline",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"authenticationRequired",void 0);P([(0,ke.jsonProperty)([])],O.prototype,"messageContexts",void 0);P([(0,ke.jsonProperty)(void 0)],O.prototype,"session",void 0);var Qo=
|
|
141
|
-
`;var kr=
|
|
140
|
+
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Rt.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};O.elementDefinitions={};O.styles=qo;P([(0,$.property)()],O.prototype,"baseUrl",void 0);P([(0,$.property)()],O.prototype,"tenantId",void 0);P([(0,$.property)()],O.prototype,"apiIntegrationIdentifier",void 0);P([(0,$.property)()],O.prototype,"apiIntegrationAppVersion",void 0);P([(0,$.property)()],O.prototype,"uiLocale",void 0);P([(0,ke.jsonProperty)(null)],O.prototype,"availableUiLocales",void 0);P([(0,ke.jsonProperty)(null)],O.prototype,"metadataConfiguration",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"editorMode",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"noCustom",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"openExternalDocumentInNewTab",void 0);P([(0,$.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],O.prototype,"noCustomComponent",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"withManualResources",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"navigatorOnline",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"forcedOffline",void 0);P([(0,$.property)({type:Boolean})],O.prototype,"authenticationRequired",void 0);P([(0,ke.jsonProperty)([])],O.prototype,"messageContexts",void 0);P([(0,ke.jsonProperty)(void 0)],O.prototype,"session",void 0);var Qo=A(T());var Jo={"ft-app-context":O};(0,Qo.customElements)(Jo);var Zo=A(ee());var Fn=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},st=new Fn;var Qc=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},kt=Symbol("i18nAttributes"),ea=Symbol("i18nListAttributes"),ta=Symbol("i18nProperties"),Ir=Symbol("i18nContexts"),Nt=Symbol("i18nUnsubs"),ra=(0,it.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Nn:Rt}i18n(i){let{context:o,key:a,message:c}=i,{custom:l,args:u,argsProvider:d}=i;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,l);let f=u??(d?d(this):[]);return this.getI18nService(l).resolveMessage(o,a,...f)}return c}async awaitI18n(i){let{context:o,custom:a}=i;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(i)}customI18n(i,o){if(st.isI18nKey(i)){let[a,c]=i.split(".");return this.i18n({custom:!0,context:a,key:c,...o})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((o,a,c)=>i.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((o,a,c)=>{var l;return((l=c?.context)===null||l===void 0?void 0:l.toLowerCase())===i}),this.updateI18nProperties(o=>o.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var o,a;let c=this,l=(u,d,f)=>f?.context&&f.key&&i(u,d,f)?{...f,message:this.i18n({context:f.context,key:f.key,custom:f.custom,...u})}:f;(o=this[kt])===null||o===void 0||o.forEach((u,d)=>c[d]=l(u,d,c[d])),(a=this[ea])===null||a===void 0||a.forEach((u,d)=>{var f;return c[d]=(f=c[d])===null||f===void 0?void 0:f.map(h=>l(u,d,h))})}updateI18nProperties(i){var o;(o=this[ta])===null||o===void 0||o.forEach((a,c)=>{i(a,c)&&(this[c]=this.i18n(a))})}addI18nMessages(i,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,o,a)}addI18nContext(i,o,a){let c=(typeof i=="string"?i:i.name).toLowerCase();a=typeof i=="string"?a:i.custom,this[Ir].set(c,{isCustomContext:a}),this[Nt].has(c)||this[Nt].set(c,this.getI18nService(a).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(a).prepareContext(c,o)}hasI18nContext(i){return this[Ir].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ir].forEach((i,o)=>this.addI18nContext(o,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Nt].forEach(i=>i()),this[Nt].clear()}}return t=Ir,r=Nt,Qc([(0,Zo.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Mr=class extends ra(it.FtLitElement){},Nr=class extends ra(it.FtLitElementRedux){};var na=A(T());var $n=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?st.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Zc=new $n;var sa=(e,t)=>(r,n)=>{var s;r.constructor.createProperty(n,{type:Object,hasChanged:na.hasChanged,converter:st,...t}),r[kt]=(s=r[kt])!==null&&s!==void 0?s:new Map,r[kt].set(n,e??{})};var ia=A(se());var oa=ia.css`
|
|
141
|
+
`;var kr=A(se()),Pr=A(ee()),Dr=A(T());var Pt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Q=class extends Nr{constructor(){super(),this.editorMode=!1,this.addStore(b)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":kr.nothing:kr.html`
|
|
142
142
|
<span class="ft-i18n">
|
|
143
143
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
144
144
|
</span>
|
|
145
|
-
`}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Q.elementDefinitions={};Q.styles=oa;Pt([(0,Dr.redux)()],Q.prototype,"editorMode",void 0);Pt([(0,Pr.property)()],Q.prototype,"context",void 0);Pt([(0,Pr.property)()],Q.prototype,"key",void 0);Pt([(0,Dr.jsonProperty)([])],Q.prototype,"args",void 0);Pt([(0,Pr.property)()],Q.prototype,"defaultMessage",void 0);var ca=
|
|
145
|
+
`}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Q.elementDefinitions={};Q.styles=oa;Pt([(0,Dr.redux)()],Q.prototype,"editorMode",void 0);Pt([(0,Pr.property)()],Q.prototype,"context",void 0);Pt([(0,Pr.property)()],Q.prototype,"key",void 0);Pt([(0,Dr.jsonProperty)([])],Q.prototype,"args",void 0);Pt([(0,Pr.property)()],Q.prototype,"defaultMessage",void 0);var ca=A(T());var aa={"ft-i18n":Q};(0,ca.customElements)(aa);var Z=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},D=class extends Mr{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 q.Debouncer,this.revealDebouncer=new q.Debouncer,this.onTouch=t=>{this.isIgnored(t)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=t=>{this.isIgnored(t)?this.matchesIgnored(t)&&this.hide():this.show()},this.onFocusIn=t=>{!this.isIgnored(t)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var t,r;return la.html`
|
|
146
146
|
<div part="container"
|
|
147
147
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
|
|
148
148
|
<slot part="slot"></slot>
|