@fluid-topics/ft-search-breadcrumbs 2.2.18 → 2.2.20
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.
|
@@ -128,16 +128,13 @@ export class FtSearchBreadcrumbs extends withI18n(FtSearchResultComponent) {
|
|
|
128
128
|
@auxclick=${(e) => this.onAuxClick(e, item.result)}
|
|
129
129
|
@contextmenu=${() => this.onContextMenu(item.result)}>
|
|
130
130
|
${this.renderBreadcrumb(item)}
|
|
131
|
-
</a>`, () => {
|
|
132
|
-
var _a;
|
|
133
|
-
return html `
|
|
131
|
+
</a>`, () => { var _a; return html `
|
|
134
132
|
<ft-select-option
|
|
135
133
|
value="${(_a = item.id) !== null && _a !== void 0 ? _a : "ft:no_value"}"
|
|
136
134
|
>
|
|
137
135
|
${this.renderBreadcrumb(item)}
|
|
138
136
|
</ft-select-option>
|
|
139
|
-
`;
|
|
140
|
-
});
|
|
137
|
+
`; });
|
|
141
138
|
}
|
|
142
139
|
onResultClick(result) {
|
|
143
140
|
this.dispatchEvent(new SearchResultClickEvent(result, this.rank));
|
|
@@ -145,7 +145,7 @@ Also for action icons.`,a.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
145
145
|
position: relative;
|
|
146
146
|
word-break: break-word;
|
|
147
147
|
}
|
|
148
|
-
`;var ra=["top","right","bottom","left"],ta=["start","end"],un=ra.reduce((e,t)=>e.concat(t,t+"-"+ta[0],t+"-"+ta[1]),[]),ir=Math.min,Ye=Math.max,ar=Math.round;var Pe=e=>({x:e,y:e}),$l={left:"right",right:"left",bottom:"top",top:"bottom"};function oa(e,t,o){return Ye(e,ir(t,o))}function Ur(e,t){return typeof e=="function"?e(t):e}function sr(e){return e.split("-")[0]}function Xe(e){return e.split("-")[1]}function pn(e){return e==="x"?"y":"x"}function fn(e){return e==="y"?"height":"width"}function Br(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function hn(e){return pn(Br(e))}function na(e,t,o){o===void 0&&(o=!1);let n=Xe(e),i=hn(e),s=fn(i),c=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=dn(c)),[c,dn(c)]}function ia(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function dn(e){let t=sr(e);return $l[t]+e.slice(t.length)}function Hl(e){var t,o,n,i;return{top:(t=e.top)!=null?t:0,right:(o=e.right)!=null?o:0,bottom:(n=e.bottom)!=null?n:0,left:(i=e.left)!=null?i:0}}function aa(e){return typeof e!="number"?Hl(e):{top:e,right:e,bottom:e,left:e}}function bt(e){let{x:t,y:o,width:n,height:i}=e;return{width:n,height:i,top:o,left:t,right:t+n,bottom:o+i,x:t,y:o}}function sa(e,t,o){let{reference:n,floating:i}=e,s=Br(t),c=hn(t),d=fn(c),u=sr(t),p=s==="y",f=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,m=n[d]/2-i[d]/2,x;switch(u){case"top":x={x:f,y:n.y-i.height};break;case"bottom":x={x:f,y:n.y+n.height};break;case"right":x={x:n.x+n.width,y:h};break;case"left":x={x:n.x-i.width,y:h};break;default:x={x:n.x,y:n.y}}let C=Xe(t);return C&&(x[c]+=m*(C==="end"?1:-1)*(o&&p?-1:1)),x}async function ca(e,t){var o;t===void 0&&(t={});let{x:n,y:i,platform:s,rects:c,elements:d,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:x=0}=Ur(t,e),C=aa(x),v=d[m?h==="floating"?"reference":"floating":h],w=bt(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(v)))==null||o?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(d.floating)),boundary:p,rootBoundary:f,strategy:u})),N=h==="floating"?{x:n,y:i,width:c.floating.width,height:c.floating.height}:c.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d.floating)),T=await(s.isElement==null?void 0:s.isElement(E))&&await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1},k=bt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:N,offsetParent:E,strategy:u}):N);return{top:(w.top-k.top+C.top)/T.y,bottom:(k.bottom-w.bottom+C.bottom)/T.y,left:(w.left-k.left+C.left)/T.x,right:(k.right-w.right+C.right)/T.x}}var zl=50,la=async(e,t,o)=>{let{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:c}=o,d=c.detectOverflow?c:{...c,detectOverflow:ca},u=await(c.isRTL==null?void 0:c.isRTL(t)),p=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=sa(p,n,u),m=n,x=0,C={};for(let A=0;A<s.length;A++){let v=s[A];if(!v)continue;let{name:w,fn:N}=v,{x:E,y:T,data:k,reset:$}=await N({x:f,y:h,initialPlacement:n,placement:m,strategy:i,middlewareData:C,rects:p,platform:d,elements:{reference:e,floating:t}});f=E??f,h=T??h,C[w]={...C[w],...k},$&&x<zl&&(x++,typeof $=="object"&&($.placement&&(m=$.placement),$.rects&&(p=$.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):$.rects),{x:f,y:h}=sa(p,m,u)),A=-1)}return{x:f,y:h,placement:m,strategy:i,middlewareData:C}};function Gl(e,t,o){return(e?[...o.filter(i=>Xe(i)===e),...o.filter(i=>Xe(i)!==e)]:o.filter(i=>sr(i)===i)).filter(i=>e?Xe(i)===e||(t?ia(i)!==i:!1):!0)}var da=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,i;let{rects:s,middlewareData:c,placement:d,platform:u,elements:p}=t,{crossAxis:f=!1,alignment:h,allowedPlacements:m=un,autoAlignment:x=!0,...C}=Ur(e,t),A=h!==void 0||m===un?Gl(h||null,x,m):m,v=((o=c.autoPlacement)==null?void 0:o.index)||0,w=A[v];if(w==null)return{};if(d!==w)return{reset:{placement:A[0]}};let N=await u.detectOverflow(t,C),E=na(w,s,await(u.isRTL==null?void 0:u.isRTL(p.floating))),T=[N[sr(w)],N[E[0]],N[E[1]]],k=[...((n=c.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:T}],$=A[v+1];if($)return{data:{index:v+1,overflows:k},reset:{placement:$}};let M=k.map(me=>{let at=Xe(me.placement);return[me.placement,at&&f?me.overflows.slice(0,2).reduce((Rl,_l)=>Rl+_l,0):me.overflows[0],me.overflows]}).sort((me,at)=>me[1]-at[1]),er=((i=M.filter(me=>me[2].slice(0,Xe(me[0])?2:3).every(at=>at<=0))[0])==null?void 0:i[0])||M[0][0];return er!==d?{data:{index:v+1,overflows:k},reset:{placement:er}}:{}}}};var ua=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:i,platform:s}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:u={fn:N=>{let{x:E,y:T}=N;return{x:E,y:T}}},...p}=Ur(e,t),f={x:o,y:n},h=await s.detectOverflow(t,p),m=Br(i),x=pn(m),C=f[x],A=f[m],v=(N,E)=>oa(E+h[N==="y"?"top":"left"],E,E-h[N==="y"?"bottom":"right"]);c&&(C=v(x,C)),d&&(A=v(m,A));let w=u.fn({...t,[x]:C,[m]:A});return{...w,data:{x:w.x-o,y:w.y-n,enabled:{[x]:c,[m]:d}}}}}};function $r(){return typeof window<"u"}function St(e){return fa(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $e(e){var t;return(t=(fa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fa(e){return $r()?e instanceof Node||e instanceof ae(e).Node:!1}function Oe(e){return $r()?e instanceof Element||e instanceof ae(e).Element:!1}function He(e){return $r()?e instanceof HTMLElement||e instanceof ae(e).HTMLElement:!1}function pa(e){return!$r()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}function cr(e){let{overflow:t,overflowX:o,overflowY:n,display:i}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&i!=="inline"&&i!=="contents"}function ha(e){return/^(table|td|th)$/.test(St(e))}function lr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Wl=/transform|translate|scale|rotate|perspective|filter/,Vl=/paint|layout|strict|content/,xt=e=>!!e&&e!=="none",mn;function Ut(e){let t=Oe(e)?Ae(e):e;return xt(t.transform)||xt(t.translate)||xt(t.scale)||xt(t.rotate)||xt(t.perspective)||!Hr()&&(xt(t.backdropFilter)||xt(t.filter))||Wl.test(t.willChange||"")||Vl.test(t.contain||"")}function ma(e){let t=Qe(e);for(;He(t)&&!Bt(t);){if(Ut(t))return t;if(lr(t))return null;t=Qe(t)}return null}function Hr(){return mn==null&&(mn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mn}function Bt(e){return/^(html|body|#document)$/.test(St(e))}function Ae(e){return ae(e).getComputedStyle(e)}function dr(e){return Oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qe(e){if(St(e)==="html")return e;let t=e.assignedSlot||e.parentNode||pa(e)&&e.host||$e(e);return pa(t)?t.host:t}function ya(e){let t=Qe(e);return Bt(t)?(e.ownerDocument||e).body:He(t)&&cr(t)?t:ya(t)}function Fr(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let i=ya(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),c=ae(i);if(s){let d=zr(c);return t.concat(c,c.visualViewport||[],cr(i)?i:[],d&&o?Fr(d):[])}else return t.concat(i,Fr(i,[],o))}function zr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xa(e){let t=Ae(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=He(e),s=i?e.offsetWidth:o,c=i?e.offsetHeight:n,d=ar(o)!==s||ar(n)!==c;return d&&(o=s,n=c),{width:o,height:n,$:d}}function Sa(e){return Oe(e)?e:e.contextElement}function Ft(e){let t=Sa(e);if(!He(t))return Pe(1);let o=t.getBoundingClientRect(),{width:n,height:i,$:s}=xa(t),c=(s?ar(o.width):o.width)/n,d=(s?ar(o.height):o.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}var Kl=Pe(0);function va(e){let t=ae(e);return!Hr()||!t.visualViewport?Kl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jl(e,t,o){return t===void 0&&(t=!1),!!o&&t&&o===ae(e)}function ur(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let i=e.getBoundingClientRect(),s=Sa(e),c=Pe(1);t&&(n?Oe(n)&&(c=Ft(n)):c=Ft(e));let d=jl(s,o,n)?va(s):Pe(0),u=(i.left+d.x)/c.x,p=(i.top+d.y)/c.y,f=i.width/c.x,h=i.height/c.y;if(s&&n){let m=ae(s),x=Oe(n)?ae(n):n,C=m,A=zr(C);for(;A&&x!==C;){let v=Ft(A),w=A.getBoundingClientRect(),N=Ae(A),E=w.left+(A.clientLeft+parseFloat(N.paddingLeft))*v.x,T=w.top+(A.clientTop+parseFloat(N.paddingTop))*v.y;u*=v.x,p*=v.y,f*=v.x,h*=v.y,u+=E,p+=T,C=ae(A),A=zr(C)}}return bt({width:f,height:h,x:u,y:p})}function Gr(e,t){let o=dr(e).scrollLeft;return t?t.left+o:ur($e(e)).left+o}function Ca(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-Gr(e,o),i=o.top+t.scrollTop;return{x:n,y:i}}function ql(e){let{elements:t,rect:o,offsetParent:n,strategy:i}=e,s=i==="fixed",c=$e(n),d=t?lr(t.floating):!1;if(n===c||d&&s)return o;let u={scrollLeft:0,scrollTop:0},p=Pe(1),f=Pe(0),h=He(n);if((h||!s)&&((St(n)!=="body"||cr(c))&&(u=dr(n)),h)){let x=ur(n);p=Ft(n),f.x=x.x+n.clientLeft,f.y=x.y+n.clientTop}let m=c&&!h&&!s?Ca(c,u):Pe(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-u.scrollLeft*p.x+f.x+m.x,y:o.y*p.y-u.scrollTop*p.y+f.y+m.y}}function Zl(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Yl(e){let t=dr(e),o=e.ownerDocument.body,n=Ye(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=Ye(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-t.scrollLeft+Gr(e),c=-t.scrollTop;return Ae(o).direction==="rtl"&&(s+=Ye(e.clientWidth,o.clientWidth)-n),{width:n,height:i,x:s,y:c}}var Xl=25;function Ql(e,t,o){o===void 0&&(o="viewport");let n=o==="layoutViewport",i=ae(e),s=$e(e),c=i.visualViewport,d=s.clientWidth,u=s.clientHeight,p=0,f=0;if(c){let m=!Hr()||t==="fixed";n?m||(p=-c.offsetLeft,f=-c.offsetTop):(d=c.width,u=c.height,m&&(p=c.offsetLeft,f=c.offsetTop))}if(Gr(s)<=0){let m=s.ownerDocument,x=m.body,C=getComputedStyle(x),A=m.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,v=Math.abs(s.clientWidth-x.clientWidth-A),w=getComputedStyle(s).scrollbarGutter==="stable both-edges"?v/2:v;w<=Xl&&(d-=w)}return{width:d,height:u,x:p,y:f}}function Jl(e,t){let o=ur(e,!0,t==="fixed"),n=o.top+e.clientTop,i=o.left+e.clientLeft,s=Ft(e),c=e.clientWidth*s.x,d=e.clientHeight*s.y,u=i*s.x,p=n*s.y;return{width:c,height:d,x:u,y:p}}function ga(e,t,o){let n;if(t==="viewport"||t==="layoutViewport")n=Ql(e,o,t);else if(t==="document")n=Yl($e(e));else if(Oe(t))n=Jl(t,o);else{let i=va(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return bt(n)}function ed(e,t){let o=t.get(e);if(o)return o;let n=Fr(e,[],!1).filter(d=>Oe(d)&&St(d)!=="body"),i=null,s=Ae(e).position==="fixed",c=s?Qe(e):e;for(;Oe(c)&&!Bt(c);){let d=Ae(c),u=Ut(c),p=i?i.position:s?"fixed":"";!u&&(p==="fixed"||p==="absolute"&&d.position==="static")?n=n.filter(h=>h!==c):i=d,c=Qe(c)}return t.set(e,n),n}function td(e){let{element:t,boundary:o,rootBoundary:n,strategy:i}=e,c=[...o==="clippingAncestors"?lr(t)?[]:ed(t,this._c):[].concat(o),n],d=ga(t,c[0],i),u=d.top,p=d.right,f=d.bottom,h=d.left;for(let m=1;m<c.length;m++){let x=ga(t,c[m],i);u=Ye(x.top,u),p=ir(x.right,p),f=ir(x.bottom,f),h=Ye(x.left,h)}return{width:p-h,height:f-u,x:h,y:u}}function rd(e){let{width:t,height:o}=xa(e);return{width:t,height:o}}function od(e,t,o){let n=He(t),i=$e(t),s=o==="fixed",c=ur(e,!0,s,t),d={scrollLeft:0,scrollTop:0},u=Pe(0);if((n||!s)&&((St(t)!=="body"||cr(i))&&(d=dr(t)),n)){let m=ur(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}!n&&i&&(u.x=Gr(i));let p=i&&!n&&!s?Ca(i,d):Pe(0),f=c.left+d.scrollLeft-u.x-p.x,h=c.top+d.scrollTop-u.y-p.y;return{x:f,y:h,width:c.width,height:c.height}}function yn(e){return Ae(e).position==="static"}function ba(e,t){if(!He(e)||Ae(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return $e(e)===o&&(o=o.ownerDocument.body),o}function Ea(e,t){let o=ae(e);if(lr(e))return o;if(!He(e)){let i=Qe(e);for(;i&&!Bt(i);){if(Oe(i)&&!yn(i))return i;i=Qe(i)}return o}let n=ba(e,t);for(;n&&ha(n)&&yn(n);)n=ba(n,t);return n&&Bt(n)&&yn(n)&&!Ut(n)?o:n||ma(e)||o}var nd=async function(e){let t=this.getOffsetParent||Ea,o=this.getDimensions,n=await o(e.floating);return{reference:od(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function id(e){return Ae(e).direction==="rtl"}var Wr={convertOffsetParentRelativeRectToViewportRelativeRect:ql,getDocumentElement:$e,getClippingRect:td,getOffsetParent:Ea,getElementRects:nd,getClientRects:Zl,getDimensions:rd,getScale:Ft,isElement:Oe,isRTL:id};var Oa=da,Aa=ua;var wa=(e,t,o)=>{let n=new Map,i=o??{},s={...Wr,...i.platform,_c:n};return la(e,t,{...i,platform:s})};function Ra(e){return ad(e)}function gn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function ad(e){for(let t=e;t;t=gn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=gn(e);t;t=gn(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||Ut(o)||t.tagName==="BODY"))return t}return null}async function _a(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},wa(e,t,{strategy:n.strategy,platform:{...Wr,getOffsetParent:i=>Wr.getOffsetParent(i,Ra)},middleware:[Aa({crossAxis:!0}),Oa({allowedPlacements:[n.placement]})]})}var qt=y(O());var Fn=y(j());var Ta=y(j(),1);var bn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},sd=e=>({fromAttribute:t=>{if(t==null)return pr(e);try{return JSON.parse(t)}catch{return pr(e)}},toAttribute:t=>JSON.stringify(t)});function La(e,t){return(0,Ta.property)({type:Object,converter:sd(e),hasChanged:fr,...t??{}})}function cd(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!$t(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(!$t(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=c=>Object.keys(c).filter(d=>c[d]!=null),s=i(e);if(o=s.length,o!==i(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=o;n--!==0;){let c=s[n];if(!$t(e[c],t[c]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function $t(e,t){try{return cd(e,t)}catch{return!1}}function fr(e,t){return!$t(e,t)}function pr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Vr(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let i=t(n);return i[e]=!0,i}}var ka=y(j(),1);var xn=e=>{let t=e??{};return(o,n)=>{var i;let s={hasChanged:fr,attribute:!1,...t};(0,ka.property)(s)(o,n);let c=o.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(d=>d[n]),store:t.store})}};var Kr=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var vt=y(j(),1);var jr=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let c of n)try{await c()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Na=y(F(),1);var qr=globalThis,ld=qr.ShadowRoot&&(qr.ShadyCSS===void 0||qr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Ia=(e,t)=>{if(ld)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),i=qr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,e.appendChild(n)}};var Zr=class extends Na.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Ia(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){bn(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function Pa(e,t,...o){var n;let i=e.querySelector(t);for(let s of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var zt=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Ba,Da=Symbol("constructorPrototype"),Ma=Symbol("constructorName"),Fa=Symbol("exportpartsDebouncer"),Ua=Symbol("dynamicDependenciesLoaded"),Ht=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Ht.eventName="exportparts-updated";var De=class extends Zr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ba]=new jr(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Fa].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Ma]=this.constructor.name,this[Da]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ma]&&Object.setPrototypeOf(this,this[Da])}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 o=this.constructor;o[Ua]||(o[Ua]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Ht.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Ht.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 Ht)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];o=Pa(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var o,n,i,s,c,d;let u=m=>m!=null&&m.trim().length>0,p=t.filter(u).map(m=>m.trim());if(p.length===0){this.exportparts=void 0;return}let f=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(s=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],C=(d=(c=m.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(v=>v.split(":")[1]))!==null&&d!==void 0?d:[],A=[...x,...C].filter(u).map(v=>v.trim());for(let v of A)f.add(v)}if(f.size===0){this.exportparts=void 0;return}let h=[...f.values()].flatMap(m=>p.map(x=>`${m}:${x}--${m}`));this.exportparts=[...this.part,...h].join(", ")}};Ba=Fa;zt([(0,vt.property)()],De.prototype,"exportpartsPrefix",void 0);zt([La([])],De.prototype,"exportpartsPrefixes",void 0);zt([(0,vt.property)({reflect:!0})],De.prototype,"exportparts",void 0);zt([(0,vt.property)()],De.prototype,"customStylesheet",void 0);zt([(0,vt.property)()],De.prototype,"elementToFocus",void 0);zt([(0,vt.state)()],De.prototype,"useAdoptedStyleSheets",void 0);function Yr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var hr=Symbol("internalReduxEventsUnsubscribers"),Je=Symbol("internalStoresUnsubscribers"),Ct=Symbol("internalStores"),dd=Vr(Symbol("withRedux"),function(e){var t,o,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(c){super.willUpdate(c),[...this.reduxConstructor.reduxReactiveProperties].some(d=>c.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[Ct].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ct].values()][0]}getStore(c){return c==null?this.getUnnamedStore():this[Ct].get(c)}addStore(c,d){var u;d=(u=d??c.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Ct].set(d,c),this.subscribeToStore(d,c),this.updateFromStores()}removeStore(c){let d=typeof c=="string"?c:c.name;this.unsubscribeFromStore(d),this[Ct].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Ct].forEach((c,d)=>this.subscribeToStore(d,c)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((c,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(c.store);p&&(c.store?this[Je].has(c.store):this[Je].size>0)&&(this[d]=c.selector(p.getState(),this))}})}subscribeToStore(c,d){var u;this[Je].set(c,d.subscribe(()=>this.updateFromStores())),this[hr].set(c,[]),Yr(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,f)=>{if(typeof this[f]=="function"&&(!p.store||d.name===p.store)){let h=m=>this[f](m);d.addEventListener(p.eventName,h),this[hr].get(c).push(()=>d.removeEventListener(p.eventName,h))}})),this.onStoreAvailable(c)}unsubscribeFromStores(){this[Je].forEach((c,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(c){var d;this[Je].has(c)&&this[Je].get(c)(),this[Je].delete(c),(d=this[hr].get(c))===null||d===void 0||d.forEach(u=>u()),this[hr].delete(c)}onStoreAvailable(c){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Je,o=Ct,n=hr,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),$a=class extends dd(De){};function Z(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 ud=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ha=ud,Sn=()=>Math.random().toString(36).substring(7).split("").join("."),pd={INIT:`@@redux/INIT${Sn()}`,REPLACE:`@@redux/REPLACE${Sn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Sn()}`},Xr=pd;function Qr(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 vn(e,t,o){if(typeof e!="function")throw new Error(Z(2));if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Z(1));return o(vn)(e,t)}let n=e,i=t,s=new Map,c=s,d=0,u=!1;function p(){c===s&&(c=new Map,s.forEach((v,w)=>{c.set(w,v)}))}function f(){if(u)throw new Error(Z(3));return i}function h(v){if(typeof v!="function")throw new Error(Z(4));if(u)throw new Error(Z(5));let w=!0;p();let N=d++;return c.set(N,v),function(){if(w){if(u)throw new Error(Z(6));w=!1,p(),c.delete(N),s=null}}}function m(v){if(!Qr(v))throw new Error(Z(7));if(typeof v.type>"u")throw new Error(Z(8));if(typeof v.type!="string")throw new Error(Z(17));if(u)throw new Error(Z(9));try{u=!0,i=n(i,v)}finally{u=!1}return(s=c).forEach(N=>{N()}),v}function x(v){if(typeof v!="function")throw new Error(Z(10));n=v,m({type:Xr.REPLACE})}function C(){let v=h;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(Z(11));function N(){let T=w;T.next&&T.next(f())}return N(),{unsubscribe:v(N)}},[Ha](){return this}}}return m({type:Xr.INIT}),{dispatch:m,subscribe:h,getState:f,replaceReducer:x,[Ha]:C}}function fd(e){Object.keys(e).forEach(t=>{let o=e[t];if(typeof o(void 0,{type:Xr.INIT})>"u")throw new Error(Z(12));if(typeof o(void 0,{type:Xr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Z(13))})}function za(e){let t=Object.keys(e),o={};for(let c=0;c<t.length;c++){let d=t[c];typeof e[d]=="function"&&(o[d]=e[d])}let n=Object.keys(o),i,s;try{fd(o)}catch(c){s=c}return function(d={},u){if(s)throw s;let p=!1,f={};for(let h=0;h<n.length;h++){let m=n[h],x=o[m],C=d[m],A=x(C,u);if(typeof A>"u"){let v=u&&u.type;throw new Error(Z(14))}f[m]=A,p=p||A!==C}return p=p||n.length!==Object.keys(d).length,p?f:d}}function mr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,o)=>(...n)=>t(o(...n)))}function Ga(...e){return t=>(o,n)=>{let i=t(o,n),s=()=>{throw new Error(Z(15))},c={getState:i.getState,dispatch:(u,...p)=>s(u,...p)},d=e.map(u=>u(c));return s=mr(...d)(i.dispatch),{...i,dispatch:s}}}function Wa(e){return Qr(e)&&"type"in e&&typeof e.type=="string"}var Ja=Symbol.for("immer-nothing"),Va=Symbol.for("immer-draftable"),J=Symbol.for("immer-state");function we(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var pe=Object,Wt=pe.getPrototypeOf,ro="constructor",co="prototype",An="configurable",oo="enumerable",eo="writable",yr="value",Me=e=>!!e&&!!e[J];function fe(e){return e?es(e)||uo(e)||!!e[Va]||!!e[ro]?.[Va]||po(e)||fo(e):!1}var hd=pe[co][ro].toString(),Ka=new WeakMap;function es(e){if(!e||!Nn(e))return!1;let t=Wt(e);if(t===null||t===pe[co])return!0;let o=pe.hasOwnProperty.call(t,ro)&&t[ro];if(o===Object)return!0;if(!Gt(o))return!1;let n=Ka.get(o);return n===void 0&&(n=Function.toString.call(o),Ka.set(o,n)),n===hd}function lo(e,t,o=!0){xr(e)===0?(o?Reflect.ownKeys(e):pe.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function xr(e){let t=e[J];return t?t.type_:uo(e)?1:po(e)?2:fo(e)?3:0}var Cn=(e,t,o=xr(e))=>o===2?e.has(t):pe[co].hasOwnProperty.call(e,t),wn=(e,t,o=xr(e))=>o===2?e.get(t):e[t],no=(e,t,o,n=xr(e))=>{n===2?e.set(t,o):n===3?e.add(o):e[t]=o};function md(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var uo=Array.isArray,po=e=>e instanceof Map,fo=e=>e instanceof Set,Nn=e=>typeof e=="object",Gt=e=>typeof e=="function",En=e=>typeof e=="boolean";function yd(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var ze=e=>e.copy_||e.base_;var Pn=e=>e.modified_?e.copy_:e.base_;function Rn(e,t){if(po(e))return new Map(e);if(fo(e))return new Set(e);if(uo(e))return Array[co].slice.call(e);let o=es(e);if(t===!0||t==="class_only"&&!o){let n=pe.getOwnPropertyDescriptors(e);delete n[J];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){let c=i[s],d=n[c];d[eo]===!1&&(d[eo]=!0,d[An]=!0),(d.get||d.set)&&(n[c]={[An]:!0,[eo]:!0,[oo]:d[oo],[yr]:e[c]})}return pe.create(Wt(e),n)}else{let n=Wt(e);if(n!==null&&o)return{...e};let i=pe.create(n);return pe.assign(i,e)}}function Dn(e,t=!1){return ho(e)||Me(e)||!fe(e)||(xr(e)>1&&pe.defineProperties(e,{set:Jr,add:Jr,clear:Jr,delete:Jr}),pe.freeze(e),t&&lo(e,(o,n)=>{Dn(n,!0)},!1)),e}function gd(){we(2)}var Jr={[yr]:gd};function ho(e){return e===null||!Nn(e)?!0:pe.isFrozen(e)}var io="MapSet",_n="Patches",ja="ArrayMethods",ts={};function Et(e){let t=ts[e];return t||we(0,e),t}var qa=e=>!!ts[e];var gr,rs=()=>gr,bd=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:qa(io)?Et(io):void 0,arrayMethodsPlugin_:qa(ja)?Et(ja):void 0});function Za(e,t){t&&(e.patchPlugin_=Et(_n),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Tn(e){Ln(e),e.drafts_.forEach(xd),e.drafts_=null}function Ln(e){e===gr&&(gr=e.parent_)}var Ya=e=>gr=bd(gr,e);function xd(e){let t=e[J];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Xa(e,t){t.unfinalizedDrafts_=t.drafts_.length;let o=t.drafts_[0];if(e!==void 0&&e!==o){o[J].modified_&&(Tn(t),we(4)),fe(e)&&(e=Qa(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(o[J].base_,e,t)}else e=Qa(t,o);return Sd(t,e,!0),Tn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ja?e:void 0}function Qa(e,t){if(ho(t))return t;let o=t[J];if(!o)return ao(t,e.handledSet_,e);if(!mo(o,e))return t;if(!o.modified_)return o.base_;if(!o.finalized_){let{callbacks_:n}=o;if(n)for(;n.length>0;)n.pop()(e);is(o,e)}return o.copy_}function Sd(e,t,o=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Dn(t,o)}function os(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var mo=(e,t)=>e.scope_===t,vd=[];function ns(e,t,o,n){let i=ze(e),s=e.type_;if(n!==void 0&&wn(i,n,s)===t){no(i,n,o,s);return}if(!e.draftLocations_){let d=e.draftLocations_=new Map;lo(i,(u,p)=>{if(Me(p)){let f=d.get(p)||[];f.push(u),d.set(p,f)}})}let c=e.draftLocations_.get(t)??vd;for(let d of c)no(i,d,o,s)}function Cd(e,t,o){e.callbacks_.push(function(i){let s=t;if(!s||!mo(s,i))return;i.mapSetPlugin_?.fixSetContents(s);let c=Pn(s);ns(e,s.draft_??s,c,o),is(s,i)})}function is(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 i=n.getPath(e);i&&n.generatePatches_(e,i,t)}os(e)}}function Ed(e,t,o){let{scope_:n}=e;if(Me(o)){let i=o[J];mo(i,n)&&i.callbacks_.push(function(){to(e);let c=Pn(i);ns(e,o,c,t)})}else fe(o)&&e.callbacks_.push(function(){let s=ze(e);e.type_===3?s.has(o)&&ao(o,n.handledSet_,n):wn(s,t,e.type_)===o&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ao(wn(e.copy_,t,e.type_),n.handledSet_,n)})}function ao(e,t,o){return!o.immer_.autoFreeze_&&o.unfinalizedDrafts_<1||Me(e)||t.has(e)||!fe(e)||ho(e)||(t.add(e),lo(e,(n,i)=>{if(Me(i)){let s=i[J];if(mo(s,o)){let c=Pn(s);no(e,n,c,e.type_),os(s)}}else fe(i)&&ao(i,t,o)})),e}function Od(e,t){let o=uo(e),n={type_:o?1:0,scope_:t?t.scope_:rs(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,s=so;o&&(i=[n],s=br);let{revoke:c,proxy:d}=Proxy.revocable(i,s);return n.draft_=d,n.revoke_=c,[d,n]}var so={get(e,t){if(t===J)return e;let o=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&o?.isArrayOperationMethod(t))return o.createMethodInterceptor(e,t);let i=ze(e);if(!Cn(i,t,e.type_))return wd(e,i,t);let s=i[t];if(e.finalized_||!fe(s)||n&&e.operationMethod&&o?.isMutatingArrayMethod(e.operationMethod)&&yd(t))return s;if(s===On(e.base_,t)||Ad(e,t,s)){to(e);let c=e.type_===1?+t:t,d=In(e.scope_,s,e,c);return e.copy_[c]=d}return s},has(e,t){return t in ze(e)},ownKeys(e){return Reflect.ownKeys(ze(e))},set(e,t,o){let n=as(ze(e),t);if(n?.set)return n.set.call(e.draft_,o),!0;if(!e.modified_){let i=On(ze(e),t),s=i?.[J];if(s&&s.base_===o)return e.copy_[t]=o,e.assigned_.set(t,!1),!0;if(md(o,i)&&(o!==void 0||Cn(e.base_,t,e.type_)))return!0;to(e),kn(e)}return e.copy_[t]===o&&(o!==void 0||Cn(e.copy_,t,e.type_))||Number.isNaN(o)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=o,e.assigned_.set(t,!0),Ed(e,t,o)),!0},deleteProperty(e,t){return to(e),On(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),kn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let o=ze(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{[eo]:!0,[An]:e.type_!==1||t!=="length",[oo]:n[oo],[yr]:o[t]}},defineProperty(){we(11)},getPrototypeOf(e){return Wt(e.base_)},setPrototypeOf(){we(12)}},br={};for(let e in so){let t=so[e];br[e]=function(){let o=arguments;return o[0]=o[0][0],t.apply(this,o)}}br.deleteProperty=function(e,t){return br.set.call(this,e,t,void 0)};br.set=function(e,t,o){return so.set.call(this,e[0],t,o,e[0])};function On(e,t){let o=e[J];return(o?ze(o):e)[t]}function Ad(e,t,o){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!fe(o)||o[J]?!1:e.baseRefs_.has(o)}function wd(e,t,o){let n=as(t,o);return n?yr in n?n[yr]:n.get?.call(e.draft_):void 0}function as(e,t){if(!(t in e))return;let o=Wt(e);for(;o;){let n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Wt(o)}}function kn(e){e.modified_||(e.modified_=!0,e.parent_&&kn(e.parent_))}function to(e){e.copy_||(e.assigned_=new Map,e.copy_=Rn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Rd=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,o,n)=>{if(Gt(t)&&!Gt(o)){let s=o;o=t;let c=this;return function(u=s,...p){return c.produce(u,f=>o.call(this,f,...p))}}Gt(o)||we(6),n!==void 0&&!Gt(n)&&we(7);let i;if(fe(t)){let s=Ya(this),c=In(s,t,void 0),d=!0;try{i=o(c),d=!1}finally{d?Tn(s):Ln(s)}return Za(s,n),Xa(i,s)}else if(!t||!Nn(t)){if(i=o(t),i===void 0&&(i=t),i===Ja&&(i=void 0),this.autoFreeze_&&Dn(i,!0),n){let s=[],c=[];Et(_n).generateReplacementPatches_(t,i,{patches_:s,inversePatches_:c}),n(s,c)}return i}else we(1,t)},this.produceWithPatches=(t,o)=>{if(Gt(t))return(c,...d)=>this.produceWithPatches(c,u=>t(u,...d));let n,i;return[this.produce(t,o,(c,d)=>{n=c,i=d}),n,i]},En(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),En(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),En(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){fe(e)||we(8),Me(e)&&(e=ss(e));let t=Ya(this),o=In(t,e,void 0);return o[J].isManual_=!0,Ln(t),o}finishDraft(e,t){let o=e&&e[J];(!o||!o.isManual_)&&we(9);let{scope_:n}=o;return Za(n,t),Xa(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 o;for(o=t.length-1;o>=0;o--){let i=t[o];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}o>-1&&(t=t.slice(o+1));let n=Et(_n).applyPatches_;return Me(e)?n(e,t):this.produce(e,i=>n(i,t))}};function In(e,t,o,n){let[i,s]=po(t)?Et(io).proxyMap_(t,o):fo(t)?Et(io).proxySet_(t,o):Od(t,o);return(o?.scope_??rs()).drafts_.push(i),s.callbacks_=o?.callbacks_??[],s.key_=n,o&&n!==void 0?Cd(o,s,n):s.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:p}=u;s.modified_&&p&&p.generatePatches_(s,[],u)}),i}function ss(e){return Me(e)||we(10,e),cs(e)}function cs(e){if(!fe(e)||ho(e))return e;let t=e[J],o,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,o=Rn(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else o=Rn(e,!0);return lo(o,(i,s)=>{no(o,i,cs(s))},n),t&&(t.finalized_=!1),o}var _d=globalThis.Iterator,gg=typeof _d?.from=="function";var Td=new Rd,Mn=Td.produce;function ls(e){return({dispatch:o,getState:n})=>i=>s=>typeof s=="function"?s(o,n,e):i(s)}var ds=ls(),us=ls;var Ld=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?mr:mr.apply(null,arguments)},Og=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},kd=e=>e&&typeof e.match=="function";function et(e,t){function o(...n){if(t){let i=t(...n);if(!i)throw new Error(Ge(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return o.toString=()=>`${e}`,o.type=e,o.match=n=>Wa(n)&&n.type===e,o}var ys=class Sr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Sr.prototype)}static get[Symbol.species](){return Sr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Sr(...t[0].concat(this)):new Sr(...t.concat(this))}};function ps(e){return fe(e)?Mn(e,()=>{}):e}function yo(e,t,o){return e.has(t)?e.get(t):e.set(t,o(t)).get(t)}function Id(e){return typeof e=="boolean"}var Nd=()=>function(t){let{thunk:o=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{},c=new ys;return o&&(Id(o)?c.push(ds):c.push(us(o.extraArgument))),c},Pd="RTK_autoBatch";var fs=e=>t=>{setTimeout(t,e)},Dd=(e,t)=>o=>{let n=!1,i=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(c),o())},s=e(i),c=setTimeout(i,t)},Md=(e={type:"raf"})=>t=>(...o)=>{let n=t(...o),i=!0,s=!1,c=!1,d=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Dd(window.requestAnimationFrame,100):fs(10):e.type==="callback"?e.queueNotification:fs(e.timeout),p=()=>{c=!1,s&&(s=!1,d.forEach(f=>f()))};return Object.assign({},n,{subscribe(f){let h=()=>i&&f(),m=n.subscribe(h);return d.add(f),()=>{m(),d.delete(f)}},dispatch(f){try{return i=!f?.meta?.[Pd],s=!i,s&&(c||(c=!0,u(p))),n.dispatch(f)}finally{i=!0}}})},Ud=e=>function(o){let{autoBatch:n=!0}=o??{},i=new ys(e);return n&&i.push(Md(typeof n=="object"?n:void 0)),i};function gs(e){let t=Nd(),{reducer:o=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:s=!0,preloadedState:c=void 0,enhancers:d=void 0}=e||{},u;if(typeof o=="function")u=o;else if(Qr(o))u=za(o);else throw new Error(Ge(1));let p;typeof n=="function"?p=n(t):p=t();let f=mr;i&&(f=Ld({trace:!1,...typeof i=="object"&&i}));let h=Ga(...p),m=Ud(h),x=typeof d=="function"?d(m):m(),C=f(...x);return vn(u,c,C)}function bs(e){let t={},o=[],n,i={addCase(s,c){let d=typeof s=="string"?s:s.type;if(!d)throw new Error(Ge(28));if(d in t)throw new Error(Ge(29));return t[d]=c,i},addAsyncThunk(s,c){return c.pending&&(t[s.pending.type]=c.pending),c.rejected&&(t[s.rejected.type]=c.rejected),c.fulfilled&&(t[s.fulfilled.type]=c.fulfilled),c.settled&&o.push({matcher:s.settled,reducer:c.settled}),i},addMatcher(s,c){return o.push({matcher:s,reducer:c}),i},addDefaultCase(s){return n=s,i}};return e(i),[t,o,n]}function Bd(e){return typeof e=="function"}function Fd(e,t){let[o,n,i]=bs(t),s;if(Bd(e))s=()=>ps(e());else{let d=ps(e);s=()=>d}function c(d=s(),u){let p=[o[u.type],...n.filter(({matcher:f})=>f(u)).map(({reducer:f})=>f)];return p.filter(f=>!!f).length===0&&(p=[i]),p.reduce((f,h)=>{if(h)if(Me(f)){let x=h(f,u);return x===void 0?f:x}else{if(fe(f))return Mn(f,m=>h(m,u));{let m=h(f,u);if(m===void 0){if(f===null)return f;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return f},d)}return c.getInitialState=s,c}var $d=(e,t)=>kd(e)?e.match(t):e(t);function Hd(...e){return t=>e.some(o=>$d(o,t))}var zd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Gd=(e=21)=>{let t="",o=e;for(;o--;)t+=zd[Math.random()*64|0];return t},Wd=["name","message","stack","code"],Un=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},hs=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Vd=e=>{if(typeof e=="object"&&e!==null){let t={};for(let o of Wd)typeof e[o]=="string"&&(t[o]=e[o]);return t}return{message:String(e)}},ms="External signal was aborted",Kd=(()=>{function e(t,o,n){let i=et(t+"/fulfilled",(u,p,f,h)=>({payload:u,meta:{...h||{},arg:f,requestId:p,requestStatus:"fulfilled"}})),s=et(t+"/pending",(u,p,f)=>({payload:void 0,meta:{...f||{},arg:p,requestId:u,requestStatus:"pending"}})),c=et(t+"/rejected",(u,p,f,h,m)=>({payload:h,error:(n&&n.serializeError||Vd)(u||"Rejected"),meta:{...m||{},arg:f,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function d(u,{signal:p}={}){return(f,h,m)=>{let x=n?.idGenerator?n.idGenerator(u):Gd(),C=new AbortController,A,v;function w(E){v=E,C.abort()}p&&(p.aborted?w(ms):p.addEventListener("abort",()=>w(ms),{once:!0}));let N=(async function(){let E;try{let k=n?.condition?.(u,{getState:h,extra:m});if(qd(k)&&(k=await k),k===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let $=new Promise((M,H)=>{A=()=>{H({name:"AbortError",message:v||"Aborted"})},C.signal.addEventListener("abort",A,{once:!0})});f(s(x,u,n?.getPendingMeta?.({requestId:x,arg:u},{getState:h,extra:m}))),E=await Promise.race([$,Promise.resolve(o(u,{dispatch:f,getState:h,extra:m,requestId:x,signal:C.signal,abort:w,rejectWithValue:((M,H)=>new Un(M,H)),fulfillWithValue:((M,H)=>new hs(M,H))})).then(M=>{if(M instanceof Un)throw M;return M instanceof hs?i(M.payload,x,u,M.meta):i(M,x,u)})])}catch(k){E=k instanceof Un?c(null,x,u,k.payload,k.meta):c(k,x,u)}finally{A&&C.signal.removeEventListener("abort",A)}return n&&!n.dispatchConditionRejection&&c.match(E)&&E.meta.condition||f(E),E})();return Object.assign(N,{abort:w,requestId:x,arg:u,unwrap(){return N.then(jd)}})}}return Object.assign(d,{pending:s,rejected:c,fulfilled:i,settled:Hd(c,i),typePrefix:t})}return e.withTypes=()=>e,e})();function jd(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function qd(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var xs=Symbol.for("rtk-slice-createasyncthunk"),wg={[xs]:Kd};function Zd(e,t){return`${e}/${t}`}function Yd({creators:e}={}){let t=e?.asyncThunk?.[xs];return function(n){let{name:i,reducerPath:s=i}=n;if(!i)throw new Error(Ge(11));typeof process<"u";let c=(typeof n.reducers=="function"?n.reducers(Qd()):n.reducers)||{},d=Object.keys(c),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(E,T){let k=typeof E=="string"?E:E.type;if(!k)throw new Error(Ge(12));if(k in u.sliceCaseReducersByType)throw new Error(Ge(13));return u.sliceCaseReducersByType[k]=T,p},addMatcher(E,T){return u.sliceMatchers.push({matcher:E,reducer:T}),p},exposeAction(E,T){return u.actionCreators[E]=T,p},exposeCaseReducer(E,T){return u.sliceCaseReducersByName[E]=T,p}};d.forEach(E=>{let T=c[E],k={reducerName:E,type:Zd(i,E),createNotation:typeof n.reducers=="function"};eu(T)?ru(k,T,p,t):Jd(k,T,p)});function f(){let[E={},T=[],k=void 0]=typeof n.extraReducers=="function"?bs(n.extraReducers):[n.extraReducers],$={...E,...u.sliceCaseReducersByType};return Fd(n.initialState,M=>{for(let H in $)M.addCase(H,$[H]);for(let H of u.sliceMatchers)M.addMatcher(H.matcher,H.reducer);for(let H of T)M.addMatcher(H.matcher,H.reducer);k&&M.addDefaultCase(k)})}let h=E=>E,m=new Map,x=new WeakMap,C;function A(E,T){return C||(C=f()),C(E,T)}function v(){return C||(C=f()),C.getInitialState()}function w(E,T=!1){function k(M){let H=M[E];return typeof H>"u"&&T&&(H=yo(x,k,v)),H}function $(M=h){let H=yo(m,T,()=>new WeakMap);return yo(H,M,()=>{let er={};for(let[me,at]of Object.entries(n.selectors??{}))er[me]=Xd(at,M,()=>yo(x,M,v),T);return er})}return{reducerPath:E,getSelectors:$,get selectors(){return $(k)},selectSlice:k}}let N={name:i,reducer:A,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...w(s),injectInto(E,{reducerPath:T,...k}={}){let $=T??s;return E.inject({reducerPath:$,reducer:A},k),{...N,...w($,!0)}}};return N}}function Xd(e,t,o,n){function i(s,...c){let d=t(s);return typeof d>"u"&&n&&(d=o()),e(d,...c)}return i.unwrapped=e,i}var Ss=Yd();function Qd(){function e(t,o){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...o}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...o){return t(...o)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,o){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:o}},asyncThunk:e}}function Jd({type:e,reducerName:t,createNotation:o},n,i){let s,c;if("reducer"in n){if(o&&!tu(n))throw new Error(Ge(17));s=n.reducer,c=n.prepare}else s=n;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,c?et(e,c):et(e))}function eu(e){return e._reducerDefinitionType==="asyncThunk"}function tu(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ru({type:e,reducerName:t},o,n,i){if(!i)throw new Error(Ge(18));let{payloadCreator:s,fulfilled:c,pending:d,rejected:u,settled:p,options:f}=o,h=i(e,s,f);n.exposeAction(t,h),c&&n.addCase(h.fulfilled,c),d&&n.addCase(h.pending,d),u&&n.addCase(h.rejected,u),p&&n.addMatcher(h.settled,p),n.exposeCaseReducer(t,{fulfilled:c||go,pending:d||go,rejected:u||go,settled:p||go})}function go(){}var vs="listener",Cs="completed",Es="cancelled",Rg=`task-${Es}`,_g=`task-${Cs}`,Tg=`${vs}-${Es}`,Lg=`${vs}-${Cs}`;var{assign:Os}=Object;var Bn="listenerMiddleware";var ou=Os(et(`${Bn}/add`),{withTypes:()=>ou}),kg=et(`${Bn}/removeAll`),nu=Os(et(`${Bn}/remove`),{withTypes:()=>nu});function Ge(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 iu=Vr(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),bo=class extends iu(Object){};window.ftReduxStores||(window.ftReduxStores={});var As=class e extends bo{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Yr(s))return s;if(i==null)return;let c=Ss({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=gs({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let f=pr(c.getInitialState());for(let h of p.keeping)f[h]=(u??f)[h];return f}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return c.reducer(u,p)}});return window.ftReduxStores[i.name]=new e(c,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Kr,this.injectInto=(s,c)=>this.reduxSlice.injectInto(s,c),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,c,d)=>{let u=c,p=s[u];return p?(...f)=>{let h=p(...f.map(i));return this.reduxStore.dispatch(h),h}:f=>{let h=u,m=this.getState()[h];$t(m,f)||this.setState({[h]:i(f)})}}}),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 xo=class{static format(t,o,n,i,s){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,o,n,i,!!s)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,i,s){let c=typeof t=="string"?new Date(t):t,d=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(c),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(c);return s?u:i?`${d} ${u}`:d}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var So=y(O()),au="ft-app-info",tt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};tt.eventName="authentication-change";var vr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};vr.eventName="ui-locale-changed";var su={session:(e,t)=>{(0,So.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>R.dispatchEvent(new tt(t.payload)),0))}},R=So.FtReduxStore.get({name:au,reducers:su,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var ws=y(O()),vo=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},sb=(0,ws.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(R)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(d=>d.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?d=>xo.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return vo([(0,Fn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),vo([(0,Fn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),vo([xn({store:R.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),vo([xn({store:R.name})],t.prototype,"uiLocale",void 0),t});var Rs;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Rs||(Rs={}));var _s;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(_s||(_s={}));var Ts;(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"})(Ts||(Ts={}));var Ls;(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"})(Ls||(Ls={}));var ks;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(ks||(ks={}));var Is;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Is||(Is={}));var Ns;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Ns||(Ns={}));var Ps;(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"})(Ps||(Ps={}));var Ds;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Ds||(Ds={}));var Ms;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Ms||(Ms={}));var Us;(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"})(Us||(Us={}));var Bs;(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"})(Bs||(Bs={}));var Fs;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Fs||(Fs={}));var $s;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})($s||($s={}));var Hs;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Hs||(Hs={}));var zs;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(zs||(zs={}));var Gs;(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"})(Gs||(Gs={}));var $n;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})($n||($n={}));var Ws;(function(e){e.ASC="ASC",e.DESC="DESC"})(Ws||(Ws={}));var Vs;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Vs||(Vs={}));var Hn;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Hn||(Hn={}));var Ks;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ks||(Ks={}));var Co;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Co||(Co={}));var js;(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"})(js||(js={}));var qs;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(qs||(qs={}));var Zs;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Zs||(Zs={}));var zn;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(zn||(zn={}));var Ys;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ys||(Ys={}));var z;(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"})(z||(z={}));var be;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(be||(be={}));var Xs;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Xs||(Xs={}));var Qs;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Qs||(Qs={}));var Js;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Js||(Js={}));var ec;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(ec||(ec={}));var tc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(tc||(tc={}));var rc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(rc||(rc={}));var oc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(oc||(oc={}));var nc;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(nc||(nc={}));var ic;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(ic||(ic={}));var ac;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(ac||(ac={}));var sc;(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"})(sc||(sc={}));var cc;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(cc||(cc={}));var cu={[z.PERSONAL_BOOK_SHARE_USER]:[z.PERSONAL_BOOK_USER],[z.HTML_EXPORT_USER]:[z.PERSONAL_BOOK_USER],[z.PDF_EXPORT_USER]:[z.PERSONAL_BOOK_USER],[z.KHUB_ADMIN]:[z.CONTENT_PUBLISHER],[z.ADMIN]:[z.KHUB_ADMIN,z.USERS_ADMIN,z.PORTAL_ADMIN,z.BEHAVIOR_DATA_USER],[z.GENERATIVE_AI_EXPORT_USER]:[z.GENERATIVE_AI_USER]};function lc(e,t){return e===t||(cu[e]??[]).some(o=>lc(o,t))}function Eo(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=>lc(n,t))}function dc(e,...t){return e==null?!1:t.some(o=>Eo(e,o))}var _o=y(O());var Gn=y(O());var Ot=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=R.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let i=R.subscribe(()=>{n=e.get(t),n&&(i(),o(n))})}})}};var Vt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ot.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ot.await()}};var se=class extends Vt{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(s,c)=>typeof c!="object"||c==null||Array.isArray(c)?c:Object.fromEntries(Object.entries(c).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Gn.CacheRegistry,this.cache=t?i.commonCache:new Gn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Oo=class extends se{async listMySearches(){let{session:t}=R.getState();return Eo(t,z.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Ao=class extends se{async listMyBookmarks(){let t=R.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var wo=class extends se{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=R.getState().session;return!!t?.sessionAuthenticated}};var Ro=class extends se{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=R.getState().session;return!!t?.sessionAuthenticated}};var lu="ft-user-assets",du={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(be).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:i}=t.payload;Vn(e,o,[...Wn(e,o),i]),uc(e,o,1,n),pc(e,i)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;Vn(e,o,Wn(e,o).map(i=>i.id===n.id?n:i)),pc(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:i}=t.payload;Vn(e,o,Wn(e,o).filter(s=>s.id!==i)),uc(e,o,-1,n)}},fc={[be.SEARCHES]:"savedSearches",[be.BOOKMARKS]:"bookmarks",[be.BOOKS]:void 0,[be.COLLECTIONS]:void 0},Wn=(e,t)=>{var o;let n=fc[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},Vn=(e,t,o)=>{let n=fc[t];n&&(e[n]=o)},uc=(e,t,o,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+o),t===be.BOOKMARKS&&n)){let s=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,s+o)}},pc=(e,t)=>{let o=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},re=_o.FtReduxStore.get({name:lu,reducers:du,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(be).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Kn=class{constructor(t=new wo,o=new Ro){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=R.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ao,this.savedSearchesService=new Oo,R.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=R.getState();(0,_o.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),re.actions.clearAssetCount(),re.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),re.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),re.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();re.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();re.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&re.getState().assetCounts.allAsset[t]!==o.count&&re.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&re.getState().assetCounts.bookmarkByMap[t]!==o.count&&re.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(re.getState().assetCounts.bookmarkByMap).length!==0;t===be.BOOKMARKS&&o&&re.actions.clearBookmarkCountByMap(),re.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 o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;re.actions.bookmarks(o)}}},uu=new Kn;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=uu);var jn=class{addCommand(t,o=!1){R.commands.add(t,o)}consumeCommand(t){return R.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new jn;var xe=y(O());var hc,Kt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},pu=Symbol("clearAfterUnitTest"),To=class extends(0,xe.withEventBus)(se){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[hc]=()=>{this.defaultMessages={},this.cache=new xe.CacheRegistry,this.listeners={}},this.currentUiLocale=R.getState().uiLocale,R.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=R.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,xe.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let s=t.toLowerCase(),c=this.resolveContext(s);return new xe.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},c).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof xe.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Kt({loadedContexts:t})),this.dispatchEvent(new Kt({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new Kt({loadedContexts:[t]})),this.dispatchEvent(new Kt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,xe.delay)(0).then(()=>n()).catch(()=>null)))}};hc=pu;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends To{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends To{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Cr=window.FluidTopicsI18nService,qn=window.FluidTopicsCustomI18nService;var mc=y(O()),Zn=class{highlightHtml(t,o,n){(0,mc.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Zn;var yc=y(O());var Yn=class{isDate(t){var o,n,i,s;return(s=(i=((n=(o=R.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s,c;if(t==null)return"";try{return yc.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:R.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1,(c=o?.onlyTime)!==null&&c!==void 0?c:!1)}catch(d){throw console.error(`Date ${JSON.stringify(t)} is not valid`,d),d}}};window.FluidTopicsDateService=new Yn;var gc=y(O());var Er=class{static get(t,o){var n,i,s,c;let d=R.getState(),{lang:u,region:p}=(s=(i=(n=d.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&s!==void 0?s:{lang:"en",region:"US"};return new gc.SearchPlaceConverter(d.baseUrl,t??20,(c=d.localesConfiguration)===null||c===void 0?void 0:c.allLanguagesAllowed,o??`${u}-${p}`)}};var Xn=class{urlToSearchRequest(t){return Er.get().parse(t)}searchRequestToUrl(t){return Er.get().serialize(t)}};window.FluidTopicsUrlService=new Xn;var We=y(O());var At=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};At.eventName="before-location-change";var wt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};wt.eventName="change";var Qn=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},bc=new Qn;var Lo=class e extends We.WithEventBus{static build(){return new e(window.history,bc,()=>window.location,!1)}constructor(t,o,n,i){var s,c;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(c=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&c!==void 0?c:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&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,We.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new wt(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[s,c,d])=>{let u=new At(new URL(typeof d=="string"?d:(d??this.windowLocation()).href,window.location.origin));this.dispatchEvent(u);let p=o(),f={...p===this.currentIndex?this.currentState:void 0,...s,index:p,href:u.detail.nextLocation.href};n.apply(i,[f,c,f.href]),this.setCurrentState(f,!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 o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(At.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(At.eventName,t)}addHistoryChangeListener(t){this.addEventListener(wt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(wt.eventName,t)}currentItem(){return(0,We.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,We.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,We.deepCopy)(o.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,We.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 o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Lo.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),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var xc=y(F());var Sc=xc.css`
|
|
148
|
+
`;var ra=["top","right","bottom","left"],ta=["start","end"],un=ra.reduce((e,t)=>e.concat(t,t+"-"+ta[0],t+"-"+ta[1]),[]),ir=Math.min,Ye=Math.max,ar=Math.round;var Pe=e=>({x:e,y:e}),$l={left:"right",right:"left",bottom:"top",top:"bottom"};function oa(e,t,o){return Ye(e,ir(t,o))}function Ur(e,t){return typeof e=="function"?e(t):e}function sr(e){return e.split("-")[0]}function Xe(e){return e.split("-")[1]}function pn(e){return e==="x"?"y":"x"}function fn(e){return e==="y"?"height":"width"}function Br(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function hn(e){return pn(Br(e))}function na(e,t,o){o===void 0&&(o=!1);let n=Xe(e),i=hn(e),s=fn(i),c=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=dn(c)),[c,dn(c)]}function ia(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function dn(e){let t=sr(e);return $l[t]+e.slice(t.length)}function Hl(e){var t,o,n,i;return{top:(t=e.top)!=null?t:0,right:(o=e.right)!=null?o:0,bottom:(n=e.bottom)!=null?n:0,left:(i=e.left)!=null?i:0}}function aa(e){return typeof e!="number"?Hl(e):{top:e,right:e,bottom:e,left:e}}function bt(e){let{x:t,y:o,width:n,height:i}=e;return{width:n,height:i,top:o,left:t,right:t+n,bottom:o+i,x:t,y:o}}function sa(e,t,o){let{reference:n,floating:i}=e,s=Br(t),c=hn(t),d=fn(c),u=sr(t),p=s==="y",f=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,m=n[d]/2-i[d]/2,x;switch(u){case"top":x={x:f,y:n.y-i.height};break;case"bottom":x={x:f,y:n.y+n.height};break;case"right":x={x:n.x+n.width,y:h};break;case"left":x={x:n.x-i.width,y:h};break;default:x={x:n.x,y:n.y}}let C=Xe(t);return C&&(x[c]+=m*(C==="end"?1:-1)*(o&&p?-1:1)),x}async function ca(e,t){var o;t===void 0&&(t={});let{x:n,y:i,platform:s,rects:c,elements:d,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:x=0}=Ur(t,e),C=aa(x),v=d[m?h==="floating"?"reference":"floating":h],w=bt(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(v)))==null||o?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(d.floating)),boundary:p,rootBoundary:f,strategy:u})),N=h==="floating"?{x:n,y:i,width:c.floating.width,height:c.floating.height}:c.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d.floating)),T=await(s.isElement==null?void 0:s.isElement(E))&&await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1},k=bt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:N,offsetParent:E,strategy:u}):N);return{top:(w.top-k.top+C.top)/T.y,bottom:(k.bottom-w.bottom+C.bottom)/T.y,left:(w.left-k.left+C.left)/T.x,right:(k.right-w.right+C.right)/T.x}}var zl=50,la=async(e,t,o)=>{let{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:c}=o,d=c.detectOverflow?c:{...c,detectOverflow:ca},u=await(c.isRTL==null?void 0:c.isRTL(t)),p=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=sa(p,n,u),m=n,x=0,C={};for(let A=0;A<s.length;A++){let v=s[A];if(!v)continue;let{name:w,fn:N}=v,{x:E,y:T,data:k,reset:$}=await N({x:f,y:h,initialPlacement:n,placement:m,strategy:i,middlewareData:C,rects:p,platform:d,elements:{reference:e,floating:t}});f=E??f,h=T??h,C[w]={...C[w],...k},$&&x<zl&&(x++,typeof $=="object"&&($.placement&&(m=$.placement),$.rects&&(p=$.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):$.rects),{x:f,y:h}=sa(p,m,u)),A=-1)}return{x:f,y:h,placement:m,strategy:i,middlewareData:C}};function Gl(e,t,o){return(e?[...o.filter(i=>Xe(i)===e),...o.filter(i=>Xe(i)!==e)]:o.filter(i=>sr(i)===i)).filter(i=>e?Xe(i)===e||(t?ia(i)!==i:!1):!0)}var da=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,i;let{rects:s,middlewareData:c,placement:d,platform:u,elements:p}=t,{crossAxis:f=!1,alignment:h,allowedPlacements:m=un,autoAlignment:x=!0,...C}=Ur(e,t),A=h!==void 0||m===un?Gl(h||null,x,m):m,v=((o=c.autoPlacement)==null?void 0:o.index)||0,w=A[v];if(w==null)return{};if(d!==w)return{reset:{placement:A[0]}};let N=await u.detectOverflow(t,C),E=na(w,s,await(u.isRTL==null?void 0:u.isRTL(p.floating))),T=[N[sr(w)],N[E[0]],N[E[1]]],k=[...((n=c.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:T}],$=A[v+1];if($)return{data:{index:v+1,overflows:k},reset:{placement:$}};let M=k.map(me=>{let at=Xe(me.placement);return[me.placement,at&&f?me.overflows.slice(0,2).reduce((Rl,_l)=>Rl+_l,0):me.overflows[0],me.overflows]}).sort((me,at)=>me[1]-at[1]),er=((i=M.filter(me=>me[2].slice(0,Xe(me[0])?2:3).every(at=>at<=0))[0])==null?void 0:i[0])||M[0][0];return er!==d?{data:{index:v+1,overflows:k},reset:{placement:er}}:{}}}};var ua=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:i,platform:s}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:u={fn:N=>{let{x:E,y:T}=N;return{x:E,y:T}}},...p}=Ur(e,t),f={x:o,y:n},h=await s.detectOverflow(t,p),m=Br(i),x=pn(m),C=f[x],A=f[m],v=(N,E)=>oa(E+h[N==="y"?"top":"left"],E,E-h[N==="y"?"bottom":"right"]);c&&(C=v(x,C)),d&&(A=v(m,A));let w=u.fn({...t,[x]:C,[m]:A});return{...w,data:{x:w.x-o,y:w.y-n,enabled:{[x]:c,[m]:d}}}}}};function $r(){return typeof window<"u"}function St(e){return fa(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $e(e){var t;return(t=(fa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fa(e){return $r()?e instanceof Node||e instanceof ae(e).Node:!1}function Oe(e){return $r()?e instanceof Element||e instanceof ae(e).Element:!1}function He(e){return $r()?e instanceof HTMLElement||e instanceof ae(e).HTMLElement:!1}function pa(e){return!$r()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}function cr(e){let{overflow:t,overflowX:o,overflowY:n,display:i}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&i!=="inline"&&i!=="contents"}function ha(e){return/^(table|td|th)$/.test(St(e))}function lr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Wl=/transform|translate|scale|rotate|perspective|filter/,Vl=/paint|layout|strict|content/,xt=e=>!!e&&e!=="none",mn;function Ut(e){let t=Oe(e)?Ae(e):e;return xt(t.transform)||xt(t.translate)||xt(t.scale)||xt(t.rotate)||xt(t.perspective)||!Hr()&&(xt(t.backdropFilter)||xt(t.filter))||Wl.test(t.willChange||"")||Vl.test(t.contain||"")}function ma(e){let t=Qe(e);for(;He(t)&&!Bt(t);){if(Ut(t))return t;if(lr(t))return null;t=Qe(t)}return null}function Hr(){return mn==null&&(mn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mn}function Bt(e){return/^(html|body|#document)$/.test(St(e))}function Ae(e){return ae(e).getComputedStyle(e)}function dr(e){return Oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qe(e){if(St(e)==="html")return e;let t=e.assignedSlot||e.parentNode||pa(e)&&e.host||$e(e);return pa(t)?t.host:t}function ya(e){let t=Qe(e);return Bt(t)?(e.ownerDocument||e).body:He(t)&&cr(t)?t:ya(t)}function Fr(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let i=ya(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),c=ae(i);if(s){let d=zr(c);return t.concat(c,c.visualViewport||[],cr(i)?i:[],d&&o?Fr(d):[])}else return t.concat(i,Fr(i,[],o))}function zr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xa(e){let t=Ae(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=He(e),s=i?e.offsetWidth:o,c=i?e.offsetHeight:n,d=ar(o)!==s||ar(n)!==c;return d&&(o=s,n=c),{width:o,height:n,$:d}}function Sa(e){return Oe(e)?e:e.contextElement}function Ft(e){let t=Sa(e);if(!He(t))return Pe(1);let o=t.getBoundingClientRect(),{width:n,height:i,$:s}=xa(t),c=(s?ar(o.width):o.width)/n,d=(s?ar(o.height):o.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}var Kl=Pe(0);function va(e){let t=ae(e);return!Hr()||!t.visualViewport?Kl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jl(e,t,o){return t===void 0&&(t=!1),!!o&&t&&o===ae(e)}function ur(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let i=e.getBoundingClientRect(),s=Sa(e),c=Pe(1);t&&(n?Oe(n)&&(c=Ft(n)):c=Ft(e));let d=jl(s,o,n)?va(s):Pe(0),u=(i.left+d.x)/c.x,p=(i.top+d.y)/c.y,f=i.width/c.x,h=i.height/c.y;if(s&&n){let m=ae(s),x=Oe(n)?ae(n):n,C=m,A=zr(C);for(;A&&x!==C;){let v=Ft(A),w=A.getBoundingClientRect(),N=Ae(A),E=w.left+(A.clientLeft+parseFloat(N.paddingLeft))*v.x,T=w.top+(A.clientTop+parseFloat(N.paddingTop))*v.y;u*=v.x,p*=v.y,f*=v.x,h*=v.y,u+=E,p+=T,C=ae(A),A=zr(C)}}return bt({width:f,height:h,x:u,y:p})}function Gr(e,t){let o=dr(e).scrollLeft;return t?t.left+o:ur($e(e)).left+o}function Ca(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-Gr(e,o),i=o.top+t.scrollTop;return{x:n,y:i}}function ql(e){let{elements:t,rect:o,offsetParent:n,strategy:i}=e,s=i==="fixed",c=$e(n),d=t?lr(t.floating):!1;if(n===c||d&&s)return o;let u={scrollLeft:0,scrollTop:0},p=Pe(1),f=Pe(0),h=He(n);if((h||!s)&&((St(n)!=="body"||cr(c))&&(u=dr(n)),h)){let x=ur(n);p=Ft(n),f.x=x.x+n.clientLeft,f.y=x.y+n.clientTop}let m=c&&!h&&!s?Ca(c,u):Pe(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-u.scrollLeft*p.x+f.x+m.x,y:o.y*p.y-u.scrollTop*p.y+f.y+m.y}}function Zl(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Yl(e){let t=dr(e),o=e.ownerDocument.body,n=Ye(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=Ye(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-t.scrollLeft+Gr(e),c=-t.scrollTop;return Ae(o).direction==="rtl"&&(s+=Ye(e.clientWidth,o.clientWidth)-n),{width:n,height:i,x:s,y:c}}var Xl=25;function Ql(e,t,o){o===void 0&&(o="viewport");let n=o==="layoutViewport",i=ae(e),s=$e(e),c=i.visualViewport,d=s.clientWidth,u=s.clientHeight,p=0,f=0;if(c){let m=!Hr()||t==="fixed";n?m||(p=-c.offsetLeft,f=-c.offsetTop):(d=c.width,u=c.height,m&&(p=c.offsetLeft,f=c.offsetTop))}if(Gr(s)<=0){let m=s.ownerDocument,x=m.body,C=getComputedStyle(x),A=m.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,v=Math.abs(s.clientWidth-x.clientWidth-A),w=getComputedStyle(s).scrollbarGutter==="stable both-edges"?v/2:v;w<=Xl&&(d-=w)}return{width:d,height:u,x:p,y:f}}function Jl(e,t){let o=ur(e,!0,t==="fixed"),n=o.top+e.clientTop,i=o.left+e.clientLeft,s=Ft(e),c=e.clientWidth*s.x,d=e.clientHeight*s.y,u=i*s.x,p=n*s.y;return{width:c,height:d,x:u,y:p}}function ga(e,t,o){let n;if(t==="viewport"||t==="layoutViewport")n=Ql(e,o,t);else if(t==="document")n=Yl($e(e));else if(Oe(t))n=Jl(t,o);else{let i=va(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return bt(n)}function ed(e,t){let o=t.get(e);if(o)return o;let n=Fr(e,[],!1).filter(d=>Oe(d)&&St(d)!=="body"),i=null,s=Ae(e).position==="fixed",c=s?Qe(e):e;for(;Oe(c)&&!Bt(c);){let d=Ae(c),u=Ut(c),p=i?i.position:s?"fixed":"";!u&&(p==="fixed"||p==="absolute"&&d.position==="static")?n=n.filter(h=>h!==c):i=d,c=Qe(c)}return t.set(e,n),n}function td(e){let{element:t,boundary:o,rootBoundary:n,strategy:i}=e,c=[...o==="clippingAncestors"?lr(t)?[]:ed(t,this._c):[].concat(o),n],d=ga(t,c[0],i),u=d.top,p=d.right,f=d.bottom,h=d.left;for(let m=1;m<c.length;m++){let x=ga(t,c[m],i);u=Ye(x.top,u),p=ir(x.right,p),f=ir(x.bottom,f),h=Ye(x.left,h)}return{width:p-h,height:f-u,x:h,y:u}}function rd(e){let{width:t,height:o}=xa(e);return{width:t,height:o}}function od(e,t,o){let n=He(t),i=$e(t),s=o==="fixed",c=ur(e,!0,s,t),d={scrollLeft:0,scrollTop:0},u=Pe(0);if((n||!s)&&((St(t)!=="body"||cr(i))&&(d=dr(t)),n)){let m=ur(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}!n&&i&&(u.x=Gr(i));let p=i&&!n&&!s?Ca(i,d):Pe(0),f=c.left+d.scrollLeft-u.x-p.x,h=c.top+d.scrollTop-u.y-p.y;return{x:f,y:h,width:c.width,height:c.height}}function yn(e){return Ae(e).position==="static"}function ba(e,t){if(!He(e)||Ae(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return $e(e)===o&&(o=o.ownerDocument.body),o}function Ea(e,t){let o=ae(e);if(lr(e))return o;if(!He(e)){let i=Qe(e);for(;i&&!Bt(i);){if(Oe(i)&&!yn(i))return i;i=Qe(i)}return o}let n=ba(e,t);for(;n&&ha(n)&&yn(n);)n=ba(n,t);return n&&Bt(n)&&yn(n)&&!Ut(n)?o:n||ma(e)||o}var nd=async function(e){let t=this.getOffsetParent||Ea,o=this.getDimensions,n=await o(e.floating);return{reference:od(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function id(e){return Ae(e).direction==="rtl"}var Wr={convertOffsetParentRelativeRectToViewportRelativeRect:ql,getDocumentElement:$e,getClippingRect:td,getOffsetParent:Ea,getElementRects:nd,getClientRects:Zl,getDimensions:rd,getScale:Ft,isElement:Oe,isRTL:id};var Oa=da,Aa=ua;var wa=(e,t,o)=>{let n=new Map,i=o??{},s={...Wr,...i.platform,_c:n};return la(e,t,{...i,platform:s})};function Ra(e){return ad(e)}function gn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function ad(e){for(let t=e;t;t=gn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=gn(e);t;t=gn(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||Ut(o)||t.tagName==="BODY"))return t}return null}async function _a(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},wa(e,t,{strategy:n.strategy,platform:{...Wr,getOffsetParent:i=>Wr.getOffsetParent(i,Ra)},middleware:[Aa({crossAxis:!0}),Oa({allowedPlacements:[n.placement]})]})}var qt=y(O());var Fn=y(j());var Ta=y(j(),1);var bn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},sd=e=>({fromAttribute:t=>{if(t==null)return pr(e);try{return JSON.parse(t)}catch{return pr(e)}},toAttribute:t=>JSON.stringify(t)});function La(e,t){return(0,Ta.property)({type:Object,converter:sd(e),hasChanged:fr,...t??{}})}function cd(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!$t(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(!$t(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=c=>Object.keys(c).filter(d=>c[d]!=null),s=i(e);if(o=s.length,o!==i(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=o;n--!==0;){let c=s[n];if(!$t(e[c],t[c]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function $t(e,t){try{return cd(e,t)}catch{return!1}}function fr(e,t){return!$t(e,t)}function pr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Vr(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let i=t(n);return i[e]=!0,i}}var ka=y(j(),1);var xn=e=>{let t=e??{};return(o,n)=>{var i;let s={hasChanged:fr,attribute:!1,...t};(0,ka.property)(s)(o,n);let c=o.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(d=>d[n]),store:t.store})}};var Kr=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var vt=y(j(),1);var jr=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let c of n)try{await c()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Na=y(F(),1);var qr=globalThis,ld=qr.ShadowRoot&&(qr.ShadyCSS===void 0||qr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Ia=(e,t)=>{if(ld)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),i=qr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,e.appendChild(n)}};var Zr=class extends Na.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Ia(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){bn(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function Pa(e,t,...o){var n;let i=e.querySelector(t);for(let s of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var zt=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Ba,Da=Symbol("constructorPrototype"),Ma=Symbol("constructorName"),Fa=Symbol("exportpartsDebouncer"),Ua=Symbol("dynamicDependenciesLoaded"),Ht=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Ht.eventName="exportparts-updated";var De=class extends Zr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ba]=new jr(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Fa].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Ma]=this.constructor.name,this[Da]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ma]&&Object.setPrototypeOf(this,this[Da])}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 o=this.constructor;o[Ua]||(o[Ua]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Ht.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Ht.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 Ht)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];o=Pa(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var o,n,i,s,c,d;let u=m=>m!=null&&m.trim().length>0,p=t.filter(u).map(m=>m.trim());if(p.length===0){this.exportparts=void 0;return}let f=new Set;for(let m of(s=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&s!==void 0?s:[]){let x=(c=(n=m.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&c!==void 0?c:[],C=(d=(i=m.getAttribute("exportparts"))===null||i===void 0?void 0:i.split(",").map(v=>v.split(":")[1]))!==null&&d!==void 0?d:[],A=[...x,...C].filter(u).map(v=>v.trim());for(let v of A)f.add(v)}if(f.size===0){this.exportparts=void 0;return}let h=[...f.values()].flatMap(m=>p.map(x=>`${m}:${x}--${m}`));this.exportparts=[...this.part,...h].join(", ")}};Ba=Fa;zt([(0,vt.property)()],De.prototype,"exportpartsPrefix",void 0);zt([La([])],De.prototype,"exportpartsPrefixes",void 0);zt([(0,vt.property)({reflect:!0})],De.prototype,"exportparts",void 0);zt([(0,vt.property)()],De.prototype,"customStylesheet",void 0);zt([(0,vt.property)()],De.prototype,"elementToFocus",void 0);zt([(0,vt.state)()],De.prototype,"useAdoptedStyleSheets",void 0);function Yr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var hr=Symbol("internalReduxEventsUnsubscribers"),Je=Symbol("internalStoresUnsubscribers"),Ct=Symbol("internalStores"),dd=Vr(Symbol("withRedux"),function(e){var t,o,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(c){super.willUpdate(c),[...this.reduxConstructor.reduxReactiveProperties].some(d=>c.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[Ct].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ct].values()][0]}getStore(c){return c==null?this.getUnnamedStore():this[Ct].get(c)}addStore(c,d){var u;d=(u=d??c.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Ct].set(d,c),this.subscribeToStore(d,c),this.updateFromStores()}removeStore(c){let d=typeof c=="string"?c:c.name;this.unsubscribeFromStore(d),this[Ct].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Ct].forEach((c,d)=>this.subscribeToStore(d,c)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((c,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(c.store);p&&(c.store?this[Je].has(c.store):this[Je].size>0)&&(this[d]=c.selector(p.getState(),this))}})}subscribeToStore(c,d){var u;this[Je].set(c,d.subscribe(()=>this.updateFromStores())),this[hr].set(c,[]),Yr(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,f)=>{if(typeof this[f]=="function"&&(!p.store||d.name===p.store)){let h=m=>this[f](m);d.addEventListener(p.eventName,h),this[hr].get(c).push(()=>d.removeEventListener(p.eventName,h))}})),this.onStoreAvailable(c)}unsubscribeFromStores(){this[Je].forEach((c,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(c){var d;this[Je].has(c)&&this[Je].get(c)(),this[Je].delete(c),(d=this[hr].get(c))===null||d===void 0||d.forEach(u=>u()),this[hr].delete(c)}onStoreAvailable(c){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Je,o=Ct,n=hr,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),$a=class extends dd(De){};function Z(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 ud=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ha=ud,Sn=()=>Math.random().toString(36).substring(7).split("").join("."),pd={INIT:`@@redux/INIT${Sn()}`,REPLACE:`@@redux/REPLACE${Sn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Sn()}`},Xr=pd;function Qr(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 vn(e,t,o){if(typeof e!="function")throw new Error(Z(2));if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Z(1));return o(vn)(e,t)}let n=e,i=t,s=new Map,c=s,d=0,u=!1;function p(){c===s&&(c=new Map,s.forEach((v,w)=>{c.set(w,v)}))}function f(){if(u)throw new Error(Z(3));return i}function h(v){if(typeof v!="function")throw new Error(Z(4));if(u)throw new Error(Z(5));let w=!0;p();let N=d++;return c.set(N,v),function(){if(w){if(u)throw new Error(Z(6));w=!1,p(),c.delete(N),s=null}}}function m(v){if(!Qr(v))throw new Error(Z(7));if(typeof v.type>"u")throw new Error(Z(8));if(typeof v.type!="string")throw new Error(Z(17));if(u)throw new Error(Z(9));try{u=!0,i=n(i,v)}finally{u=!1}return(s=c).forEach(N=>{N()}),v}function x(v){if(typeof v!="function")throw new Error(Z(10));n=v,m({type:Xr.REPLACE})}function C(){let v=h;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(Z(11));function N(){let T=w;T.next&&T.next(f())}return N(),{unsubscribe:v(N)}},[Ha](){return this}}}return m({type:Xr.INIT}),{dispatch:m,subscribe:h,getState:f,replaceReducer:x,[Ha]:C}}function fd(e){Object.keys(e).forEach(t=>{let o=e[t];if(typeof o(void 0,{type:Xr.INIT})>"u")throw new Error(Z(12));if(typeof o(void 0,{type:Xr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Z(13))})}function za(e){let t=Object.keys(e),o={};for(let c=0;c<t.length;c++){let d=t[c];typeof e[d]=="function"&&(o[d]=e[d])}let n=Object.keys(o),i,s;try{fd(o)}catch(c){s=c}return function(d={},u){if(s)throw s;let p=!1,f={};for(let h=0;h<n.length;h++){let m=n[h],x=o[m],C=d[m],A=x(C,u);if(typeof A>"u"){let v=u&&u.type;throw new Error(Z(14))}f[m]=A,p=p||A!==C}return p=p||n.length!==Object.keys(d).length,p?f:d}}function mr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,o)=>(...n)=>t(o(...n)))}function Ga(...e){return t=>(o,n)=>{let i=t(o,n),s=()=>{throw new Error(Z(15))},c={getState:i.getState,dispatch:(u,...p)=>s(u,...p)},d=e.map(u=>u(c));return s=mr(...d)(i.dispatch),{...i,dispatch:s}}}function Wa(e){return Qr(e)&&"type"in e&&typeof e.type=="string"}var Ja=Symbol.for("immer-nothing"),Va=Symbol.for("immer-draftable"),J=Symbol.for("immer-state");function we(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var pe=Object,Wt=pe.getPrototypeOf,ro="constructor",co="prototype",An="configurable",oo="enumerable",eo="writable",yr="value",Me=e=>!!e&&!!e[J];function fe(e){return e?es(e)||uo(e)||!!e[Va]||!!e[ro]?.[Va]||po(e)||fo(e):!1}var hd=pe[co][ro].toString(),Ka=new WeakMap;function es(e){if(!e||!Nn(e))return!1;let t=Wt(e);if(t===null||t===pe[co])return!0;let o=pe.hasOwnProperty.call(t,ro)&&t[ro];if(o===Object)return!0;if(!Gt(o))return!1;let n=Ka.get(o);return n===void 0&&(n=Function.toString.call(o),Ka.set(o,n)),n===hd}function lo(e,t,o=!0){xr(e)===0?(o?Reflect.ownKeys(e):pe.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function xr(e){let t=e[J];return t?t.type_:uo(e)?1:po(e)?2:fo(e)?3:0}var Cn=(e,t,o=xr(e))=>o===2?e.has(t):pe[co].hasOwnProperty.call(e,t),wn=(e,t,o=xr(e))=>o===2?e.get(t):e[t],no=(e,t,o,n=xr(e))=>{n===2?e.set(t,o):n===3?e.add(o):e[t]=o};function md(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var uo=Array.isArray,po=e=>e instanceof Map,fo=e=>e instanceof Set,Nn=e=>typeof e=="object",Gt=e=>typeof e=="function",En=e=>typeof e=="boolean";function yd(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var ze=e=>e.copy_||e.base_;var Pn=e=>e.modified_?e.copy_:e.base_;function Rn(e,t){if(po(e))return new Map(e);if(fo(e))return new Set(e);if(uo(e))return Array[co].slice.call(e);let o=es(e);if(t===!0||t==="class_only"&&!o){let n=pe.getOwnPropertyDescriptors(e);delete n[J];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){let c=i[s],d=n[c];d[eo]===!1&&(d[eo]=!0,d[An]=!0),(d.get||d.set)&&(n[c]={[An]:!0,[eo]:!0,[oo]:d[oo],[yr]:e[c]})}return pe.create(Wt(e),n)}else{let n=Wt(e);if(n!==null&&o)return{...e};let i=pe.create(n);return pe.assign(i,e)}}function Dn(e,t=!1){return ho(e)||Me(e)||!fe(e)||(xr(e)>1&&pe.defineProperties(e,{set:Jr,add:Jr,clear:Jr,delete:Jr}),pe.freeze(e),t&&lo(e,(o,n)=>{Dn(n,!0)},!1)),e}function gd(){we(2)}var Jr={[yr]:gd};function ho(e){return e===null||!Nn(e)?!0:pe.isFrozen(e)}var io="MapSet",_n="Patches",ja="ArrayMethods",ts={};function Et(e){let t=ts[e];return t||we(0,e),t}var qa=e=>!!ts[e];var gr,rs=()=>gr,bd=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:qa(io)?Et(io):void 0,arrayMethodsPlugin_:qa(ja)?Et(ja):void 0});function Za(e,t){t&&(e.patchPlugin_=Et(_n),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Tn(e){Ln(e),e.drafts_.forEach(xd),e.drafts_=null}function Ln(e){e===gr&&(gr=e.parent_)}var Ya=e=>gr=bd(gr,e);function xd(e){let t=e[J];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Xa(e,t){t.unfinalizedDrafts_=t.drafts_.length;let o=t.drafts_[0];if(e!==void 0&&e!==o){o[J].modified_&&(Tn(t),we(4)),fe(e)&&(e=Qa(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(o[J].base_,e,t)}else e=Qa(t,o);return Sd(t,e,!0),Tn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ja?e:void 0}function Qa(e,t){if(ho(t))return t;let o=t[J];if(!o)return ao(t,e.handledSet_,e);if(!mo(o,e))return t;if(!o.modified_)return o.base_;if(!o.finalized_){let{callbacks_:n}=o;if(n)for(;n.length>0;)n.pop()(e);is(o,e)}return o.copy_}function Sd(e,t,o=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Dn(t,o)}function os(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var mo=(e,t)=>e.scope_===t,vd=[];function ns(e,t,o,n){let i=ze(e),s=e.type_;if(n!==void 0&&wn(i,n,s)===t){no(i,n,o,s);return}if(!e.draftLocations_){let d=e.draftLocations_=new Map;lo(i,(u,p)=>{if(Me(p)){let f=d.get(p)||[];f.push(u),d.set(p,f)}})}let c=e.draftLocations_.get(t)??vd;for(let d of c)no(i,d,o,s)}function Cd(e,t,o){e.callbacks_.push(function(i){let s=t;if(!s||!mo(s,i))return;i.mapSetPlugin_?.fixSetContents(s);let c=Pn(s);ns(e,s.draft_??s,c,o),is(s,i)})}function is(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 i=n.getPath(e);i&&n.generatePatches_(e,i,t)}os(e)}}function Ed(e,t,o){let{scope_:n}=e;if(Me(o)){let i=o[J];mo(i,n)&&i.callbacks_.push(function(){to(e);let c=Pn(i);ns(e,o,c,t)})}else fe(o)&&e.callbacks_.push(function(){let s=ze(e);e.type_===3?s.has(o)&&ao(o,n.handledSet_,n):wn(s,t,e.type_)===o&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ao(wn(e.copy_,t,e.type_),n.handledSet_,n)})}function ao(e,t,o){return!o.immer_.autoFreeze_&&o.unfinalizedDrafts_<1||Me(e)||t.has(e)||!fe(e)||ho(e)||(t.add(e),lo(e,(n,i)=>{if(Me(i)){let s=i[J];if(mo(s,o)){let c=Pn(s);no(e,n,c,e.type_),os(s)}}else fe(i)&&ao(i,t,o)})),e}function Od(e,t){let o=uo(e),n={type_:o?1:0,scope_:t?t.scope_:rs(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,s=so;o&&(i=[n],s=br);let{revoke:c,proxy:d}=Proxy.revocable(i,s);return n.draft_=d,n.revoke_=c,[d,n]}var so={get(e,t){if(t===J)return e;let o=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&o?.isArrayOperationMethod(t))return o.createMethodInterceptor(e,t);let i=ze(e);if(!Cn(i,t,e.type_))return wd(e,i,t);let s=i[t];if(e.finalized_||!fe(s)||n&&e.operationMethod&&o?.isMutatingArrayMethod(e.operationMethod)&&yd(t))return s;if(s===On(e.base_,t)||Ad(e,t,s)){to(e);let c=e.type_===1?+t:t,d=In(e.scope_,s,e,c);return e.copy_[c]=d}return s},has(e,t){return t in ze(e)},ownKeys(e){return Reflect.ownKeys(ze(e))},set(e,t,o){let n=as(ze(e),t);if(n?.set)return n.set.call(e.draft_,o),!0;if(!e.modified_){let i=On(ze(e),t),s=i?.[J];if(s&&s.base_===o)return e.copy_[t]=o,e.assigned_.set(t,!1),!0;if(md(o,i)&&(o!==void 0||Cn(e.base_,t,e.type_)))return!0;to(e),kn(e)}return e.copy_[t]===o&&(o!==void 0||Cn(e.copy_,t,e.type_))||Number.isNaN(o)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=o,e.assigned_.set(t,!0),Ed(e,t,o)),!0},deleteProperty(e,t){return to(e),On(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),kn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let o=ze(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{[eo]:!0,[An]:e.type_!==1||t!=="length",[oo]:n[oo],[yr]:o[t]}},defineProperty(){we(11)},getPrototypeOf(e){return Wt(e.base_)},setPrototypeOf(){we(12)}},br={};for(let e in so){let t=so[e];br[e]=function(){let o=arguments;return o[0]=o[0][0],t.apply(this,o)}}br.deleteProperty=function(e,t){return br.set.call(this,e,t,void 0)};br.set=function(e,t,o){return so.set.call(this,e[0],t,o,e[0])};function On(e,t){let o=e[J];return(o?ze(o):e)[t]}function Ad(e,t,o){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!fe(o)||o[J]?!1:e.baseRefs_.has(o)}function wd(e,t,o){let n=as(t,o);return n?yr in n?n[yr]:n.get?.call(e.draft_):void 0}function as(e,t){if(!(t in e))return;let o=Wt(e);for(;o;){let n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Wt(o)}}function kn(e){e.modified_||(e.modified_=!0,e.parent_&&kn(e.parent_))}function to(e){e.copy_||(e.assigned_=new Map,e.copy_=Rn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Rd=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,o,n)=>{if(Gt(t)&&!Gt(o)){let s=o;o=t;let c=this;return function(u=s,...p){return c.produce(u,f=>o.call(this,f,...p))}}Gt(o)||we(6),n!==void 0&&!Gt(n)&&we(7);let i;if(fe(t)){let s=Ya(this),c=In(s,t,void 0),d=!0;try{i=o(c),d=!1}finally{d?Tn(s):Ln(s)}return Za(s,n),Xa(i,s)}else if(!t||!Nn(t)){if(i=o(t),i===void 0&&(i=t),i===Ja&&(i=void 0),this.autoFreeze_&&Dn(i,!0),n){let s=[],c=[];Et(_n).generateReplacementPatches_(t,i,{patches_:s,inversePatches_:c}),n(s,c)}return i}else we(1,t)},this.produceWithPatches=(t,o)=>{if(Gt(t))return(c,...d)=>this.produceWithPatches(c,u=>t(u,...d));let n,i;return[this.produce(t,o,(c,d)=>{n=c,i=d}),n,i]},En(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),En(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),En(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){fe(e)||we(8),Me(e)&&(e=ss(e));let t=Ya(this),o=In(t,e,void 0);return o[J].isManual_=!0,Ln(t),o}finishDraft(e,t){let o=e&&e[J];(!o||!o.isManual_)&&we(9);let{scope_:n}=o;return Za(n,t),Xa(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 o;for(o=t.length-1;o>=0;o--){let i=t[o];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}o>-1&&(t=t.slice(o+1));let n=Et(_n).applyPatches_;return Me(e)?n(e,t):this.produce(e,i=>n(i,t))}};function In(e,t,o,n){let[i,s]=po(t)?Et(io).proxyMap_(t,o):fo(t)?Et(io).proxySet_(t,o):Od(t,o);return(o?.scope_??rs()).drafts_.push(i),s.callbacks_=o?.callbacks_??[],s.key_=n,o&&n!==void 0?Cd(o,s,n):s.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:p}=u;s.modified_&&p&&p.generatePatches_(s,[],u)}),i}function ss(e){return Me(e)||we(10,e),cs(e)}function cs(e){if(!fe(e)||ho(e))return e;let t=e[J],o,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,o=Rn(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else o=Rn(e,!0);return lo(o,(i,s)=>{no(o,i,cs(s))},n),t&&(t.finalized_=!1),o}var _d=globalThis.Iterator,gg=typeof _d?.from=="function";var Td=new Rd,Mn=Td.produce;function ls(e){return({dispatch:o,getState:n})=>i=>s=>typeof s=="function"?s(o,n,e):i(s)}var ds=ls(),us=ls;var Ld=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?mr:mr.apply(null,arguments)},Og=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},kd=e=>e&&typeof e.match=="function";function et(e,t){function o(...n){if(t){let i=t(...n);if(!i)throw new Error(Ge(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return o.toString=()=>`${e}`,o.type=e,o.match=n=>Wa(n)&&n.type===e,o}var ys=class Sr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Sr.prototype)}static get[Symbol.species](){return Sr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Sr(...t[0].concat(this)):new Sr(...t.concat(this))}};function ps(e){return fe(e)?Mn(e,()=>{}):e}function yo(e,t,o){return e.has(t)?e.get(t):e.set(t,o(t)).get(t)}function Id(e){return typeof e=="boolean"}var Nd=()=>function(t){let{thunk:o=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{},c=new ys;return o&&(Id(o)?c.push(ds):c.push(us(o.extraArgument))),c},Pd="RTK_autoBatch";var fs=e=>t=>{setTimeout(t,e)},Dd=(e,t)=>o=>{let n=!1,i=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(c),o())},s=e(i),c=setTimeout(i,t)},Md=(e={type:"raf"})=>t=>(...o)=>{let n=t(...o),i=!0,s=!1,c=!1,d=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Dd(window.requestAnimationFrame,100):fs(10):e.type==="callback"?e.queueNotification:fs(e.timeout),p=()=>{c=!1,s&&(s=!1,d.forEach(f=>f()))};return Object.assign({},n,{subscribe(f){let h=()=>i&&f(),m=n.subscribe(h);return d.add(f),()=>{m(),d.delete(f)}},dispatch(f){try{return i=!f?.meta?.[Pd],s=!i,s&&(c||(c=!0,u(p))),n.dispatch(f)}finally{i=!0}}})},Ud=e=>function(o){let{autoBatch:n=!0}=o??{},i=new ys(e);return n&&i.push(Md(typeof n=="object"?n:void 0)),i};function gs(e){let t=Nd(),{reducer:o=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:s=!0,preloadedState:c=void 0,enhancers:d=void 0}=e||{},u;if(typeof o=="function")u=o;else if(Qr(o))u=za(o);else throw new Error(Ge(1));let p;typeof n=="function"?p=n(t):p=t();let f=mr;i&&(f=Ld({trace:!1,...typeof i=="object"&&i}));let h=Ga(...p),m=Ud(h),x=typeof d=="function"?d(m):m(),C=f(...x);return vn(u,c,C)}function bs(e){let t={},o=[],n,i={addCase(s,c){let d=typeof s=="string"?s:s.type;if(!d)throw new Error(Ge(28));if(d in t)throw new Error(Ge(29));return t[d]=c,i},addAsyncThunk(s,c){return c.pending&&(t[s.pending.type]=c.pending),c.rejected&&(t[s.rejected.type]=c.rejected),c.fulfilled&&(t[s.fulfilled.type]=c.fulfilled),c.settled&&o.push({matcher:s.settled,reducer:c.settled}),i},addMatcher(s,c){return o.push({matcher:s,reducer:c}),i},addDefaultCase(s){return n=s,i}};return e(i),[t,o,n]}function Bd(e){return typeof e=="function"}function Fd(e,t){let[o,n,i]=bs(t),s;if(Bd(e))s=()=>ps(e());else{let d=ps(e);s=()=>d}function c(d=s(),u){let p=[o[u.type],...n.filter(({matcher:f})=>f(u)).map(({reducer:f})=>f)];return p.filter(f=>!!f).length===0&&(p=[i]),p.reduce((f,h)=>{if(h)if(Me(f)){let x=h(f,u);return x===void 0?f:x}else{if(fe(f))return Mn(f,m=>h(m,u));{let m=h(f,u);if(m===void 0){if(f===null)return f;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return f},d)}return c.getInitialState=s,c}var $d=(e,t)=>kd(e)?e.match(t):e(t);function Hd(...e){return t=>e.some(o=>$d(o,t))}var zd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Gd=(e=21)=>{let t="",o=e;for(;o--;)t+=zd[Math.random()*64|0];return t},Wd=["name","message","stack","code"],Un=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},hs=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Vd=e=>{if(typeof e=="object"&&e!==null){let t={};for(let o of Wd)typeof e[o]=="string"&&(t[o]=e[o]);return t}return{message:String(e)}},ms="External signal was aborted",Kd=(()=>{function e(t,o,n){let i=et(t+"/fulfilled",(u,p,f,h)=>({payload:u,meta:{...h||{},arg:f,requestId:p,requestStatus:"fulfilled"}})),s=et(t+"/pending",(u,p,f)=>({payload:void 0,meta:{...f||{},arg:p,requestId:u,requestStatus:"pending"}})),c=et(t+"/rejected",(u,p,f,h,m)=>({payload:h,error:(n&&n.serializeError||Vd)(u||"Rejected"),meta:{...m||{},arg:f,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function d(u,{signal:p}={}){return(f,h,m)=>{let x=n?.idGenerator?n.idGenerator(u):Gd(),C=new AbortController,A,v;function w(E){v=E,C.abort()}p&&(p.aborted?w(ms):p.addEventListener("abort",()=>w(ms),{once:!0}));let N=(async function(){let E;try{let k=n?.condition?.(u,{getState:h,extra:m});if(qd(k)&&(k=await k),k===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let $=new Promise((M,H)=>{A=()=>{H({name:"AbortError",message:v||"Aborted"})},C.signal.addEventListener("abort",A,{once:!0})});f(s(x,u,n?.getPendingMeta?.({requestId:x,arg:u},{getState:h,extra:m}))),E=await Promise.race([$,Promise.resolve(o(u,{dispatch:f,getState:h,extra:m,requestId:x,signal:C.signal,abort:w,rejectWithValue:((M,H)=>new Un(M,H)),fulfillWithValue:((M,H)=>new hs(M,H))})).then(M=>{if(M instanceof Un)throw M;return M instanceof hs?i(M.payload,x,u,M.meta):i(M,x,u)})])}catch(k){E=k instanceof Un?c(null,x,u,k.payload,k.meta):c(k,x,u)}finally{A&&C.signal.removeEventListener("abort",A)}return n&&!n.dispatchConditionRejection&&c.match(E)&&E.meta.condition||f(E),E})();return Object.assign(N,{abort:w,requestId:x,arg:u,unwrap(){return N.then(jd)}})}}return Object.assign(d,{pending:s,rejected:c,fulfilled:i,settled:Hd(c,i),typePrefix:t})}return e.withTypes=()=>e,e})();function jd(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function qd(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var xs=Symbol.for("rtk-slice-createasyncthunk"),wg={[xs]:Kd};function Zd(e,t){return`${e}/${t}`}function Yd({creators:e}={}){let t=e?.asyncThunk?.[xs];return function(n){let{name:i,reducerPath:s=i}=n;if(!i)throw new Error(Ge(11));typeof process<"u";let c=(typeof n.reducers=="function"?n.reducers(Qd()):n.reducers)||{},d=Object.keys(c),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(E,T){let k=typeof E=="string"?E:E.type;if(!k)throw new Error(Ge(12));if(k in u.sliceCaseReducersByType)throw new Error(Ge(13));return u.sliceCaseReducersByType[k]=T,p},addMatcher(E,T){return u.sliceMatchers.push({matcher:E,reducer:T}),p},exposeAction(E,T){return u.actionCreators[E]=T,p},exposeCaseReducer(E,T){return u.sliceCaseReducersByName[E]=T,p}};d.forEach(E=>{let T=c[E],k={reducerName:E,type:Zd(i,E),createNotation:typeof n.reducers=="function"};eu(T)?ru(k,T,p,t):Jd(k,T,p)});function f(){let[E={},T=[],k=void 0]=typeof n.extraReducers=="function"?bs(n.extraReducers):[n.extraReducers],$={...E,...u.sliceCaseReducersByType};return Fd(n.initialState,M=>{for(let H in $)M.addCase(H,$[H]);for(let H of u.sliceMatchers)M.addMatcher(H.matcher,H.reducer);for(let H of T)M.addMatcher(H.matcher,H.reducer);k&&M.addDefaultCase(k)})}let h=E=>E,m=new Map,x=new WeakMap,C;function A(E,T){return C||(C=f()),C(E,T)}function v(){return C||(C=f()),C.getInitialState()}function w(E,T=!1){function k(M){let H=M[E];return typeof H>"u"&&T&&(H=yo(x,k,v)),H}function $(M=h){let H=yo(m,T,()=>new WeakMap);return yo(H,M,()=>{let er={};for(let[me,at]of Object.entries(n.selectors??{}))er[me]=Xd(at,M,()=>yo(x,M,v),T);return er})}return{reducerPath:E,getSelectors:$,get selectors(){return $(k)},selectSlice:k}}let N={name:i,reducer:A,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...w(s),injectInto(E,{reducerPath:T,...k}={}){let $=T??s;return E.inject({reducerPath:$,reducer:A},k),{...N,...w($,!0)}}};return N}}function Xd(e,t,o,n){function i(s,...c){let d=t(s);return typeof d>"u"&&n&&(d=o()),e(d,...c)}return i.unwrapped=e,i}var Ss=Yd();function Qd(){function e(t,o){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...o}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...o){return t(...o)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,o){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:o}},asyncThunk:e}}function Jd({type:e,reducerName:t,createNotation:o},n,i){let s,c;if("reducer"in n){if(o&&!tu(n))throw new Error(Ge(17));s=n.reducer,c=n.prepare}else s=n;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,c?et(e,c):et(e))}function eu(e){return e._reducerDefinitionType==="asyncThunk"}function tu(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ru({type:e,reducerName:t},o,n,i){if(!i)throw new Error(Ge(18));let{payloadCreator:s,fulfilled:c,pending:d,rejected:u,settled:p,options:f}=o,h=i(e,s,f);n.exposeAction(t,h),c&&n.addCase(h.fulfilled,c),d&&n.addCase(h.pending,d),u&&n.addCase(h.rejected,u),p&&n.addMatcher(h.settled,p),n.exposeCaseReducer(t,{fulfilled:c||go,pending:d||go,rejected:u||go,settled:p||go})}function go(){}var vs="listener",Cs="completed",Es="cancelled",Rg=`task-${Es}`,_g=`task-${Cs}`,Tg=`${vs}-${Es}`,Lg=`${vs}-${Cs}`;var{assign:Os}=Object;var Bn="listenerMiddleware";var ou=Os(et(`${Bn}/add`),{withTypes:()=>ou}),kg=et(`${Bn}/removeAll`),nu=Os(et(`${Bn}/remove`),{withTypes:()=>nu});function Ge(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 iu=Vr(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),bo=class extends iu(Object){};window.ftReduxStores||(window.ftReduxStores={});var As=class e extends bo{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Yr(s))return s;if(i==null)return;let c=Ss({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=gs({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let f=pr(c.getInitialState());for(let h of p.keeping)f[h]=(u??f)[h];return f}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return c.reducer(u,p)}});return window.ftReduxStores[i.name]=new e(c,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Kr,this.injectInto=(s,c)=>this.reduxSlice.injectInto(s,c),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,c,d)=>{let u=c,p=s[u];return p?(...f)=>{let h=p(...f.map(i));return this.reduxStore.dispatch(h),h}:f=>{let h=u,m=this.getState()[h];$t(m,f)||this.setState({[h]:i(f)})}}}),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 xo=class{static format(t,o,n,i,s){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,o,n,i,!!s)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,i,s){let c=typeof t=="string"?new Date(t):t,d=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(c),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(c);return s?u:i?`${d} ${u}`:d}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var So=y(O()),au="ft-app-info",tt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};tt.eventName="authentication-change";var vr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};vr.eventName="ui-locale-changed";var su={session:(e,t)=>{(0,So.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>R.dispatchEvent(new tt(t.payload)),0))}},R=So.FtReduxStore.get({name:au,reducers:su,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var ws=y(O()),vo=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},sb=(0,ws.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(R)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(d=>d.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?d=>xo.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return vo([(0,Fn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),vo([(0,Fn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),vo([xn({store:R.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),vo([xn({store:R.name})],t.prototype,"uiLocale",void 0),t});var Rs;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Rs||(Rs={}));var _s;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(_s||(_s={}));var Ts;(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"})(Ts||(Ts={}));var Ls;(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"})(Ls||(Ls={}));var ks;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(ks||(ks={}));var Is;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Is||(Is={}));var Ns;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Ns||(Ns={}));var Ps;(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"})(Ps||(Ps={}));var Ds;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Ds||(Ds={}));var Ms;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Ms||(Ms={}));var Us;(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"})(Us||(Us={}));var Bs;(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"})(Bs||(Bs={}));var Fs;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Fs||(Fs={}));var $s;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})($s||($s={}));var Hs;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Hs||(Hs={}));var zs;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(zs||(zs={}));var Gs;(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"})(Gs||(Gs={}));var $n;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})($n||($n={}));var Ws;(function(e){e.ASC="ASC",e.DESC="DESC"})(Ws||(Ws={}));var Vs;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Vs||(Vs={}));var Hn;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Hn||(Hn={}));var Ks;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ks||(Ks={}));var Co;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Co||(Co={}));var js;(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"})(js||(js={}));var qs;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(qs||(qs={}));var Zs;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Zs||(Zs={}));var zn;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(zn||(zn={}));var Ys;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ys||(Ys={}));var z;(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"})(z||(z={}));var be;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(be||(be={}));var Xs;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Xs||(Xs={}));var Qs;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Qs||(Qs={}));var Js;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Js||(Js={}));var ec;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(ec||(ec={}));var tc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(tc||(tc={}));var rc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(rc||(rc={}));var oc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(oc||(oc={}));var nc;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(nc||(nc={}));var ic;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(ic||(ic={}));var ac;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(ac||(ac={}));var sc;(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"})(sc||(sc={}));var cc;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(cc||(cc={}));var cu={[z.PERSONAL_BOOK_SHARE_USER]:[z.PERSONAL_BOOK_USER],[z.HTML_EXPORT_USER]:[z.PERSONAL_BOOK_USER],[z.PDF_EXPORT_USER]:[z.PERSONAL_BOOK_USER],[z.KHUB_ADMIN]:[z.CONTENT_PUBLISHER],[z.ADMIN]:[z.KHUB_ADMIN,z.USERS_ADMIN,z.PORTAL_ADMIN,z.BEHAVIOR_DATA_USER],[z.GENERATIVE_AI_EXPORT_USER]:[z.GENERATIVE_AI_USER]};function lc(e,t){return e===t||(cu[e]??[]).some(o=>lc(o,t))}function Eo(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=>lc(n,t))}function dc(e,...t){return e==null?!1:t.some(o=>Eo(e,o))}var _o=y(O());var Gn=y(O());var Ot=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=R.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let i=R.subscribe(()=>{n=e.get(t),n&&(i(),o(n))})}})}};var Vt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ot.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ot.await()}};var se=class extends Vt{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(s,c)=>typeof c!="object"||c==null||Array.isArray(c)?c:Object.fromEntries(Object.entries(c).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Gn.CacheRegistry,this.cache=t?i.commonCache:new Gn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Oo=class extends se{async listMySearches(){let{session:t}=R.getState();return Eo(t,z.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Ao=class extends se{async listMyBookmarks(){let t=R.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var wo=class extends se{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=R.getState().session;return!!t?.sessionAuthenticated}};var Ro=class extends se{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=R.getState().session;return!!t?.sessionAuthenticated}};var lu="ft-user-assets",du={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(be).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:i}=t.payload;Vn(e,o,[...Wn(e,o),i]),uc(e,o,1,n),pc(e,i)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;Vn(e,o,Wn(e,o).map(i=>i.id===n.id?n:i)),pc(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:i}=t.payload;Vn(e,o,Wn(e,o).filter(s=>s.id!==i)),uc(e,o,-1,n)}},fc={[be.SEARCHES]:"savedSearches",[be.BOOKMARKS]:"bookmarks",[be.BOOKS]:void 0,[be.COLLECTIONS]:void 0},Wn=(e,t)=>{var o;let n=fc[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},Vn=(e,t,o)=>{let n=fc[t];n&&(e[n]=o)},uc=(e,t,o,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+o),t===be.BOOKMARKS&&n)){let s=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,s+o)}},pc=(e,t)=>{let o=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},re=_o.FtReduxStore.get({name:lu,reducers:du,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(be).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Kn=class{constructor(t=new wo,o=new Ro){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=R.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ao,this.savedSearchesService=new Oo,R.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=R.getState();(0,_o.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),re.actions.clearAssetCount(),re.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),re.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),re.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();re.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();re.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&re.getState().assetCounts.allAsset[t]!==o.count&&re.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&re.getState().assetCounts.bookmarkByMap[t]!==o.count&&re.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(re.getState().assetCounts.bookmarkByMap).length!==0;t===be.BOOKMARKS&&o&&re.actions.clearBookmarkCountByMap(),re.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 o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;re.actions.bookmarks(o)}}},uu=new Kn;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=uu);var jn=class{addCommand(t,o=!1){R.commands.add(t,o)}consumeCommand(t){return R.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new jn;var xe=y(O());var hc,Kt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},pu=Symbol("clearAfterUnitTest"),To=class extends(0,xe.withEventBus)(se){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[hc]=()=>{this.defaultMessages={},this.cache=new xe.CacheRegistry,this.listeners={}},this.currentUiLocale=R.getState().uiLocale,R.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=R.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,xe.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let s=t.toLowerCase(),c=this.resolveContext(s);return new xe.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},c).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof xe.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Kt({loadedContexts:t})),this.dispatchEvent(new Kt({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new Kt({loadedContexts:[t]})),this.dispatchEvent(new Kt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,xe.delay)(0).then(()=>n()).catch(()=>null)))}};hc=pu;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends To{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends To{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Cr=window.FluidTopicsI18nService,qn=window.FluidTopicsCustomI18nService;var mc=y(O()),Zn=class{highlightHtml(t,o,n){(0,mc.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Zn;var yc=y(O());var Yn=class{isDate(t){var o,n,i,s;return(s=(n=((i=(o=R.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]).find(d=>d.key===t))===null||n===void 0?void 0:n.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s,c;if(t==null)return"";try{return yc.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:R.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1,(c=o?.onlyTime)!==null&&c!==void 0?c:!1)}catch(d){throw console.error(`Date ${JSON.stringify(t)} is not valid`,d),d}}};window.FluidTopicsDateService=new Yn;var gc=y(O());var Er=class{static get(t,o){var n,i,s,c;let d=R.getState(),{lang:u,region:p}=(c=(i=(n=d.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&c!==void 0?c:{lang:"en",region:"US"};return new gc.SearchPlaceConverter(d.baseUrl,t??20,(s=d.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,o??`${u}-${p}`)}};var Xn=class{urlToSearchRequest(t){return Er.get().parse(t)}searchRequestToUrl(t){return Er.get().serialize(t)}};window.FluidTopicsUrlService=new Xn;var We=y(O());var At=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};At.eventName="before-location-change";var wt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};wt.eventName="change";var Qn=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},bc=new Qn;var Lo=class e extends We.WithEventBus{static build(){return new e(window.history,bc,()=>window.location,!1)}constructor(t,o,n,i){var s,c;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(c=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&c!==void 0?c:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&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,We.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new wt(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[s,c,d])=>{let u=new At(new URL(typeof d=="string"?d:(d??this.windowLocation()).href,window.location.origin));this.dispatchEvent(u);let p=o(),f={...p===this.currentIndex?this.currentState:void 0,...s,index:p,href:u.detail.nextLocation.href};n.apply(i,[f,c,f.href]),this.setCurrentState(f,!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 o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(At.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(At.eventName,t)}addHistoryChangeListener(t){this.addEventListener(wt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(wt.eventName,t)}currentItem(){return(0,We.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,We.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,We.deepCopy)(o.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,We.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 o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Lo.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),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var xc=y(F());var Sc=xc.css`
|
|
149
149
|
`;var Cc=y(F()),oe=y(j()),Tt=y(O());var Rt=y(O());function vc(e,t){let{authenticationRequired:o,session:n}=R.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var ko=class extends Vt{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Jn=class e extends Rt.FtStateManager{static build(t){return new e(R,t)}constructor(t,o){super(),this.store=t,this.cache=new Rt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new ko,this.cleanSessionDebouncer=new Rt.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Rt.Debouncer(500),this.apiProvider=o??(()=>Ot.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(tt.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(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 o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},o.idleTimeoutInMillis),o});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 o=await this.cache.get("availableContentLocales",()=>vc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=o.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}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,o){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:o}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new vr(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)}setNoCustomCode(t){this.store.actions.noCustomCode(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)}userHasAnyRole(...t){return dc(R.getState().session,...t)}},ei=Jn.build();var _t=class extends Event{constructor(t,o,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=o,this.callback=n,this.subscribe=i??!1}};var Or=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let o=this.pendingContextRequests.get(t.context);if(o===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=o;for(let{elementRef:i,callbackRef:s}of n){let c=i.deref(),d=s.deref();c===void 0||d===void 0||c.dispatchEvent(new _t(t.context,c,d,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let o=t.contextTarget??t.composedPath()[0],n=t.callback,i=this.pendingContextRequests.get(t.context);i===void 0&&this.pendingContextRequests.set(t.context,i={callbacks:new WeakMap,requests:[]});let s=i.callbacks.get(o);s===void 0&&i.callbacks.set(o,s=new WeakSet),s.has(n)||(s.add(n),i.requests.push({elementRef:new WeakRef(o),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 q=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},B=class extends Tt.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=ei,this.contextRoot=new Or}render(){return Cc.html`
|
|
150
150
|
<slot></slot>
|
|
151
151
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var o;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("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Cr.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")&&((o=this.stateManager)===null||o===void 0||o.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};B.elementDefinitions={};B.styles=Sc;q([(0,oe.property)()],B.prototype,"baseUrl",void 0);q([(0,oe.property)()],B.prototype,"tenantId",void 0);q([(0,oe.property)()],B.prototype,"apiIntegrationIdentifier",void 0);q([(0,oe.property)()],B.prototype,"apiIntegrationAppVersion",void 0);q([(0,oe.property)()],B.prototype,"uiLocale",void 0);q([(0,Tt.jsonProperty)(null)],B.prototype,"availableUiLocales",void 0);q([(0,Tt.jsonProperty)(null)],B.prototype,"metadataConfiguration",void 0);q([(0,oe.property)({type:Boolean})],B.prototype,"editorMode",void 0);q([(0,oe.property)({type:Boolean})],B.prototype,"noCustom",void 0);q([(0,oe.property)({type:Boolean})],B.prototype,"openExternalDocumentInNewTab",void 0);q([(0,oe.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],B.prototype,"noCustomComponent",void 0);q([(0,oe.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],B.prototype,"noCustomCode",void 0);q([(0,oe.property)({type:Boolean})],B.prototype,"withManualResources",void 0);q([(0,oe.property)({type:Boolean})],B.prototype,"navigatorOnline",void 0);q([(0,oe.property)({type:Boolean})],B.prototype,"forcedOffline",void 0);q([(0,oe.property)({type:Boolean})],B.prototype,"authenticationRequired",void 0);q([(0,Tt.jsonProperty)([])],B.prototype,"messageContexts",void 0);q([(0,Tt.jsonProperty)(void 0)],B.prototype,"session",void 0);var Oc=y(O());var Ec={"ft-app-context":B};(0,Oc.customElements)(Ec);var Ac=y(j());var ti=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[o,n]=t.split(".");return{context:o,key:n,custom:o!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},jt=new ti;var mu=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},wr=Symbol("i18nAttributes"),wc=Symbol("i18nListAttributes"),Rc=Symbol("i18nProperties"),Io=Symbol("i18nContexts"),Ar=Symbol("i18nUnsubs"),Do=(0,qt.applyMixinOnce)(Symbol("withI18n"),function(e){var t,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?qn:Cr}i18n(s){let{context:c,key:d,message:u}=s,{custom:p,args:f,argsProvider:h}=s;if(c&&d){this.hasI18nContext(c)||this.addI18nContext(c,void 0,p);let m=f??(h?h(this):[]);return this.getI18nService(p).resolveMessage(c,d,...m)}return u}async awaitI18n(s){let{context:c,custom:d}=s;return c&&await this.getI18nService(d).prepareContext(c),this.i18n(s)}customI18n(s,c){if(jt.isI18nKey(s)){let[d,u]=s.split(".");return this.i18n({custom:!0,context:d,key:u,...c})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((c,d,u)=>s.has(d)||typeof c.argsProvider=="function"),this.updateI18nProperties(c=>typeof c.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((c,d,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===s}),this.updateI18nProperties(c=>c.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var c,d;let u=this,p=(f,h,m)=>m?.context&&m.key&&s(f,h,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...f})}:m;(c=this[wr])===null||c===void 0||c.forEach((f,h)=>u[h]=p(f,h,u[h])),(d=this[wc])===null||d===void 0||d.forEach((f,h)=>{var m;return u[h]=(m=u[h])===null||m===void 0?void 0:m.map(x=>p(f,h,x))})}updateI18nProperties(s){var c;(c=this[Rc])===null||c===void 0||c.forEach((d,u)=>{s(d,u)&&(this[u]=this.i18n(d))})}addI18nMessages(s,c,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,c,d)}addI18nContext(s,c,d){let u=(typeof s=="string"?s:s.name).toLowerCase();d=typeof s=="string"?d:s.custom,this[Io].set(u,{isCustomContext:d}),this[Ar].has(u)||this[Ar].set(u,this.getI18nService(d).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(d).prepareContext(u,c)}hasI18nContext(s){return this[Io].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Io].forEach((s,c)=>this.addI18nContext(c,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ar].forEach(s=>s()),this[Ar].clear()}}return t=Io,o=Ar,mu([(0,Ac.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),No=class extends Do(qt.FtLitElement){},Po=class extends Do(qt.FtLitElementRedux){};var _c=y(O());var ri=class{fromAttribute(t){if(!t)return[];try{let o=JSON.parse(t);return Array.isArray(o)?o.map(n=>typeof n=="string"?jt.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},yu=new ri;var Tc=(e,t)=>(o,n)=>{var i;o.constructor.createProperty(n,{type:Object,hasChanged:_c.hasChanged,converter:jt,...t}),o[wr]=(i=o[wr])!==null&&i!==void 0?i:new Map,o[wr].set(n,e??{})};var Lc=y(F());var kc=Lc.css`
|
|
@@ -380,7 +380,7 @@ Also for action icons.`,a.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
380
380
|
<div class="ft-ripple--background"></div>
|
|
381
381
|
<div class="ft-ripple--effect"></div>
|
|
382
382
|
</div>
|
|
383
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var o,n;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(o=this.target)===null||o===void 0||o.removeAttribute("data-is-ft-ripple-target")):(n=this.target)===null||n===void 0||n.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,o;let n=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;n&&this.setupFor((o=this.target)!==null&&o!==void 0?o:n)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let o=(...d)=>u=>{d.forEach(p=>window.addEventListener(p,this.endPress,{once:!0})),this.startPress(u)},n=o("mouseup","contextmenu"),i=o("touchend","touchcancel"),s=d=>{["Enter"," "].includes(d.key)&&o("keyup")(d)},c={passive:!0};t.addEventListener("mouseover",this.startHover,c),t.addEventListener("mousemove",this.moveRipple,c),t.addEventListener("mouseleave",this.endHover,c),t.addEventListener("mousedown",n,c),t.addEventListener("touchstart",i,c),t.addEventListener("touchmove",this.moveRipple,c),t.addEventListener("keydown",s,c),t.addEventListener("focus",this.startFocus,c),t.addEventListener("blur",this.endFocus,c),t.addEventListener("focusin",this.startFocus,c),t.addEventListener("focusout",this.endFocus,c),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,c),t.removeEventListener("mousemove",this.moveRipple,c),t.removeEventListener("mouseleave",this.endHover,c),t.removeEventListener("mousedown",n,c),t.removeEventListener("touchstart",i,c),t.removeEventListener("touchmove",this.moveRipple,c),t.removeEventListener("keydown",s,c),t.removeEventListener("focus",this.startFocus,c),t.removeEventListener("blur",this.endFocus,c),t.removeEventListener("focusin",this.startFocus,c),t.removeEventListener("focusout",this.endFocus,c),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let o=t,n=t,i,s;return o.x!=null?{x:i,y:s}=o:n.touches!=null&&(i=n.touches[0].clientX,s=n.touches[0].clientY),{x:i,y:s}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let o of t.composedPath()){if(o===this.target)break;if("hasAttribute"in o&&o.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};P.elementDefinitions={};P.styles=jc;le([(0,X.property)({type:Boolean})],P.prototype,"primary",void 0);le([(0,X.property)({type:Boolean})],P.prototype,"secondary",void 0);le([(0,X.property)({type:Boolean})],P.prototype,"unbounded",void 0);le([(0,X.property)({type:Boolean})],P.prototype,"activated",void 0);le([(0,X.property)({type:Boolean})],P.prototype,"selected",void 0);le([(0,X.property)({type:Boolean})],P.prototype,"disabled",void 0);le([(0,X.state)()],P.prototype,"hovered",void 0);le([(0,X.state)()],P.prototype,"focused",void 0);le([(0,X.state)()],P.prototype,"pressed",void 0);le([(0,X.state)()],P.prototype,"rippling",void 0);le([(0,X.state)()],P.prototype,"originX",void 0);le([(0,X.state)()],P.prototype,"originY",void 0);le([(0,X.query)(".ft-ripple")],P.prototype,"ripple",void 0);le([(0,X.query)(".ft-ripple--effect")],P.prototype,"rippleEffect",void 0);var Xc=y(O());var Yc={"ft-ripple":P};(0,Xc.customElements)(Yc);var Vo=y(O());var Xt=y(O()),_r=y(j());var oi;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(oi||(oi={}));var rt=y(O());var gu=y(O());var Bo=class extends CustomEvent{constructor(t,o){super("ft-search-result-click",{detail:{result:t,rank:o},bubbles:!0,composed:!0})}},Fo=class extends CustomEvent{constructor(t,o){super("ft-search-result-open-context-menu",{detail:{result:t,rank:o},bubbles:!0,composed:!0})}};var $o=class e extends Event{constructor(){super(e.eventName)}};$o.eventName="search-context-clear-all-filters";var ni=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ai=class extends CustomEvent{constructor(t){super("register-ft-search-component",{bubbles:!0,composed:!0,detail:{registrationId:t}})}},Qc=Symbol("registerInterval"),ii=Symbol("registerAttempts"),bu=40,xu=(0,Xt.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var i,s,c;super.willUpdate(n),n.has("neededSearchRequests")&&((i=this.stateManager)===null||i===void 0||i.unregisterComponent(this,(
|
|
383
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var o,n;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(o=this.target)===null||o===void 0||o.removeAttribute("data-is-ft-ripple-target")):(n=this.target)===null||n===void 0||n.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,o;let n=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;n&&this.setupFor((o=this.target)!==null&&o!==void 0?o:n)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let o=(...d)=>u=>{d.forEach(p=>window.addEventListener(p,this.endPress,{once:!0})),this.startPress(u)},n=o("mouseup","contextmenu"),i=o("touchend","touchcancel"),s=d=>{["Enter"," "].includes(d.key)&&o("keyup")(d)},c={passive:!0};t.addEventListener("mouseover",this.startHover,c),t.addEventListener("mousemove",this.moveRipple,c),t.addEventListener("mouseleave",this.endHover,c),t.addEventListener("mousedown",n,c),t.addEventListener("touchstart",i,c),t.addEventListener("touchmove",this.moveRipple,c),t.addEventListener("keydown",s,c),t.addEventListener("focus",this.startFocus,c),t.addEventListener("blur",this.endFocus,c),t.addEventListener("focusin",this.startFocus,c),t.addEventListener("focusout",this.endFocus,c),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,c),t.removeEventListener("mousemove",this.moveRipple,c),t.removeEventListener("mouseleave",this.endHover,c),t.removeEventListener("mousedown",n,c),t.removeEventListener("touchstart",i,c),t.removeEventListener("touchmove",this.moveRipple,c),t.removeEventListener("keydown",s,c),t.removeEventListener("focus",this.startFocus,c),t.removeEventListener("blur",this.endFocus,c),t.removeEventListener("focusin",this.startFocus,c),t.removeEventListener("focusout",this.endFocus,c),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let o=t,n=t,i,s;return o.x!=null?{x:i,y:s}=o:n.touches!=null&&(i=n.touches[0].clientX,s=n.touches[0].clientY),{x:i,y:s}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let o of t.composedPath()){if(o===this.target)break;if("hasAttribute"in o&&o.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};P.elementDefinitions={};P.styles=jc;le([(0,X.property)({type:Boolean})],P.prototype,"primary",void 0);le([(0,X.property)({type:Boolean})],P.prototype,"secondary",void 0);le([(0,X.property)({type:Boolean})],P.prototype,"unbounded",void 0);le([(0,X.property)({type:Boolean})],P.prototype,"activated",void 0);le([(0,X.property)({type:Boolean})],P.prototype,"selected",void 0);le([(0,X.property)({type:Boolean})],P.prototype,"disabled",void 0);le([(0,X.state)()],P.prototype,"hovered",void 0);le([(0,X.state)()],P.prototype,"focused",void 0);le([(0,X.state)()],P.prototype,"pressed",void 0);le([(0,X.state)()],P.prototype,"rippling",void 0);le([(0,X.state)()],P.prototype,"originX",void 0);le([(0,X.state)()],P.prototype,"originY",void 0);le([(0,X.query)(".ft-ripple")],P.prototype,"ripple",void 0);le([(0,X.query)(".ft-ripple--effect")],P.prototype,"rippleEffect",void 0);var Xc=y(O());var Yc={"ft-ripple":P};(0,Xc.customElements)(Yc);var Vo=y(O());var Xt=y(O()),_r=y(j());var oi;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(oi||(oi={}));var rt=y(O());var gu=y(O());var Bo=class extends CustomEvent{constructor(t,o){super("ft-search-result-click",{detail:{result:t,rank:o},bubbles:!0,composed:!0})}},Fo=class extends CustomEvent{constructor(t,o){super("ft-search-result-open-context-menu",{detail:{result:t,rank:o},bubbles:!0,composed:!0})}};var $o=class e extends Event{constructor(){super(e.eventName)}};$o.eventName="search-context-clear-all-filters";var ni=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ai=class extends CustomEvent{constructor(t){super("register-ft-search-component",{bubbles:!0,composed:!0,detail:{registrationId:t}})}},Qc=Symbol("registerInterval"),ii=Symbol("registerAttempts"),bu=40,xu=(0,Xt.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var i,s,c;super.willUpdate(n),n.has("neededSearchRequests")&&((i=this.stateManager)===null||i===void 0||i.unregisterComponent(this,(c=n.get("neededSearchRequests"))!==null&&c!==void 0?c:[]),(s=this.stateManager)===null||s===void 0||s.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[ii]=0,this.tryToRegisterToContext(),this[Qc]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[ii]>bu?window.clearInterval(this[Qc]):(this[ii]++,this.dispatchEvent(new ai(this.searchRegistrationId)))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return ni([(0,_r.state)()],t.prototype,"stateManager",void 0),ni([(0,_r.state)({hasChanged:Xt.hasChanged})],t.prototype,"neededSearchRequests",void 0),ni([(0,_r.property)()],t.prototype,"searchRegistrationId",void 0),t}),Ho=class extends xu(Xt.FtLitElementRedux){};var Go=y(j()),zo=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ci=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},si=Symbol("registerInterval"),Su=(0,Vo.applyMixinOnce)(Symbol("toFtSearchResultComponent"),function(e){var t;class o extends e{constructor(){super(...arguments),this[t]=0}setResultStateManager(i){this.resultStateManager=i}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[si]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[si]):this.dispatchEvent(new ci)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return t=si,zo([(0,Go.property)({attribute:!1})],o.prototype,"cluster",void 0),zo([(0,Go.property)({attribute:!1})],o.prototype,"result",void 0),zo([(0,Vo.numberProperty)()],o.prototype,"rank",void 0),zo([(0,Go.property)({attribute:!1,type:Boolean})],o.prototype,"openResultInNewTab",void 0),o}),Wo=class extends Su(Ho){};var Jt=y(F()),K=y(j()),xl=y(Nt()),Sl=y(Zo());var Ko=e=>e??G;var Ee=y(O());var jo=y(j());var Jc=y(F()),U=y(O());var I={fontSize:U.FtCssVariableFactory.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:U.FtCssVariableFactory.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:U.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:U.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:U.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:U.FtCssVariableFactory.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:U.FtCssVariableFactory.extend("--ft-input-label-border-color","",U.designSystemVariables.colorOutline),textColor:U.FtCssVariableFactory.extend("--ft-input-label-text-color","",U.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:U.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color","",U.designSystemVariables.colorOnSurfaceDisabled),backgroundColor:U.FtCssVariableFactory.extend("--ft-input-label-background-color","",U.designSystemVariables.colorSurface),borderRadius:U.FtCssVariableFactory.extend("--ft-input-label-border-radius","",U.designSystemVariables.borderRadiusS),colorError:U.FtCssVariableFactory.external(U.designSystemVariables.colorError,"Design system")},el=Jc.css`
|
|
384
384
|
.ft-input-label {
|
|
385
385
|
position: absolute;
|
|
386
386
|
inset: 0;
|
|
@@ -711,7 +711,7 @@ Also for action icons.`,a.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
711
711
|
</slot>
|
|
712
712
|
${this.isSlotEmpty?Qt.html`<span>${this.label}</span>`:Qt.html``}
|
|
713
713
|
</div>
|
|
714
|
-
`}onSlotChange(){this.isSlotEmpty=(0,qo.isSlotEmptyOrWithoutContent)(this.slotElement)}onClick(){this.dispatchEvent(new Event("select-option",{bubbles:!0,composed:!0}))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};ee.elementDefinitions={"ft-ripple":P};ee.shadowRootOptions={...Qt.LitElement.shadowRootOptions,delegatesFocus:!0};ee.styles=[gl,Mr];kr([(0,it.property)({type:String})],ee.prototype,"label",void 0);kr([(0,it.property)({type:Object,converter:e=>e})],ee.prototype,"value",void 0);kr([(0,it.property)({type:Boolean,reflect:!0})],ee.prototype,"selected",void 0);kr([(0,it.query)("slot")],ee.prototype,"slotElement",void 0);kr([(0,it.state)()],ee.prototype,"isSlotEmpty",void 0);var Q=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};var D=class e extends Ee.FtLitElement{constructor(){super(...arguments),this.label="",this.ariaLabel=null,this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.currentSearch="",this.lastSearchInputDate=new Date("01/01/1970"),this.isSlotEmpty=!0,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}get firstOption(){return this.optionsList[0]}get optionsList(){let t=[...this.querySelectorAll("ft-select-option")];return t.length>0?t:[...this.shadowRoot.querySelectorAll("ft-select-option")]}get focusedOption(){return this.optionsList.find(t=>t.matches(":focus-within"))}get selectedOptionElement(){return this.optionsList.find(t=>t.selected)}get lastOption(){return(0,Ee.last)(this.optionsList)}render(){var t,o,n,i,s;let c=this.hasOptionsMenuOpen,d=this.disabled||!this.hasOptions,u=((t=this.selectedOption)===null||t===void 0?void 0:t.value)!=null||((
|
|
714
|
+
`}onSlotChange(){this.isSlotEmpty=(0,qo.isSlotEmptyOrWithoutContent)(this.slotElement)}onClick(){this.dispatchEvent(new Event("select-option",{bubbles:!0,composed:!0}))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};ee.elementDefinitions={"ft-ripple":P};ee.shadowRootOptions={...Qt.LitElement.shadowRootOptions,delegatesFocus:!0};ee.styles=[gl,Mr];kr([(0,it.property)({type:String})],ee.prototype,"label",void 0);kr([(0,it.property)({type:Object,converter:e=>e})],ee.prototype,"value",void 0);kr([(0,it.property)({type:Boolean,reflect:!0})],ee.prototype,"selected",void 0);kr([(0,it.query)("slot")],ee.prototype,"slotElement",void 0);kr([(0,it.state)()],ee.prototype,"isSlotEmpty",void 0);var Q=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};var D=class e extends Ee.FtLitElement{constructor(){super(...arguments),this.label="",this.ariaLabel=null,this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.currentSearch="",this.lastSearchInputDate=new Date("01/01/1970"),this.isSlotEmpty=!0,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}get firstOption(){return this.optionsList[0]}get optionsList(){let t=[...this.querySelectorAll("ft-select-option")];return t.length>0?t:[...this.shadowRoot.querySelectorAll("ft-select-option")]}get focusedOption(){return this.optionsList.find(t=>t.matches(":focus-within"))}get selectedOptionElement(){return this.optionsList.find(t=>t.selected)}get lastOption(){return(0,Ee.last)(this.optionsList)}render(){var t,o,n,i,s;let c=this.hasOptionsMenuOpen,d=this.disabled||!this.hasOptions,u=((t=this.selectedOption)===null||t===void 0?void 0:t.value)!=null||((i=(o=this.selectedOption)===null||o===void 0?void 0:o.label)!==null&&i!==void 0?i:"").length>0,p={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":d,"ft-select--options-displayed":c,"ft-select--has-option-selected":u,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return Jt.html`
|
|
715
715
|
<div class="${(0,xl.classMap)(p)}" part="container">
|
|
716
716
|
<div class="ft-select--main-panel" part="main-panel">
|
|
717
717
|
<ft-input-label text="${this.label}"
|
|
@@ -738,7 +738,7 @@ Also for action icons.`,a.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
738
738
|
<ft-typography variant="${ye.body1}"
|
|
739
739
|
aria-hidden="${u?"false":"true"}"
|
|
740
740
|
class="ft-select--selected-option">
|
|
741
|
-
${(s=(
|
|
741
|
+
${(s=(n=this.selectedOption)===null||n===void 0?void 0:n.label)!==null&&s!==void 0?s:this.label}
|
|
742
742
|
</ft-typography>
|
|
743
743
|
</slot>
|
|
744
744
|
<ft-icon aria-hidden="true" .value=${c?kt.THIN_ARROW_UP:kt.THIN_ARROW}></ft-icon>
|
|
@@ -767,7 +767,7 @@ Also for action icons.`,a.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
767
767
|
label="${t.label}"
|
|
768
768
|
.value=${t.value}
|
|
769
769
|
></ft-select-option>
|
|
770
|
-
`}willUpdate(t){super.willUpdate(t),t.has("options")&&(this.selectedOption=this.options.filter(o=>o.selected)[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1)}contentAvailableCallback(t){var o,n;if(super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&((
|
|
770
|
+
`}willUpdate(t){super.willUpdate(t),t.has("options")&&(this.selectedOption=this.options.filter(o=>o.selected)[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1)}contentAvailableCallback(t){var o,n;if(super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&((o=(n=this.selectedOptionElement)!==null&&n!==void 0?n:this.firstOption)===null||o===void 0||o.focus(),this.focusOptions=!1),t.has("optionsDisplayed")&&(this.optionsDisplayed?document.addEventListener("click",this.hideOptions):document.removeEventListener("click",this.hideOptions)),t.has("optionsDisplayed")&&this.hasOptionsMenuOpen){this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px";let i=["bottom","top"];(0,Ee.computeOffsetAutoPosition)(this.mainPanel,this.optionsMenu,"bottom",i,"fixed",L.optionsHeight,0).then(({x:s,y:c})=>{this.optionsMenu.style.left=`${s}px`,this.optionsMenu.style.top=`${c}px`})}}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var o;t.stopPropagation(),this.isSlotEmpty=(0,Ee.isSlotEmptyOrWithoutContent)(this.optionsSlot);let n=(o=this.optionsSlot)===null||o===void 0?void 0:o.assignedElements().map(i=>i);n&&n.length>0&&(this.options=n)}onMainPanelKeyDown(t){switch(t.key===" "&&(t.preventDefault(),t.stopPropagation()),t.key){case" ":case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0;break}}onOptionsKeyDown(t){var o,n;let i,s=this.focusedOption?this.optionsList.indexOf(this.focusedOption):0;switch(t.key){case" ":case"Enter":t.preventDefault(),t.stopPropagation(),this.onSelectOption(t),this.optionsDisplayed=!1,(o=this.mainPanel)===null||o===void 0||o.focus();break;case"Escape":this.optionsDisplayed=!1,(n=this.mainPanel)===null||n===void 0||n.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),i=this.optionsList[(s-1+this.optionsList.length)%this.optionsList.length];break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),i=this.optionsList[(s+1)%this.optionsList.length];break;default:if(t.key.length!=1)break;this.isKeyAlphanumeric(t.key)&&(i=this.handleAlphanumericPress(t.key));break}i?.focus()}isKeyAlphanumeric(t){let o=t.charCodeAt(0);return o>47&&o<58||o>64&&o<91||o>96&&o<123}handleAlphanumericPress(t){let o=new Date;o.getTime()-this.lastSearchInputDate.getTime()>e.searchTimeoutMilliseconds&&(this.currentSearch=""),this.currentSearch+=t.toLowerCase();let n=this.options.find(i=>{var s;return((s=i.label)===null||s===void 0?void 0:s.toLowerCase().substring(0,this.currentSearch.length))===this.currentSearch});return this.lastSearchInputDate=o,n&&this.optionsList.find(i=>i.value===n.value)}getOptionId(t){if(!t)return;let o=this.options.findIndex(n=>(0,Ee.deepEqual)(n.value,t.value));if(o!==-1)return`option-${o}`}onSelectOption(t){t.stopPropagation(),this.setValue(t.target.value)}setValue(t,o=!0){let n=this.options.find(i=>(0,Ee.deepEqual)(i.value,t));n&&this.selectOption(n,o)}selectOption(t,o=!0){var n,i;if(!(0,Ee.deepEqual)((n=this.selectedOption)===null||n===void 0?void 0:n.value,t?.value)){this.selectedOption=t;for(let s of this.options)s.selected=s===t;o&&this.dispatchEvent(new CustomEvent("change",{detail:(i=this.selectedOption)===null||i===void 0?void 0:i.value}))}this.optionsDisplayed=!1}};D.elementDefinitions={"ft-input-label":_e,"ft-typography":ue,"ft-ripple":P,"ft-icon":he,"ft-select-option":ee};D.searchTimeoutMilliseconds=2e3;D.styles=[Mt,ml];Q([(0,K.property)({type:String})],D.prototype,"label",void 0);Q([(0,K.property)({type:String})],D.prototype,"ariaLabel",void 0);Q([(0,K.property)({type:String})],D.prototype,"helper",void 0);Q([(0,K.property)({type:Boolean})],D.prototype,"outlined",void 0);Q([(0,K.property)({type:Boolean})],D.prototype,"disabled",void 0);Q([(0,K.property)({type:Boolean})],D.prototype,"error",void 0);Q([(0,K.property)({type:Boolean})],D.prototype,"fixedMenuPosition",void 0);Q([(0,K.property)({type:Array})],D.prototype,"options",void 0);Q([(0,K.state)()],D.prototype,"selectedOption",void 0);Q([(0,K.state)()],D.prototype,"optionsDisplayed",void 0);Q([(0,K.state)()],D.prototype,"focusOptions",void 0);Q([(0,K.state)()],D.prototype,"currentSearch",void 0);Q([(0,K.state)()],D.prototype,"lastSearchInputDate",void 0);Q([(0,K.query)(".ft-select")],D.prototype,"container",void 0);Q([(0,K.query)(".ft-select--options")],D.prototype,"optionsMenu",void 0);Q([(0,K.query)(".ft-select--input-panel")],D.prototype,"mainPanel",void 0);Q([(0,K.query)("slot:not([name])")],D.prototype,"optionsSlot",void 0);var Cl=y(O());var vl={"ft-select":D,"ft-select-option":ee};(0,Cl.customElements)(vl);var Ir=y(O());function vu(e){var t;return((t=(0,Ir.accessResult)(e))===null||t===void 0?void 0:t.openMode)===Co.EXTERNAL}function El(e,t){return vu(e)?(0,Ir.accessResult)(e).originUrl:(0,Ir.accessResultUrl)(e,t)}var Ue=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},te=class extends Do(Wo){constructor(){super(),this.separator=">",this.useAsClusterSwitch=!1,this.goToDocumentOnSwitch=!1,this.breadcrumbs=[]}get hasMultiBreadcrumbs(){return this.breadcrumbs.length>1&&this.useAsClusterSwitch}get selectedBreadcrumb(){return this.breadcrumbs.find(t=>t.id===this.selectedBreadcrumbId)}buildArrayBreadcrumbs(){let t=[];this.cluster&&this.cluster.entries.forEach(o=>{t.push({id:(0,ke.accessResultId)(o),breadcrumb:(0,ke.accessBreadcrumb)(o),result:o})}),this.breadcrumbs=t,this.selectedBreadcrumbId=(0,ke.accessResultId)(this.result)}willUpdate(t){super.willUpdate(t),this.buildArrayBreadcrumbs()}onBreadcrumbSelected(t){var o,n;t.stopPropagation(),this.selectedBreadcrumbId=t.detail;let i=(o=this.selectedBreadcrumb)===null||o===void 0?void 0:o.result;i&&((n=this.resultStateManager)===null||n===void 0||n.selectResult(i))}render(){return ne.html`
|
|
771
771
|
${Ie(this.hasMultiBreadcrumbs,()=>this.renderSelectBreadcrumb(),()=>Ie(this.breadcrumbs.length>0,()=>this.renderBreadcrumb(this.breadcrumbs[0])))}
|
|
772
772
|
`}renderBreadcrumb(t,o){let n={"ft-search-breadcrumbs":!0,multiline:!!this.multiline};return ne.html`
|
|
773
773
|
<ol slot="${o}" part="breadcrumb-list" class="${(0,Ol.classMap)(n)}" aria-label="${t.breadcrumb.join(" ")}">
|