@fluid-topics/ft-combobox 2.0.10 → 2.0.11

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.
@@ -1795,7 +1795,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
1795
1795
  position: relative;
1796
1796
  word-break: break-word;
1797
1797
  }
1798
- `;var q2=["top","right","bottom","left"],Z2=["start","end"],Vi=q2.reduce((e,t)=>e.concat(t,t+"-"+Z2[0],t+"-"+Z2[1]),[]),Bo=Math.min,Xt=Math.max,Uo=Math.round;var mt=e=>({x:e,y:e}),X8={left:"right",right:"left",bottom:"top",top:"bottom"};function ji(e,t,r){return Xt(e,Bo(t,r))}function On(e,t){return typeof e=="function"?e(t):e}function Xr(e){return e.split("-")[0]}function Qt(e){return e.split("-")[1]}function Ki(e){return e==="x"?"y":"x"}function Zi(e){return e==="y"?"height":"width"}function Rn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function qi(e){return Ki(Rn(e))}function Y2(e,t,r){r===void 0&&(r=!1);let n=Qt(e),a=qi(e),i=Zi(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Wi(s)),[s,Wi(s)]}function X2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Wi(e){let t=Xr(e);return X8[t]+e.slice(t.length)}function Q8(e){return{top:0,right:0,bottom:0,left:0,...e}}function Q2(e){return typeof e!="number"?Q8(e):{top:e,right:e,bottom:e,left:e}}function vr(e){let{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function J2(e,t,r){let{reference:n,floating:a}=e,i=Rn(t),s=qi(t),l=Zi(s),f=Xr(t),u=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,S;switch(f){case"top":S={x:m,y:n.y-a.height};break;case"bottom":S={x:m,y:n.y+n.height};break;case"right":S={x:n.x+n.width,y:g};break;case"left":S={x:n.x-a.width,y:g};break;default:S={x:n.x,y:n.y}}switch(Qt(t)){case"start":S[s]-=y*(r&&u?-1:1);break;case"end":S[s]+=y*(r&&u?-1:1);break}return S}async function ed(e,t){var r;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:S=0}=On(t,e),C=Q2(S),_=l[y?g==="floating"?"reference":"floating":g],M=vr(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(_)))==null||r?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:m,strategy:f})),N=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),D=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},Y=vr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:k,strategy:f}):N);return{top:(M.top-Y.top+C.top)/D.y,bottom:(Y.bottom-M.bottom+C.bottom)/D.y,left:(M.left-Y.left+C.left)/D.x,right:(Y.right-M.right+C.right)/D.x}}var J8=50,td=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:ed},f=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=J2(u,n,f),y=n,S=0,C={};for(let L=0;L<i.length;L++){let _=i[L];if(!_)continue;let{name:M,fn:N}=_,{x:k,y:D,data:Y,reset:le}=await N({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:C,rects:u,platform:l,elements:{reference:e,floating:t}});m=k??m,g=D??g,C[M]={...C[M],...Y},le&&S<J8&&(S++,typeof le=="object"&&(le.placement&&(y=le.placement),le.rects&&(u=le.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):le.rects),{x:m,y:g}=J2(u,y,f)),L=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:C}};function em(e,t,r){return(e?[...r.filter(a=>Qt(a)===e),...r.filter(a=>Qt(a)!==e)]:r.filter(a=>Xr(a)===a)).filter(a=>e?Qt(a)===e||(t?X2(a)!==a:!1):!0)}var rd=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:u}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Vi,autoAlignment:S=!0,...C}=On(e,t),L=g!==void 0||y===Vi?em(g||null,S,y):y,_=await f.detectOverflow(t,C),M=((r=s.autoPlacement)==null?void 0:r.index)||0,N=L[M];if(N==null)return{};let k=Y2(N,i,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(l!==N)return{reset:{placement:L[0]}};let D=[_[Xr(N)],_[k[0]],_[k[1]]],Y=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:D}],le=L[M+1];if(le)return{data:{index:M+1,overflows:Y},reset:{placement:le}};let $e=Y.map(_e=>{let x=Qt(_e.placement);return[_e.placement,x&&m?_e.overflows.slice(0,2).reduce((E,$)=>E+$,0):_e.overflows[0],_e.overflows]}).sort((_e,x)=>_e[1]-x[1]),vt=((a=$e.filter(_e=>_e[2].slice(0,Qt(_e[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||$e[0][0];return vt!==l?{data:{index:M+1,overflows:Y},reset:{placement:vt}}:{}}}};var od=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:M=>{let{x:N,y:k}=M;return{x:N,y:k}}},...u}=On(e,t),m={x:r,y:n},g=await i.detectOverflow(t,u),y=Rn(Xr(a)),S=Ki(y),C=m[S],L=m[y];if(s){let M=S==="y"?"top":"left",N=S==="y"?"bottom":"right",k=C+g[M],D=C-g[N];C=ji(k,C,D)}if(l){let M=y==="y"?"top":"left",N=y==="y"?"bottom":"right",k=L+g[M],D=L-g[N];L=ji(k,L,D)}let _=f.fn({...t,[S]:C,[y]:L});return{..._,data:{x:_.x-r,y:_.y-n,enabled:{[S]:s,[y]:l}}}}}};function _n(){return typeof window<"u"}function Cr(e){return ad(e)?(e.nodeName||"").toLowerCase():"#document"}function Fe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rt(e){var t;return(t=(ad(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ad(e){return _n()?e instanceof Node||e instanceof Fe(e).Node:!1}function tt(e){return _n()?e instanceof Element||e instanceof Fe(e).Element:!1}function wt(e){return _n()?e instanceof HTMLElement||e instanceof Fe(e).HTMLElement:!1}function nd(e){return!_n()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fe(e).ShadowRoot}function Qr(e){let{overflow:t,overflowX:r,overflowY:n,display:a}=rt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&a!=="inline"&&a!=="contents"}function id(e){return/^(table|td|th)$/.test(Cr(e))}function $o(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var tm=/transform|translate|scale|rotate|perspective|filter/,rm=/paint|layout|strict|content/,Sr=e=>!!e&&e!=="none",Yi;function Nn(e){let t=tt(e)?rt(e):e;return Sr(t.transform)||Sr(t.translate)||Sr(t.scale)||Sr(t.rotate)||Sr(t.perspective)||!Tn()&&(Sr(t.backdropFilter)||Sr(t.filter))||tm.test(t.willChange||"")||rm.test(t.contain||"")}function sd(e){let t=$t(e);for(;wt(t)&&!Er(t);){if(Nn(t))return t;if($o(t))return null;t=$t(t)}return null}function Tn(){return Yi==null&&(Yi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Yi}function Er(e){return/^(html|body|#document)$/.test(Cr(e))}function rt(e){return Fe(e).getComputedStyle(e)}function Ho(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $t(e){if(Cr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||nd(e)&&e.host||Rt(e);return nd(t)?t.host:t}function cd(e){let t=$t(e);return Er(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&Qr(t)?t:cd(t)}function wn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let a=cd(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=Fe(a);if(i){let l=Mn(s);return t.concat(s,s.visualViewport||[],Qr(a)?a:[],l&&r?wn(l):[])}else return t.concat(a,wn(a,[],r))}function Mn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ud(e){let t=rt(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=wt(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,l=Uo(r)!==i||Uo(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function pd(e){return tt(e)?e:e.contextElement}function Jr(e){let t=pd(e);if(!wt(t))return mt(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:i}=ud(t),s=(i?Uo(r.width):r.width)/n,l=(i?Uo(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var om=mt(0);function hd(e){let t=Fe(e);return!Tn()||!t.visualViewport?om:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nm(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Fe(e)?!1:t}function Go(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),i=pd(e),s=mt(1);t&&(n?tt(n)&&(s=Jr(n)):s=Jr(e));let l=nm(i,r,n)?hd(i):mt(0),f=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=Fe(i),S=n&&tt(n)?Fe(n):n,C=y,L=Mn(C);for(;L&&n&&S!==C;){let _=Jr(L),M=L.getBoundingClientRect(),N=rt(L),k=M.left+(L.clientLeft+parseFloat(N.paddingLeft))*_.x,D=M.top+(L.clientTop+parseFloat(N.paddingTop))*_.y;f*=_.x,u*=_.y,m*=_.x,g*=_.y,f+=k,u+=D,C=Fe(L),L=Mn(C)}}return vr({width:m,height:g,x:f,y:u})}function zn(e,t){let r=Ho(e).scrollLeft;return t?t.left+r:Go(Rt(e)).left+r}function md(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-zn(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function am(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Rt(n),l=t?$o(t.floating):!1;if(n===s||l&&i)return r;let f={scrollLeft:0,scrollTop:0},u=mt(1),m=mt(0),g=wt(n);if((g||!g&&!i)&&((Cr(n)!=="body"||Qr(s))&&(f=Ho(n)),g)){let S=Go(n);u=Jr(n),m.x=S.x+n.clientLeft,m.y=S.y+n.clientTop}let y=s&&!g&&!i?md(s,f):mt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+m.x+y.x,y:r.y*u.y-f.scrollTop*u.y+m.y+y.y}}function im(e){return Array.from(e.getClientRects())}function sm(e){let t=Rt(e),r=Ho(e),n=e.ownerDocument.body,a=Xt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Xt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+zn(e),l=-r.scrollTop;return rt(n).direction==="rtl"&&(s+=Xt(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var ld=25;function cm(e,t){let r=Fe(e),n=Rt(e),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,f=0;if(a){i=a.width,s=a.height;let m=Tn();(!m||m&&t==="fixed")&&(l=a.offsetLeft,f=a.offsetTop)}let u=zn(n);if(u<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),S=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(n.clientWidth-g.clientWidth-S);C<=ld&&(i-=C)}else u<=ld&&(i+=u);return{width:i,height:s,x:l,y:f}}function lm(e,t){let r=Go(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=wt(e)?Jr(e):mt(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,u=n*i.y;return{width:s,height:l,x:f,y:u}}function dd(e,t,r){let n;if(t==="viewport")n=cm(e,r);else if(t==="document")n=sm(Rt(e));else if(tt(t))n=lm(t,r);else{let a=hd(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return vr(n)}function gd(e,t){let r=$t(e);return r===t||!tt(r)||Er(r)?!1:rt(r).position==="fixed"||gd(r,t)}function dm(e,t){let r=t.get(e);if(r)return r;let n=wn(e,[],!1).filter(l=>tt(l)&&Cr(l)!=="body"),a=null,i=rt(e).position==="fixed",s=i?$t(e):e;for(;tt(s)&&!Er(s);){let l=rt(s),f=Nn(s);!f&&l.position==="fixed"&&(a=null),(i?!f&&!a:!f&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Qr(s)&&!f&&gd(e,s))?n=n.filter(m=>m!==s):a=l,s=$t(s)}return t.set(e,n),n}function fm(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,s=[...r==="clippingAncestors"?$o(t)?[]:dm(t,this._c):[].concat(r),n],l=dd(t,s[0],a),f=l.top,u=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let S=dd(t,s[y],a);f=Xt(S.top,f),u=Bo(S.right,u),m=Bo(S.bottom,m),g=Xt(S.left,g)}return{width:u-g,height:m-f,x:g,y:f}}function um(e){let{width:t,height:r}=ud(e);return{width:t,height:r}}function pm(e,t,r){let n=wt(t),a=Rt(t),i=r==="fixed",s=Go(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=mt(0);function u(){f.x=zn(a)}if(n||!n&&!i)if((Cr(t)!=="body"||Qr(a))&&(l=Ho(t)),n){let S=Go(t,!0,i,t);f.x=S.x+t.clientLeft,f.y=S.y+t.clientTop}else a&&u();i&&!n&&a&&u();let m=a&&!n&&!i?md(a,l):mt(0),g=s.left+l.scrollLeft-f.x-m.x,y=s.top+l.scrollTop-f.y-m.y;return{x:g,y,width:s.width,height:s.height}}function Xi(e){return rt(e).position==="static"}function fd(e,t){if(!wt(e)||rt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Rt(e)===r&&(r=r.ownerDocument.body),r}function yd(e,t){let r=Fe(e);if($o(e))return r;if(!wt(e)){let a=$t(e);for(;a&&!Er(a);){if(tt(a)&&!Xi(a))return a;a=$t(a)}return r}let n=fd(e,t);for(;n&&id(n)&&Xi(n);)n=fd(n,t);return n&&Er(n)&&Xi(n)&&!Nn(n)?r:n||sd(e)||r}var hm=async function(e){let t=this.getOffsetParent||yd,r=this.getDimensions,n=await r(e.floating);return{reference:pm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function mm(e){return rt(e).direction==="rtl"}var Pn={convertOffsetParentRelativeRectToViewportRelativeRect:am,getDocumentElement:Rt,getClippingRect:fm,getOffsetParent:yd,getElementRects:hm,getClientRects:im,getDimensions:um,getScale:Jr,isElement:tt,isRTL:mm};var bd=rd,xd=od;var vd=(e,t,r)=>{let n=new Map,a={platform:Pn,...r},i={...a.platform,_c:n};return td(e,t,{...a,platform:i})};function Sd(e){return gm(e)}function Qi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function gm(e){for(let t=e;t;t=Qi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Qi(e);t;t=Qi(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||r.filter!=="none"||t.tagName==="BODY"))return t}return null}async function Cd(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},vd(e,t,{strategy:n.strategy,platform:{...Pn,getOffsetParent:a=>Pn.getOffsetParent(a,Sd)},middleware:[xd({crossAxis:!0}),bd({allowedPlacements:[n.placement]})]})}var uo=v(P());var Es=v(de());function ym(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!In(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(!In(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=s=>Object.keys(s).filter(l=>s[l]!=null);if(a=i(e),r=a.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let s=a[n];if(!In(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function In(e,t){try{return ym(e,t)}catch{return!1}}function Fo(e,t){return!In(e,t)}function Ed(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function kn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var Ld=v(de(),1);var Ji=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:Fo,attribute:!1,...t};(0,Ld.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:l=>l[n],store:t.store})}};var Dn=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Lr=v(de(),1);var Ad=v(de(),1);function Od(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,Ad.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Fo,...t??{}})}var Bn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var wd=v(X(),1);var Un=globalThis,bm=Un.ShadowRoot&&(Un.ShadyCSS===void 0||Un.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,aS=Symbol();var Rd=(e,t)=>{if(bm)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=Un.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var $n=class extends wd.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Rd(n,t.elementStyles),n}};function _d(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var to=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},zd,Nd=Symbol("constructorPrototype"),Td=Symbol("constructorName"),Pd=Symbol("exportpartsDebouncer"),Md=Symbol("dynamicDependenciesLoaded"),eo=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};eo.eventName="exportparts-updated";var _t=class extends $n{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[zd]=new Bn(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Pd].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Td]=this.constructor.name,this[Nd]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Td]&&Object.setPrototypeOf(this,this[Nd])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[Md]||(r[Md]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(eo.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(eo.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 eo)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=_d(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,l;let f=y=>y!=null&&y.trim().length>0,u=t.filter(f).map(y=>y.trim());if(u.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(_=>_.split(":")[1]))!==null&&l!==void 0?l:[],L=[...S,...C].filter(f).map(_=>_.trim());for(let _ of L)m.add(_)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>u.map(S=>`${y}:${S}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};zd=Pd;to([(0,Lr.property)()],_t.prototype,"exportpartsPrefix",void 0);to([Od([])],_t.prototype,"exportpartsPrefixes",void 0);to([(0,Lr.property)({reflect:!0})],_t.prototype,"exportparts",void 0);to([(0,Lr.property)()],_t.prototype,"customStylesheet",void 0);to([(0,Lr.property)()],_t.prototype,"elementToFocus",void 0);to([(0,Lr.state)()],_t.prototype,"useAdoptedStyleSheets",void 0);function Hn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Wo=Symbol("internalReduxEventsUnsubscribers"),Jt=Symbol("internalStoresUnsubscribers"),Ar=Symbol("internalStores"),xm=kn(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Ar].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ar].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ar].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Ar].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Ar].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Ar].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let u=this.getStore(s.store);u&&(s.store?this[Jt].has(s.store):this[Jt].size>0)&&(this[l]=s.selector(u.getState(),this))}})}subscribeToStore(s,l){var f;this[Jt].set(s,l.subscribe(()=>this.updateFromStores())),this[Wo].set(s,[]),Hn(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||l.name===u.store)){let g=y=>this[m](y);l.addEventListener(u.eventName,g),this[Wo].get(s).push(()=>l.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Jt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Jt].has(s)&&this[Jt].get(s)(),this[Jt].delete(s),(l=this[Wo].get(s))===null||l===void 0||l.forEach(f=>f()),this[Wo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Jt,r=Ar,n=Wo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Id=class extends xm(_t){};function ot(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ht(e){return!!e&&!!e[ue]}function gt(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Rm}(e)||Array.isArray(e)||!!e[Gd]||!!(!((t=e.constructor)===null||t===void 0)&&t[Gd])||cs(e)||ls(e))}function Or(e,t,r){r===void 0&&(r=!1),no(e)===0?(r?Object.keys:oo)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function no(e){var t=e[ue];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:cs(e)?2:ls(e)?3:0}function ro(e,t){return no(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function vm(e,t){return no(e)===2?e.get(t):e[t]}function Fd(e,t,r){var n=no(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Wd(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function cs(e){return Am&&e instanceof Map}function ls(e){return Om&&e instanceof Set}function er(e){return e.o||e.t}function ds(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Kd(e);delete t[ue];for(var r=oo(t),n=0;n<r.length;n++){var a=r[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function fs(e,t){return t===void 0&&(t=!1),us(e)||Ht(e)||!gt(e)||(no(e)>1&&(e.set=e.add=e.clear=e.delete=Sm),Object.freeze(e),t&&Or(e,function(r,n){return fs(n,!0)},!0)),e}function Sm(){ot(2)}function us(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Nt(e){var t=ss[e];return t||ot(18,e),t}function Cm(e,t){ss[e]||(ss[e]=t)}function ns(){return jo}function es(e,t){t&&(Nt("Patches"),e.u=[],e.s=[],e.v=t)}function Gn(e){as(e),e.p.forEach(Em),e.p=null}function as(e){e===jo&&(jo=e.l)}function kd(e){return jo={p:[],l:jo,h:e,m:!0,_:0}}function Em(e){var t=e[ue];t.i===0||t.i===1?t.j():t.g=!0}function ts(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||Nt("ES5").S(t,e,n),n?(r[ue].P&&(Gn(t),ot(4)),gt(e)&&(e=Fn(t,e),t.l||Wn(t,e)),t.u&&Nt("Patches").M(r[ue].t,e,t.u,t.s)):e=Fn(t,r,[]),Gn(t),t.u&&t.v(t.u,t.s),e!==jd?e:void 0}function Fn(e,t,r){if(us(t))return t;var n=t[ue];if(!n)return Or(t,function(l,f){return Dd(e,n,t,l,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Wn(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=ds(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Or(i,function(l,f){return Dd(e,n,a,l,f,r,s)}),Wn(e,a,!1),r&&e.u&&Nt("Patches").N(n,r,e.u,e.s)}return n.o}function Dd(e,t,r,n,a,i,s){if(Ht(a)){var l=Fn(e,a,i&&t&&t.i!==3&&!ro(t.R,n)?i.concat(n):void 0);if(Fd(r,n,l),!Ht(l))return;e.m=!1}else s&&r.add(a);if(gt(a)&&!us(a)){if(!e.h.D&&e._<1)return;Fn(e,a),t&&t.A.l||Wn(e,a)}}function Wn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&fs(t,r)}function rs(e,t){var r=e[ue];return(r?er(r):e)[t]}function Bd(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function tr(e){e.P||(e.P=!0,e.l&&tr(e.l))}function os(e){e.o||(e.o=ds(e.t))}function is(e,t,r){var n=cs(t)?Nt("MapSet").F(t,r):ls(t)?Nt("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:ns(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,u=Ko;s&&(f=[l],u=Vo);var m=Proxy.revocable(f,u),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y}(t,r):Nt("ES5").J(t,r);return(r?r.A:ns()).p.push(n),n}function Lm(e){return Ht(e)||ot(22,e),function t(r){if(!gt(r))return r;var n,a=r[ue],i=no(r);if(a){if(!a.P&&(a.i<4||!Nt("ES5").K(a)))return a.t;a.I=!0,n=Ud(r,i),a.I=!1}else n=Ud(r,i);return Or(n,function(s,l){a&&vm(a.t,s)===l||Fd(n,s,t(l))}),i===3?new Set(n):n}(e)}function Ud(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ds(e)}function Vd(){function e(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var u=this[ue];return Ko.get(u,s)},set:function(u){var m=this[ue];Ko.set(m,s,u)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][ue];if(!f.P)switch(f.i){case 5:n(f)&&tr(f);break;case 4:r(f)&&tr(f)}}}function r(s){for(var l=s.t,f=s.k,u=oo(f),m=u.length-1;m>=0;m--){var g=u[m];if(g!==ue){var y=l[g];if(y===void 0&&!ro(l,g))return!0;var S=f[g],C=S&&S[ue];if(C?C.t!==y:!Wd(S,y))return!0}}var L=!!l[ue];return u.length!==oo(l).length+(L?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var u=0;u<l.length;u++)if(!l.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&ot(3,JSON.stringify(er(s)))}var i={};Cm("ES5",{J:function(s,l){var f=Array.isArray(s),u=function(g,y){if(g){for(var S=Array(y.length),C=0;C<y.length;C++)Object.defineProperty(S,""+C,e(C,!0));return S}var L=Kd(y);delete L[ue];for(var _=oo(L),M=0;M<_.length;M++){var N=_[M];L[N]=e(N,g||!!L[N].enumerable)}return Object.create(Object.getPrototypeOf(y),L)}(f,s),m={i:f?5:4,A:l?l.A:ns(),P:!1,I:!1,R:{},l,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ue,{value:m,writable:!0}),u},S:function(s,l,f){f?Ht(l)&&l[ue].A===s&&t(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var g=m[ue];if(g){var y=g.t,S=g.k,C=g.R,L=g.i;if(L===4)Or(S,function(D){D!==ue&&(y[D]!==void 0||ro(y,D)?C[D]||u(S[D]):(C[D]=!0,tr(g)))}),Or(y,function(D){S[D]!==void 0||ro(S,D)||(C[D]=!1,tr(g))});else if(L===5){if(n(g)&&(tr(g),C.length=!0),S.length<y.length)for(var _=S.length;_<y.length;_++)C[_]=!1;else for(var M=y.length;M<S.length;M++)C[M]=!0;for(var N=Math.min(S.length,y.length),k=0;k<N;k++)S.hasOwnProperty(k)||(C[k]=!0),C[k]===void 0&&u(S[k])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var $d,jo,ps=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Am=typeof Map<"u",Om=typeof Set<"u",Hd=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",jd=ps?Symbol.for("immer-nothing"):(($d={})["immer-nothing"]=!0,$d),Gd=ps?Symbol.for("immer-draftable"):"__$immer_draftable",ue=ps?Symbol.for("immer-state"):"__$immer_state";var Rm=""+Object.prototype.constructor,oo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Kd=Object.getOwnPropertyDescriptors||function(e){var t={};return oo(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},ss={},Ko={get:function(e,t){if(t===ue)return e;var r=er(e);if(!ro(r,t))return function(a,i,s){var l,f=Bd(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!gt(n)?n:n===rs(e.t,t)?(os(e),e.o[t]=is(e.A.h,n,e)):n},has:function(e,t){return t in er(e)},ownKeys:function(e){return Reflect.ownKeys(er(e))},set:function(e,t,r){var n=Bd(er(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=rs(er(e),t),i=a?.[ue];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Wd(r,a)&&(r!==void 0||ro(e.t,t)))return!0;os(e),tr(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return rs(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,os(e),tr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=er(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){ot(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ot(12)}},Vo={};Or(Ko,function(e,t){Vo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Vo.deleteProperty=function(e,t){return Vo.set.call(this,e,t,void 0)},Vo.set=function(e,t,r){return Ko.set.call(this,e[0],t,r,e[0])};var wm=function(){function e(r){var n=this;this.O=Hd,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var f=n;return function(L){var _=this;L===void 0&&(L=l);for(var M=arguments.length,N=Array(M>1?M-1:0),k=1;k<M;k++)N[k-1]=arguments[k];return f.produce(L,function(D){var Y;return(Y=i).call.apply(Y,[_,D].concat(N))})}}var u;if(typeof i!="function"&&ot(6),s!==void 0&&typeof s!="function"&&ot(7),gt(a)){var m=kd(n),g=is(n,a,void 0),y=!0;try{u=i(g),y=!1}finally{y?Gn(m):as(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(L){return es(m,s),ts(L,m)},function(L){throw Gn(m),L}):(es(m,s),ts(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===jd&&(u=void 0),n.D&&fs(u,!0),s){var S=[],C=[];Nt("Patches").M(a,u,S,C),s(S,C)}return u}ot(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(g))})};var s,l,f=n.produce(a,i,function(u,m){s=u,l=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,s,l]}):[f,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){gt(r)||ot(8),Ht(r)&&(r=Lm(r));var n=kd(this),a=is(this,r,void 0);return a[ue].C=!0,as(n),a},t.finishDraft=function(r,n){var a=r&&r[ue],i=a.A;return es(i,n),ts(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Hd&&ot(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=Nt("Patches").$;return Ht(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},e}(),Ze=new wm,_m=Ze.produce,vS=Ze.produceWithPatches.bind(Ze),SS=Ze.setAutoFreeze.bind(Ze),CS=Ze.setUseProxies.bind(Ze),ES=Ze.applyPatches.bind(Ze),LS=Ze.createDraft.bind(Ze),AS=Ze.finishDraft.bind(Ze),Vn=_m;function Rr(e){"@babel/helpers - typeof";return Rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rr(e)}function Zd(e,t){if(Rr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Rr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qd(e){var t=Zd(e,"string");return Rr(t)=="symbol"?t:t+""}function Yd(e,t,r){return(t=qd(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xd(Object(r),!0).forEach(function(n){Yd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function De(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 Qd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ms=function(){return Math.random().toString(36).substring(7).split("").join(".")},jn={INIT:"@@redux/INIT"+ms(),REPLACE:"@@redux/REPLACE"+ms(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ms()}};function Nm(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function gs(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(De(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(De(1));return r(gs)(e,t)}if(typeof e!="function")throw new Error(De(2));var a=e,i=t,s=[],l=s,f=!1;function u(){l===s&&(l=s.slice())}function m(){if(f)throw new Error(De(3));return i}function g(L){if(typeof L!="function")throw new Error(De(4));if(f)throw new Error(De(5));var _=!0;return u(),l.push(L),function(){if(_){if(f)throw new Error(De(6));_=!1,u();var N=l.indexOf(L);l.splice(N,1),s=null}}}function y(L){if(!Nm(L))throw new Error(De(7));if(typeof L.type>"u")throw new Error(De(8));if(f)throw new Error(De(9));try{f=!0,i=a(i,L)}finally{f=!1}for(var _=s=l,M=0;M<_.length;M++){var N=_[M];N()}return L}function S(L){if(typeof L!="function")throw new Error(De(10));a=L,y({type:jn.REPLACE})}function C(){var L,_=g;return L={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(De(11));function k(){N.next&&N.next(m())}k();var D=_(k);return{unsubscribe:D}}},L[Qd]=function(){return this},L}return y({type:jn.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:S},n[Qd]=C,n}function Tm(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:jn.INIT});if(typeof n>"u")throw new Error(De(12));if(typeof r(void 0,{type:jn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(De(13))})}function Jd(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),s,l;try{Tm(r)}catch(f){l=f}return function(u,m){if(u===void 0&&(u={}),l)throw l;if(0)var g;for(var y=!1,S={},C=0;C<i.length;C++){var L=i[C],_=r[L],M=u[L],N=_(M,m);if(typeof N>"u"){var k=m&&m.type;throw new Error(De(14))}S[L]=N,y=y||N!==M}return y=y||i.length!==Object.keys(u).length,y?S:u}}function ao(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function e0(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(De(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=ao.apply(void 0,l)(a.dispatch),hs(hs({},a),{},{dispatch:i})}}}function t0(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var r0=t0();r0.withExtraArgument=t0;var ys=r0;var s0=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mm=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(m){return f([u,m])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},io=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},zm=Object.defineProperty,Pm=Object.defineProperties,Im=Object.getOwnPropertyDescriptors,o0=Object.getOwnPropertySymbols,km=Object.prototype.hasOwnProperty,Dm=Object.prototype.propertyIsEnumerable,n0=function(e,t,r){return t in e?zm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},rr=function(e,t){for(var r in t||(t={}))km.call(t,r)&&n0(e,r,t[r]);if(o0)for(var n=0,a=o0(t);n<a.length;n++){var r=a[n];Dm.call(t,r)&&n0(e,r,t[r])}return e},bs=function(e,t){return Pm(e,Im(t))},Bm=function(e,t,r){return new Promise(function(n,a){var i=function(f){try{l(r.next(f))}catch(u){a(u)}},s=function(f){try{l(r.throw(f))}catch(u){a(u)}},l=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,s)};l((r=r.apply(e,t)).next())})};var Um=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ao:ao.apply(null,arguments)},FS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function $m(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var Hm=function(e){s0(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,io([void 0],r[0].concat(this)))):new(t.bind.apply(t,io([void 0],r.concat(this))))},t}(Array),Gm=function(e){s0(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,io([void 0],r[0].concat(this)))):new(t.bind.apply(t,io([void 0],r.concat(this))))},t}(Array);function Ss(e){return gt(e)?Vn(e,function(){}):e}function Fm(e){return typeof e=="boolean"}function Wm(){return function(t){return Vm(t)}}function Vm(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=new Hm;if(r&&(Fm(r)?l.push(ys):l.push(ys.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return l}var xs=!0;function c0(e){var t=Wm(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?t():i,l=r.devTools,f=l===void 0?!0:l,u=r.preloadedState,m=u===void 0?void 0:u,g=r.enhancers,y=g===void 0?void 0:g,S;if(typeof a=="function")S=a;else if($m(a))S=Jd(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(t),!xs&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!xs&&C.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=e0.apply(void 0,C),_=ao;f&&(_=Um(rr({trace:!xs},typeof f=="object"&&f)));var M=new Gm(L),N=M;Array.isArray(y)?N=io([L],y):typeof y=="function"&&(N=y(M));var k=_.apply(void 0,N);return gs(S,m,k)}function or(e,t){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return rr(rr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function l0(e){var t={},r=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,r,n]}function jm(e){return typeof e=="function"}function Km(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?l0(t):[t,r,n],i=a[0],s=a[1],l=a[2],f;if(jm(e))f=function(){return Ss(e())};else{var u=Ss(e);f=function(){return u}}function m(g,y){g===void 0&&(g=f());var S=io([i[y.type]],s.filter(function(C){var L=C.matcher;return L(y)}).map(function(C){var L=C.reducer;return L}));return S.filter(function(C){return!!C}).length===0&&(S=[l]),S.reduce(function(C,L){if(L)if(Ht(C)){var _=C,M=L(_,y);return M===void 0?C:M}else{if(gt(C))return Vn(C,function(N){return L(N,y)});var M=L(C,y);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},g)}return m.getInitialState=f,m}function Zm(e,t){return e+"/"+t}function d0(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Ss(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=Zm(t,m),S,C;"reducer"in g?(S=g.reducer,C=g.prepare):S=g,i[m]=S,s[y]=S,l[m]=C?or(y,C):or(y)});function f(){var m=typeof e.extraReducers=="function"?l0(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,S=m[1],C=S===void 0?[]:S,L=m[2],_=L===void 0?void 0:L,M=rr(rr({},y),s);return Km(r,function(N){for(var k in M)N.addCase(k,M[k]);for(var D=0,Y=C;D<Y.length;D++){var le=Y[D];N.addMatcher(le.matcher,le.reducer)}_&&N.addDefaultCase(_)})}var u;return{name:t,reducer:function(m,g){return u||(u=f()),u(m,g)},actions:l,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var qm="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ym=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=qm[Math.random()*64|0];return t},Xm=["name","message","stack","code"],vs=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),a0=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Qm=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Xm;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},KS=function(){function e(t,r,n){var a=or(t+"/fulfilled",function(m,g,y,S){return{payload:m,meta:bs(rr({},S||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=or(t+"/pending",function(m,g,y){return{payload:void 0,meta:bs(rr({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=or(t+"/rejected",function(m,g,y,S,C){return{payload:S,error:(n&&n.serializeError||Qm)(m||"Rejected"),meta:bs(rr({},C||{}),{arg:y,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(g,y,S){var C=n?.idGenerator?n.idGenerator(m):Ym(),L=new f,_,M=!1;function N(D){_=D,L.abort()}var k=function(){return Bm(this,null,function(){var D,Y,le,$e,we,vt,_e;return Mm(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),$e=(D=n?.condition)==null?void 0:D.call(n,m,{getState:y,extra:S}),eg($e)?[4,$e]:[3,2];case 1:$e=x.sent(),x.label=2;case 2:if($e===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,we=new Promise(function(E,$){return L.signal.addEventListener("abort",function(){return $({name:"AbortError",message:_||"Aborted"})})}),g(i(C,m,(Y=n?.getPendingMeta)==null?void 0:Y.call(n,{requestId:C,arg:m},{getState:y,extra:S}))),[4,Promise.race([we,Promise.resolve(r(m,{dispatch:g,getState:y,extra:S,requestId:C,signal:L.signal,abort:N,rejectWithValue:function(E,$){return new vs(E,$)},fulfillWithValue:function(E,$){return new a0(E,$)}})).then(function(E){if(E instanceof vs)throw E;return E instanceof a0?a(E.payload,C,m,E.meta):a(E,C,m)})])];case 3:return le=x.sent(),[3,5];case 4:return vt=x.sent(),le=vt instanceof vs?s(null,C,m,vt.payload,vt.meta):s(vt,C,m),[3,5];case 5:return _e=n&&!n.dispatchConditionRejection&&s.match(le)&&le.meta.condition,_e||g(le),[2,le]}})})}();return Object.assign(k,{abort:N,requestId:C,arg:m,unwrap:function(){return k.then(Jm)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Jm(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function eg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var f0="listener",u0="completed",p0="cancelled",ZS="task-"+p0,qS="task-"+u0,YS=f0+"-"+p0,XS=f0+"-"+u0;var Cs="listenerMiddleware";var QS=or(Cs+"/add"),JS=or(Cs+"/removeAll"),eC=or(Cs+"/remove");var i0,tC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(i0||(i0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},tg=function(e){return function(t){setTimeout(t,e)}},rC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tg(10);Vd();var rg=kn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),Kn=class extends rg(Object){};window.ftReduxStores||(window.ftReduxStores={});var h0=class e extends Kn{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Hn(i))return i;if(a==null)return;let s=d0({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=c0({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=Ed(s.getInitialState());for(let g of u.keeping)m[g]=(f??m)[g];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...u.overwrites};return s.reducer(f,u)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Dn;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,u=i[f];return u?(...m)=>{let g=u(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Zn=class{static format(t,r,n,a){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(t,r,n,a)}static getMomentDateFormat(t,r){return t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(i);if(!a)return s;let l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var qn=v(P()),og="ft-app-info",wr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};wr.eventName="authentication-change";var ng={session:(e,t)=>{(0,qn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>I.dispatchEvent(new wr(t.payload)),0))}},I=qn.FtReduxStore.get({name:og,reducers:ng,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var m0=v(P()),Yn=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},NC=(0,m0.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(I)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>Zn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Yn([(0,Es.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Yn([(0,Es.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Yn([Ji({store:I.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),Yn([Ji({store:I.name})],t.prototype,"uiLocale",void 0),t});var ig=v(y0(),1);var b0;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(b0||(b0={}));var x0;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(x0||(x0={}));var v0;(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"})(v0||(v0={}));var S0;(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"})(S0||(S0={}));var C0;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(C0||(C0={}));var E0;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(E0||(E0={}));var L0;(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__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",e.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",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__DISPLAY="TOPIC__DISPLAY",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"})(L0||(L0={}));var A0;(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"})(A0||(A0={}));var O0;(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"})(O0||(O0={}));var R0;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(R0||(R0={}));var w0;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(w0||(w0={}));var _0;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(_0||(_0={}));var N0;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(N0||(N0={}));var T0;(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"})(T0||(T0={}));var M0;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(M0||(M0={}));var z0;(function(e){e.ASC="ASC",e.DESC="DESC"})(z0||(z0={}));var P0;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(P0||(P0={}));var I0;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(I0||(I0={}));var k0;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(k0||(k0={}));var D0;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(D0||(D0={}));var B0;(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"})(B0||(B0={}));var U0;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(U0||(U0={}));var $0;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})($0||($0={}));var H0;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(H0||(H0={}));var G0;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(G0||(G0={}));var Se;(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"})(Se||(Se={}));var nt;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(nt||(nt={}));var F0;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(F0||(F0={}));var W0;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(W0||(W0={}));var V0;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(V0||(V0={}));var j0;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(j0||(j0={}));var K0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(K0||(K0={}));var Z0;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(Z0||(Z0={}));var q0;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(q0||(q0={}));var Y0;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Y0||(Y0={}));var X0;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(X0||(X0={}));var ag={[Se.PERSONAL_BOOK_SHARE_USER]:[Se.PERSONAL_BOOK_USER],[Se.HTML_EXPORT_USER]:[Se.PERSONAL_BOOK_USER],[Se.PDF_EXPORT_USER]:[Se.PERSONAL_BOOK_USER],[Se.KHUB_ADMIN]:[Se.CONTENT_PUBLISHER],[Se.ADMIN]:[Se.KHUB_ADMIN,Se.USERS_ADMIN,Se.PORTAL_ADMIN,Se.BEHAVIOR_DATA_USER],[Se.GENERATIVE_AI_EXPORT_USER]:[Se.GENERATIVE_AI_USER]};function Q0(e,t){return e===t||(ag[e]??[]).some(r=>Q0(r,t))}function J0(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=>Q0(n,t))}var na=v(P());var Ls=v(P());var _r=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=I.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=I.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var Jn=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:_r.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):_r.await()}};var qe=class extends Jn{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Ls.CacheRegistry,this.cache=t?a.commonCache:new Ls.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var ea=class extends qe{async listMySearches(){let{session:t}=I.getState();return J0(t,Se.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var ta=class extends qe{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ra=class extends qe{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=I.getState().session;return!!t?.sessionAuthenticated}};var oa=class extends qe{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=I.getState().session;return!!t?.sessionAuthenticated}};var sg="ft-user-assets",cg={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(nt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:a}=t.payload;Os(e,r,[...As(e,r),a]),e4(e,r,1,n),t4(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Os(e,r,As(e,r).map(a=>a.id===n.id?n:a)),t4(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;Os(e,r,As(e,r).filter(i=>i.id!==a)),e4(e,r,-1,n)}},r4={[nt.SEARCHES]:"savedSearches",[nt.BOOKMARKS]:"bookmarks",[nt.BOOKS]:void 0,[nt.COLLECTIONS]:void 0},As=(e,t)=>{var r;let n=r4[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Os=(e,t,r)=>{let n=r4[t];n&&(e[n]=r)},e4=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===nt.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},t4=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},Ye=na.FtReduxStore.get({name:sg,reducers:cg,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(nt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Rs=class{constructor(t=new ra,r=new oa){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ta,this.savedSearchesService=new ea,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=I.getState();(0,na.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ye.actions.clearAssetCount(),Ye.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ye.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ye.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ye.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ye.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ye.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ye.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ye.getState().assetCounts.bookmarkByMap).length!==0;t===nt.BOOKMARKS&&r&&Ye.actions.clearBookmarkCountByMap(),Ye.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ye.actions.bookmarks(r)}}},lg=new Rs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=lg);var ws=class{addCommand(t,r=!1){I.commands.add(t,r)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ws;var at=v(P());var o4,co=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},dg=Symbol("clearAfterUnitTest"),aa=class extends(0,at.withEventBus)(qe){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[o4]=()=>{this.defaultMessages={},this.cache=new at.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,at.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new at.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof at.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new co({loadedContexts:t})),this.dispatchEvent(new co({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new co({loadedContexts:[t]})),this.dispatchEvent(new co({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,at.delay)(0).then(()=>n()).catch(()=>null)))}};o4=dg;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends aa{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends aa{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var lo=window.FluidTopicsI18nService,ia=window.FluidTopicsCustomI18nService;var n4=v(P()),_s=class{highlightHtml(t,r,n){(0,n4.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new _s;var a4=v(P());var Ns=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=I.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i;if(t==null)return"";try{return a4.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}catch(s){throw console.error(`Date ${JSON.stringify(t)} is not valid`,s),s}}};window.FluidTopicsDateService=new Ns;var i4=v(P());var Zo=class{static get(t,r){var n,a;let i=I.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new i4.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var Ts=class{urlToSearchRequest(t){return Zo.get().parse(t)}searchRequestToUrl(t){return Zo.get().serialize(t)}};window.FluidTopicsUrlService=new Ts;var ar=v(P());var Nr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Nr.eventName="change";var Ms=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},s4=new Ms;var sa=class e extends ar.WithEventBus{static build(){return new e(window.history,s4,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ar.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Nr(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,l])=>{let f=r(),u={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Nr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Nr.eventName,t)}currentItem(){return(0,ar.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,ar.deepCopy)(this.states[this.previousDifferentMajorPosition()])}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,ar.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=sa.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var c4=v(X());var l4=c4.css`
1798
+ `;var q2=["top","right","bottom","left"],Z2=["start","end"],Vi=q2.reduce((e,t)=>e.concat(t,t+"-"+Z2[0],t+"-"+Z2[1]),[]),Bo=Math.min,Xt=Math.max,Uo=Math.round;var mt=e=>({x:e,y:e}),X8={left:"right",right:"left",bottom:"top",top:"bottom"};function ji(e,t,r){return Xt(e,Bo(t,r))}function On(e,t){return typeof e=="function"?e(t):e}function Xr(e){return e.split("-")[0]}function Qt(e){return e.split("-")[1]}function Ki(e){return e==="x"?"y":"x"}function Zi(e){return e==="y"?"height":"width"}function Rn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function qi(e){return Ki(Rn(e))}function Y2(e,t,r){r===void 0&&(r=!1);let n=Qt(e),a=qi(e),i=Zi(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Wi(s)),[s,Wi(s)]}function X2(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Wi(e){let t=Xr(e);return X8[t]+e.slice(t.length)}function Q8(e){return{top:0,right:0,bottom:0,left:0,...e}}function Q2(e){return typeof e!="number"?Q8(e):{top:e,right:e,bottom:e,left:e}}function vr(e){let{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function J2(e,t,r){let{reference:n,floating:a}=e,i=Rn(t),s=qi(t),l=Zi(s),f=Xr(t),u=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,S;switch(f){case"top":S={x:m,y:n.y-a.height};break;case"bottom":S={x:m,y:n.y+n.height};break;case"right":S={x:n.x+n.width,y:g};break;case"left":S={x:n.x-a.width,y:g};break;default:S={x:n.x,y:n.y}}switch(Qt(t)){case"start":S[s]-=y*(r&&u?-1:1);break;case"end":S[s]+=y*(r&&u?-1:1);break}return S}async function ed(e,t){var r;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:S=0}=On(t,e),C=Q2(S),_=l[y?g==="floating"?"reference":"floating":g],M=vr(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(_)))==null||r?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:m,strategy:f})),N=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),D=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},Y=vr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:k,strategy:f}):N);return{top:(M.top-Y.top+C.top)/D.y,bottom:(Y.bottom-M.bottom+C.bottom)/D.y,left:(M.left-Y.left+C.left)/D.x,right:(Y.right-M.right+C.right)/D.x}}var J8=50,td=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:ed},f=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=J2(u,n,f),y=n,S=0,C={};for(let L=0;L<i.length;L++){let _=i[L];if(!_)continue;let{name:M,fn:N}=_,{x:k,y:D,data:Y,reset:le}=await N({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:C,rects:u,platform:l,elements:{reference:e,floating:t}});m=k??m,g=D??g,C[M]={...C[M],...Y},le&&S<J8&&(S++,typeof le=="object"&&(le.placement&&(y=le.placement),le.rects&&(u=le.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):le.rects),{x:m,y:g}=J2(u,y,f)),L=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:C}};function em(e,t,r){return(e?[...r.filter(a=>Qt(a)===e),...r.filter(a=>Qt(a)!==e)]:r.filter(a=>Xr(a)===a)).filter(a=>e?Qt(a)===e||(t?X2(a)!==a:!1):!0)}var rd=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:u}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Vi,autoAlignment:S=!0,...C}=On(e,t),L=g!==void 0||y===Vi?em(g||null,S,y):y,_=await f.detectOverflow(t,C),M=((r=s.autoPlacement)==null?void 0:r.index)||0,N=L[M];if(N==null)return{};let k=Y2(N,i,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(l!==N)return{reset:{placement:L[0]}};let D=[_[Xr(N)],_[k[0]],_[k[1]]],Y=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:D}],le=L[M+1];if(le)return{data:{index:M+1,overflows:Y},reset:{placement:le}};let $e=Y.map(_e=>{let x=Qt(_e.placement);return[_e.placement,x&&m?_e.overflows.slice(0,2).reduce((E,$)=>E+$,0):_e.overflows[0],_e.overflows]}).sort((_e,x)=>_e[1]-x[1]),vt=((a=$e.filter(_e=>_e[2].slice(0,Qt(_e[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||$e[0][0];return vt!==l?{data:{index:M+1,overflows:Y},reset:{placement:vt}}:{}}}};var od=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:M=>{let{x:N,y:k}=M;return{x:N,y:k}}},...u}=On(e,t),m={x:r,y:n},g=await i.detectOverflow(t,u),y=Rn(Xr(a)),S=Ki(y),C=m[S],L=m[y];if(s){let M=S==="y"?"top":"left",N=S==="y"?"bottom":"right",k=C+g[M],D=C-g[N];C=ji(k,C,D)}if(l){let M=y==="y"?"top":"left",N=y==="y"?"bottom":"right",k=L+g[M],D=L-g[N];L=ji(k,L,D)}let _=f.fn({...t,[S]:C,[y]:L});return{..._,data:{x:_.x-r,y:_.y-n,enabled:{[S]:s,[y]:l}}}}}};function _n(){return typeof window<"u"}function Cr(e){return ad(e)?(e.nodeName||"").toLowerCase():"#document"}function Fe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rt(e){var t;return(t=(ad(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ad(e){return _n()?e instanceof Node||e instanceof Fe(e).Node:!1}function tt(e){return _n()?e instanceof Element||e instanceof Fe(e).Element:!1}function wt(e){return _n()?e instanceof HTMLElement||e instanceof Fe(e).HTMLElement:!1}function nd(e){return!_n()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fe(e).ShadowRoot}function Qr(e){let{overflow:t,overflowX:r,overflowY:n,display:a}=rt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&a!=="inline"&&a!=="contents"}function id(e){return/^(table|td|th)$/.test(Cr(e))}function $o(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var tm=/transform|translate|scale|rotate|perspective|filter/,rm=/paint|layout|strict|content/,Sr=e=>!!e&&e!=="none",Yi;function Nn(e){let t=tt(e)?rt(e):e;return Sr(t.transform)||Sr(t.translate)||Sr(t.scale)||Sr(t.rotate)||Sr(t.perspective)||!Tn()&&(Sr(t.backdropFilter)||Sr(t.filter))||tm.test(t.willChange||"")||rm.test(t.contain||"")}function sd(e){let t=$t(e);for(;wt(t)&&!Er(t);){if(Nn(t))return t;if($o(t))return null;t=$t(t)}return null}function Tn(){return Yi==null&&(Yi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Yi}function Er(e){return/^(html|body|#document)$/.test(Cr(e))}function rt(e){return Fe(e).getComputedStyle(e)}function Ho(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $t(e){if(Cr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||nd(e)&&e.host||Rt(e);return nd(t)?t.host:t}function cd(e){let t=$t(e);return Er(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&Qr(t)?t:cd(t)}function wn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let a=cd(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=Fe(a);if(i){let l=Mn(s);return t.concat(s,s.visualViewport||[],Qr(a)?a:[],l&&r?wn(l):[])}else return t.concat(a,wn(a,[],r))}function Mn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ud(e){let t=rt(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=wt(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,l=Uo(r)!==i||Uo(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function pd(e){return tt(e)?e:e.contextElement}function Jr(e){let t=pd(e);if(!wt(t))return mt(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:i}=ud(t),s=(i?Uo(r.width):r.width)/n,l=(i?Uo(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var om=mt(0);function hd(e){let t=Fe(e);return!Tn()||!t.visualViewport?om:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nm(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Fe(e)?!1:t}function Go(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),i=pd(e),s=mt(1);t&&(n?tt(n)&&(s=Jr(n)):s=Jr(e));let l=nm(i,r,n)?hd(i):mt(0),f=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=Fe(i),S=n&&tt(n)?Fe(n):n,C=y,L=Mn(C);for(;L&&n&&S!==C;){let _=Jr(L),M=L.getBoundingClientRect(),N=rt(L),k=M.left+(L.clientLeft+parseFloat(N.paddingLeft))*_.x,D=M.top+(L.clientTop+parseFloat(N.paddingTop))*_.y;f*=_.x,u*=_.y,m*=_.x,g*=_.y,f+=k,u+=D,C=Fe(L),L=Mn(C)}}return vr({width:m,height:g,x:f,y:u})}function zn(e,t){let r=Ho(e).scrollLeft;return t?t.left+r:Go(Rt(e)).left+r}function md(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-zn(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function am(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Rt(n),l=t?$o(t.floating):!1;if(n===s||l&&i)return r;let f={scrollLeft:0,scrollTop:0},u=mt(1),m=mt(0),g=wt(n);if((g||!g&&!i)&&((Cr(n)!=="body"||Qr(s))&&(f=Ho(n)),g)){let S=Go(n);u=Jr(n),m.x=S.x+n.clientLeft,m.y=S.y+n.clientTop}let y=s&&!g&&!i?md(s,f):mt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+m.x+y.x,y:r.y*u.y-f.scrollTop*u.y+m.y+y.y}}function im(e){return Array.from(e.getClientRects())}function sm(e){let t=Rt(e),r=Ho(e),n=e.ownerDocument.body,a=Xt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Xt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+zn(e),l=-r.scrollTop;return rt(n).direction==="rtl"&&(s+=Xt(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var ld=25;function cm(e,t){let r=Fe(e),n=Rt(e),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,f=0;if(a){i=a.width,s=a.height;let m=Tn();(!m||m&&t==="fixed")&&(l=a.offsetLeft,f=a.offsetTop)}let u=zn(n);if(u<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),S=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(n.clientWidth-g.clientWidth-S);C<=ld&&(i-=C)}else u<=ld&&(i+=u);return{width:i,height:s,x:l,y:f}}function lm(e,t){let r=Go(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=wt(e)?Jr(e):mt(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,u=n*i.y;return{width:s,height:l,x:f,y:u}}function dd(e,t,r){let n;if(t==="viewport")n=cm(e,r);else if(t==="document")n=sm(Rt(e));else if(tt(t))n=lm(t,r);else{let a=hd(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return vr(n)}function gd(e,t){let r=$t(e);return r===t||!tt(r)||Er(r)?!1:rt(r).position==="fixed"||gd(r,t)}function dm(e,t){let r=t.get(e);if(r)return r;let n=wn(e,[],!1).filter(l=>tt(l)&&Cr(l)!=="body"),a=null,i=rt(e).position==="fixed",s=i?$t(e):e;for(;tt(s)&&!Er(s);){let l=rt(s),f=Nn(s);!f&&l.position==="fixed"&&(a=null),(i?!f&&!a:!f&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Qr(s)&&!f&&gd(e,s))?n=n.filter(m=>m!==s):a=l,s=$t(s)}return t.set(e,n),n}function fm(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,s=[...r==="clippingAncestors"?$o(t)?[]:dm(t,this._c):[].concat(r),n],l=dd(t,s[0],a),f=l.top,u=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let S=dd(t,s[y],a);f=Xt(S.top,f),u=Bo(S.right,u),m=Bo(S.bottom,m),g=Xt(S.left,g)}return{width:u-g,height:m-f,x:g,y:f}}function um(e){let{width:t,height:r}=ud(e);return{width:t,height:r}}function pm(e,t,r){let n=wt(t),a=Rt(t),i=r==="fixed",s=Go(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=mt(0);function u(){f.x=zn(a)}if(n||!n&&!i)if((Cr(t)!=="body"||Qr(a))&&(l=Ho(t)),n){let S=Go(t,!0,i,t);f.x=S.x+t.clientLeft,f.y=S.y+t.clientTop}else a&&u();i&&!n&&a&&u();let m=a&&!n&&!i?md(a,l):mt(0),g=s.left+l.scrollLeft-f.x-m.x,y=s.top+l.scrollTop-f.y-m.y;return{x:g,y,width:s.width,height:s.height}}function Xi(e){return rt(e).position==="static"}function fd(e,t){if(!wt(e)||rt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Rt(e)===r&&(r=r.ownerDocument.body),r}function yd(e,t){let r=Fe(e);if($o(e))return r;if(!wt(e)){let a=$t(e);for(;a&&!Er(a);){if(tt(a)&&!Xi(a))return a;a=$t(a)}return r}let n=fd(e,t);for(;n&&id(n)&&Xi(n);)n=fd(n,t);return n&&Er(n)&&Xi(n)&&!Nn(n)?r:n||sd(e)||r}var hm=async function(e){let t=this.getOffsetParent||yd,r=this.getDimensions,n=await r(e.floating);return{reference:pm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function mm(e){return rt(e).direction==="rtl"}var Pn={convertOffsetParentRelativeRectToViewportRelativeRect:am,getDocumentElement:Rt,getClippingRect:fm,getOffsetParent:yd,getElementRects:hm,getClientRects:im,getDimensions:um,getScale:Jr,isElement:tt,isRTL:mm};var bd=rd,xd=od;var vd=(e,t,r)=>{let n=new Map,a={platform:Pn,...r},i={...a.platform,_c:n};return td(e,t,{...a,platform:i})};function Sd(e){return gm(e)}function Qi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function gm(e){for(let t=e;t;t=Qi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Qi(e);t;t=Qi(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||r.filter!=="none"||t.tagName==="BODY"))return t}return null}async function Cd(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},vd(e,t,{strategy:n.strategy,platform:{...Pn,getOffsetParent:a=>Pn.getOffsetParent(a,Sd)},middleware:[xd({crossAxis:!0}),bd({allowedPlacements:[n.placement]})]})}var uo=v(P());var Es=v(de());function ym(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!In(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(!In(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=s=>Object.keys(s).filter(l=>s[l]!=null);if(a=i(e),r=a.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let s=a[n];if(!In(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function In(e,t){try{return ym(e,t)}catch{return!1}}function Fo(e,t){return!In(e,t)}function Ed(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function kn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var Ld=v(de(),1);var Ji=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:Fo,attribute:!1,...t};(0,Ld.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:l=>l[n],store:t.store})}};var Dn=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Lr=v(de(),1);var Ad=v(de(),1);function Od(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,Ad.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Fo,...t??{}})}var Bn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var wd=v(X(),1);var Un=globalThis,bm=Un.ShadowRoot&&(Un.ShadyCSS===void 0||Un.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,aS=Symbol();var Rd=(e,t)=>{if(bm)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=Un.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var $n=class extends wd.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Rd(n,t.elementStyles),n}};function _d(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var to=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},zd,Nd=Symbol("constructorPrototype"),Td=Symbol("constructorName"),Pd=Symbol("exportpartsDebouncer"),Md=Symbol("dynamicDependenciesLoaded"),eo=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};eo.eventName="exportparts-updated";var _t=class extends $n{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[zd]=new Bn(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Pd].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Td]=this.constructor.name,this[Nd]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Td]&&Object.setPrototypeOf(this,this[Nd])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[Md]||(r[Md]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(eo.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(eo.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 eo)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=_d(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,l;let f=y=>y!=null&&y.trim().length>0,u=t.filter(f).map(y=>y.trim());if(u.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(_=>_.split(":")[1]))!==null&&l!==void 0?l:[],L=[...S,...C].filter(f).map(_=>_.trim());for(let _ of L)m.add(_)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>u.map(S=>`${y}:${S}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};zd=Pd;to([(0,Lr.property)()],_t.prototype,"exportpartsPrefix",void 0);to([Od([])],_t.prototype,"exportpartsPrefixes",void 0);to([(0,Lr.property)({reflect:!0})],_t.prototype,"exportparts",void 0);to([(0,Lr.property)()],_t.prototype,"customStylesheet",void 0);to([(0,Lr.property)()],_t.prototype,"elementToFocus",void 0);to([(0,Lr.state)()],_t.prototype,"useAdoptedStyleSheets",void 0);function Hn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Wo=Symbol("internalReduxEventsUnsubscribers"),Jt=Symbol("internalStoresUnsubscribers"),Ar=Symbol("internalStores"),xm=kn(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Ar].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ar].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ar].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Ar].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Ar].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Ar].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let u=this.getStore(s.store);u&&(s.store?this[Jt].has(s.store):this[Jt].size>0)&&(this[l]=s.selector(u.getState(),this))}})}subscribeToStore(s,l){var f;this[Jt].set(s,l.subscribe(()=>this.updateFromStores())),this[Wo].set(s,[]),Hn(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||l.name===u.store)){let g=y=>this[m](y);l.addEventListener(u.eventName,g),this[Wo].get(s).push(()=>l.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Jt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Jt].has(s)&&this[Jt].get(s)(),this[Jt].delete(s),(l=this[Wo].get(s))===null||l===void 0||l.forEach(f=>f()),this[Wo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Jt,r=Ar,n=Wo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Id=class extends xm(_t){};function ot(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ht(e){return!!e&&!!e[ue]}function gt(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Rm}(e)||Array.isArray(e)||!!e[Gd]||!!(!((t=e.constructor)===null||t===void 0)&&t[Gd])||cs(e)||ls(e))}function Or(e,t,r){r===void 0&&(r=!1),no(e)===0?(r?Object.keys:oo)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function no(e){var t=e[ue];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:cs(e)?2:ls(e)?3:0}function ro(e,t){return no(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function vm(e,t){return no(e)===2?e.get(t):e[t]}function Fd(e,t,r){var n=no(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Wd(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function cs(e){return Am&&e instanceof Map}function ls(e){return Om&&e instanceof Set}function er(e){return e.o||e.t}function ds(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Kd(e);delete t[ue];for(var r=oo(t),n=0;n<r.length;n++){var a=r[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function fs(e,t){return t===void 0&&(t=!1),us(e)||Ht(e)||!gt(e)||(no(e)>1&&(e.set=e.add=e.clear=e.delete=Sm),Object.freeze(e),t&&Or(e,function(r,n){return fs(n,!0)},!0)),e}function Sm(){ot(2)}function us(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Nt(e){var t=ss[e];return t||ot(18,e),t}function Cm(e,t){ss[e]||(ss[e]=t)}function ns(){return jo}function es(e,t){t&&(Nt("Patches"),e.u=[],e.s=[],e.v=t)}function Gn(e){as(e),e.p.forEach(Em),e.p=null}function as(e){e===jo&&(jo=e.l)}function kd(e){return jo={p:[],l:jo,h:e,m:!0,_:0}}function Em(e){var t=e[ue];t.i===0||t.i===1?t.j():t.g=!0}function ts(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||Nt("ES5").S(t,e,n),n?(r[ue].P&&(Gn(t),ot(4)),gt(e)&&(e=Fn(t,e),t.l||Wn(t,e)),t.u&&Nt("Patches").M(r[ue].t,e,t.u,t.s)):e=Fn(t,r,[]),Gn(t),t.u&&t.v(t.u,t.s),e!==jd?e:void 0}function Fn(e,t,r){if(us(t))return t;var n=t[ue];if(!n)return Or(t,function(l,f){return Dd(e,n,t,l,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Wn(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=ds(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Or(i,function(l,f){return Dd(e,n,a,l,f,r,s)}),Wn(e,a,!1),r&&e.u&&Nt("Patches").N(n,r,e.u,e.s)}return n.o}function Dd(e,t,r,n,a,i,s){if(Ht(a)){var l=Fn(e,a,i&&t&&t.i!==3&&!ro(t.R,n)?i.concat(n):void 0);if(Fd(r,n,l),!Ht(l))return;e.m=!1}else s&&r.add(a);if(gt(a)&&!us(a)){if(!e.h.D&&e._<1)return;Fn(e,a),t&&t.A.l||Wn(e,a)}}function Wn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&fs(t,r)}function rs(e,t){var r=e[ue];return(r?er(r):e)[t]}function Bd(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function tr(e){e.P||(e.P=!0,e.l&&tr(e.l))}function os(e){e.o||(e.o=ds(e.t))}function is(e,t,r){var n=cs(t)?Nt("MapSet").F(t,r):ls(t)?Nt("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:ns(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,u=Ko;s&&(f=[l],u=Vo);var m=Proxy.revocable(f,u),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y}(t,r):Nt("ES5").J(t,r);return(r?r.A:ns()).p.push(n),n}function Lm(e){return Ht(e)||ot(22,e),function t(r){if(!gt(r))return r;var n,a=r[ue],i=no(r);if(a){if(!a.P&&(a.i<4||!Nt("ES5").K(a)))return a.t;a.I=!0,n=Ud(r,i),a.I=!1}else n=Ud(r,i);return Or(n,function(s,l){a&&vm(a.t,s)===l||Fd(n,s,t(l))}),i===3?new Set(n):n}(e)}function Ud(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ds(e)}function Vd(){function e(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var u=this[ue];return Ko.get(u,s)},set:function(u){var m=this[ue];Ko.set(m,s,u)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][ue];if(!f.P)switch(f.i){case 5:n(f)&&tr(f);break;case 4:r(f)&&tr(f)}}}function r(s){for(var l=s.t,f=s.k,u=oo(f),m=u.length-1;m>=0;m--){var g=u[m];if(g!==ue){var y=l[g];if(y===void 0&&!ro(l,g))return!0;var S=f[g],C=S&&S[ue];if(C?C.t!==y:!Wd(S,y))return!0}}var L=!!l[ue];return u.length!==oo(l).length+(L?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var u=0;u<l.length;u++)if(!l.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&ot(3,JSON.stringify(er(s)))}var i={};Cm("ES5",{J:function(s,l){var f=Array.isArray(s),u=function(g,y){if(g){for(var S=Array(y.length),C=0;C<y.length;C++)Object.defineProperty(S,""+C,e(C,!0));return S}var L=Kd(y);delete L[ue];for(var _=oo(L),M=0;M<_.length;M++){var N=_[M];L[N]=e(N,g||!!L[N].enumerable)}return Object.create(Object.getPrototypeOf(y),L)}(f,s),m={i:f?5:4,A:l?l.A:ns(),P:!1,I:!1,R:{},l,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ue,{value:m,writable:!0}),u},S:function(s,l,f){f?Ht(l)&&l[ue].A===s&&t(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var g=m[ue];if(g){var y=g.t,S=g.k,C=g.R,L=g.i;if(L===4)Or(S,function(D){D!==ue&&(y[D]!==void 0||ro(y,D)?C[D]||u(S[D]):(C[D]=!0,tr(g)))}),Or(y,function(D){S[D]!==void 0||ro(S,D)||(C[D]=!1,tr(g))});else if(L===5){if(n(g)&&(tr(g),C.length=!0),S.length<y.length)for(var _=S.length;_<y.length;_++)C[_]=!1;else for(var M=y.length;M<S.length;M++)C[M]=!0;for(var N=Math.min(S.length,y.length),k=0;k<N;k++)S.hasOwnProperty(k)||(C[k]=!0),C[k]===void 0&&u(S[k])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var $d,jo,ps=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Am=typeof Map<"u",Om=typeof Set<"u",Hd=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",jd=ps?Symbol.for("immer-nothing"):(($d={})["immer-nothing"]=!0,$d),Gd=ps?Symbol.for("immer-draftable"):"__$immer_draftable",ue=ps?Symbol.for("immer-state"):"__$immer_state";var Rm=""+Object.prototype.constructor,oo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Kd=Object.getOwnPropertyDescriptors||function(e){var t={};return oo(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},ss={},Ko={get:function(e,t){if(t===ue)return e;var r=er(e);if(!ro(r,t))return function(a,i,s){var l,f=Bd(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!gt(n)?n:n===rs(e.t,t)?(os(e),e.o[t]=is(e.A.h,n,e)):n},has:function(e,t){return t in er(e)},ownKeys:function(e){return Reflect.ownKeys(er(e))},set:function(e,t,r){var n=Bd(er(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=rs(er(e),t),i=a?.[ue];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Wd(r,a)&&(r!==void 0||ro(e.t,t)))return!0;os(e),tr(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return rs(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,os(e),tr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=er(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){ot(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ot(12)}},Vo={};Or(Ko,function(e,t){Vo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Vo.deleteProperty=function(e,t){return Vo.set.call(this,e,t,void 0)},Vo.set=function(e,t,r){return Ko.set.call(this,e[0],t,r,e[0])};var wm=function(){function e(r){var n=this;this.O=Hd,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var f=n;return function(L){var _=this;L===void 0&&(L=l);for(var M=arguments.length,N=Array(M>1?M-1:0),k=1;k<M;k++)N[k-1]=arguments[k];return f.produce(L,function(D){var Y;return(Y=i).call.apply(Y,[_,D].concat(N))})}}var u;if(typeof i!="function"&&ot(6),s!==void 0&&typeof s!="function"&&ot(7),gt(a)){var m=kd(n),g=is(n,a,void 0),y=!0;try{u=i(g),y=!1}finally{y?Gn(m):as(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(L){return es(m,s),ts(L,m)},function(L){throw Gn(m),L}):(es(m,s),ts(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===jd&&(u=void 0),n.D&&fs(u,!0),s){var S=[],C=[];Nt("Patches").M(a,u,S,C),s(S,C)}return u}ot(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(g))})};var s,l,f=n.produce(a,i,function(u,m){s=u,l=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,s,l]}):[f,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){gt(r)||ot(8),Ht(r)&&(r=Lm(r));var n=kd(this),a=is(this,r,void 0);return a[ue].C=!0,as(n),a},t.finishDraft=function(r,n){var a=r&&r[ue],i=a.A;return es(i,n),ts(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Hd&&ot(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=Nt("Patches").$;return Ht(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},e}(),Ze=new wm,_m=Ze.produce,vS=Ze.produceWithPatches.bind(Ze),SS=Ze.setAutoFreeze.bind(Ze),CS=Ze.setUseProxies.bind(Ze),ES=Ze.applyPatches.bind(Ze),LS=Ze.createDraft.bind(Ze),AS=Ze.finishDraft.bind(Ze),Vn=_m;function Rr(e){"@babel/helpers - typeof";return Rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rr(e)}function Zd(e,t){if(Rr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Rr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qd(e){var t=Zd(e,"string");return Rr(t)=="symbol"?t:t+""}function Yd(e,t,r){return(t=qd(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xd(Object(r),!0).forEach(function(n){Yd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function De(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 Qd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ms=function(){return Math.random().toString(36).substring(7).split("").join(".")},jn={INIT:"@@redux/INIT"+ms(),REPLACE:"@@redux/REPLACE"+ms(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ms()}};function Nm(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function gs(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(De(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(De(1));return r(gs)(e,t)}if(typeof e!="function")throw new Error(De(2));var a=e,i=t,s=[],l=s,f=!1;function u(){l===s&&(l=s.slice())}function m(){if(f)throw new Error(De(3));return i}function g(L){if(typeof L!="function")throw new Error(De(4));if(f)throw new Error(De(5));var _=!0;return u(),l.push(L),function(){if(_){if(f)throw new Error(De(6));_=!1,u();var N=l.indexOf(L);l.splice(N,1),s=null}}}function y(L){if(!Nm(L))throw new Error(De(7));if(typeof L.type>"u")throw new Error(De(8));if(f)throw new Error(De(9));try{f=!0,i=a(i,L)}finally{f=!1}for(var _=s=l,M=0;M<_.length;M++){var N=_[M];N()}return L}function S(L){if(typeof L!="function")throw new Error(De(10));a=L,y({type:jn.REPLACE})}function C(){var L,_=g;return L={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(De(11));function k(){N.next&&N.next(m())}k();var D=_(k);return{unsubscribe:D}}},L[Qd]=function(){return this},L}return y({type:jn.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:S},n[Qd]=C,n}function Tm(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:jn.INIT});if(typeof n>"u")throw new Error(De(12));if(typeof r(void 0,{type:jn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(De(13))})}function Jd(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),s,l;try{Tm(r)}catch(f){l=f}return function(u,m){if(u===void 0&&(u={}),l)throw l;if(0)var g;for(var y=!1,S={},C=0;C<i.length;C++){var L=i[C],_=r[L],M=u[L],N=_(M,m);if(typeof N>"u"){var k=m&&m.type;throw new Error(De(14))}S[L]=N,y=y||N!==M}return y=y||i.length!==Object.keys(u).length,y?S:u}}function ao(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function e0(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(De(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=ao.apply(void 0,l)(a.dispatch),hs(hs({},a),{},{dispatch:i})}}}function t0(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var r0=t0();r0.withExtraArgument=t0;var ys=r0;var s0=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mm=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(m){return f([u,m])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},io=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},zm=Object.defineProperty,Pm=Object.defineProperties,Im=Object.getOwnPropertyDescriptors,o0=Object.getOwnPropertySymbols,km=Object.prototype.hasOwnProperty,Dm=Object.prototype.propertyIsEnumerable,n0=function(e,t,r){return t in e?zm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},rr=function(e,t){for(var r in t||(t={}))km.call(t,r)&&n0(e,r,t[r]);if(o0)for(var n=0,a=o0(t);n<a.length;n++){var r=a[n];Dm.call(t,r)&&n0(e,r,t[r])}return e},bs=function(e,t){return Pm(e,Im(t))},Bm=function(e,t,r){return new Promise(function(n,a){var i=function(f){try{l(r.next(f))}catch(u){a(u)}},s=function(f){try{l(r.throw(f))}catch(u){a(u)}},l=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,s)};l((r=r.apply(e,t)).next())})};var Um=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ao:ao.apply(null,arguments)},FS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function $m(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var Hm=function(e){s0(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,io([void 0],r[0].concat(this)))):new(t.bind.apply(t,io([void 0],r.concat(this))))},t}(Array),Gm=function(e){s0(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,io([void 0],r[0].concat(this)))):new(t.bind.apply(t,io([void 0],r.concat(this))))},t}(Array);function Ss(e){return gt(e)?Vn(e,function(){}):e}function Fm(e){return typeof e=="boolean"}function Wm(){return function(t){return Vm(t)}}function Vm(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=new Hm;if(r&&(Fm(r)?l.push(ys):l.push(ys.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return l}var xs=!0;function c0(e){var t=Wm(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?t():i,l=r.devTools,f=l===void 0?!0:l,u=r.preloadedState,m=u===void 0?void 0:u,g=r.enhancers,y=g===void 0?void 0:g,S;if(typeof a=="function")S=a;else if($m(a))S=Jd(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(t),!xs&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!xs&&C.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=e0.apply(void 0,C),_=ao;f&&(_=Um(rr({trace:!xs},typeof f=="object"&&f)));var M=new Gm(L),N=M;Array.isArray(y)?N=io([L],y):typeof y=="function"&&(N=y(M));var k=_.apply(void 0,N);return gs(S,m,k)}function or(e,t){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return rr(rr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function l0(e){var t={},r=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,r,n]}function jm(e){return typeof e=="function"}function Km(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?l0(t):[t,r,n],i=a[0],s=a[1],l=a[2],f;if(jm(e))f=function(){return Ss(e())};else{var u=Ss(e);f=function(){return u}}function m(g,y){g===void 0&&(g=f());var S=io([i[y.type]],s.filter(function(C){var L=C.matcher;return L(y)}).map(function(C){var L=C.reducer;return L}));return S.filter(function(C){return!!C}).length===0&&(S=[l]),S.reduce(function(C,L){if(L)if(Ht(C)){var _=C,M=L(_,y);return M===void 0?C:M}else{if(gt(C))return Vn(C,function(N){return L(N,y)});var M=L(C,y);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},g)}return m.getInitialState=f,m}function Zm(e,t){return e+"/"+t}function d0(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Ss(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=Zm(t,m),S,C;"reducer"in g?(S=g.reducer,C=g.prepare):S=g,i[m]=S,s[y]=S,l[m]=C?or(y,C):or(y)});function f(){var m=typeof e.extraReducers=="function"?l0(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,S=m[1],C=S===void 0?[]:S,L=m[2],_=L===void 0?void 0:L,M=rr(rr({},y),s);return Km(r,function(N){for(var k in M)N.addCase(k,M[k]);for(var D=0,Y=C;D<Y.length;D++){var le=Y[D];N.addMatcher(le.matcher,le.reducer)}_&&N.addDefaultCase(_)})}var u;return{name:t,reducer:function(m,g){return u||(u=f()),u(m,g)},actions:l,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var qm="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ym=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=qm[Math.random()*64|0];return t},Xm=["name","message","stack","code"],vs=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),a0=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Qm=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Xm;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},KS=function(){function e(t,r,n){var a=or(t+"/fulfilled",function(m,g,y,S){return{payload:m,meta:bs(rr({},S||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=or(t+"/pending",function(m,g,y){return{payload:void 0,meta:bs(rr({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=or(t+"/rejected",function(m,g,y,S,C){return{payload:S,error:(n&&n.serializeError||Qm)(m||"Rejected"),meta:bs(rr({},C||{}),{arg:y,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(g,y,S){var C=n?.idGenerator?n.idGenerator(m):Ym(),L=new f,_,M=!1;function N(D){_=D,L.abort()}var k=function(){return Bm(this,null,function(){var D,Y,le,$e,we,vt,_e;return Mm(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),$e=(D=n?.condition)==null?void 0:D.call(n,m,{getState:y,extra:S}),eg($e)?[4,$e]:[3,2];case 1:$e=x.sent(),x.label=2;case 2:if($e===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,we=new Promise(function(E,$){return L.signal.addEventListener("abort",function(){return $({name:"AbortError",message:_||"Aborted"})})}),g(i(C,m,(Y=n?.getPendingMeta)==null?void 0:Y.call(n,{requestId:C,arg:m},{getState:y,extra:S}))),[4,Promise.race([we,Promise.resolve(r(m,{dispatch:g,getState:y,extra:S,requestId:C,signal:L.signal,abort:N,rejectWithValue:function(E,$){return new vs(E,$)},fulfillWithValue:function(E,$){return new a0(E,$)}})).then(function(E){if(E instanceof vs)throw E;return E instanceof a0?a(E.payload,C,m,E.meta):a(E,C,m)})])];case 3:return le=x.sent(),[3,5];case 4:return vt=x.sent(),le=vt instanceof vs?s(null,C,m,vt.payload,vt.meta):s(vt,C,m),[3,5];case 5:return _e=n&&!n.dispatchConditionRejection&&s.match(le)&&le.meta.condition,_e||g(le),[2,le]}})})}();return Object.assign(k,{abort:N,requestId:C,arg:m,unwrap:function(){return k.then(Jm)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Jm(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function eg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var f0="listener",u0="completed",p0="cancelled",ZS="task-"+p0,qS="task-"+u0,YS=f0+"-"+p0,XS=f0+"-"+u0;var Cs="listenerMiddleware";var QS=or(Cs+"/add"),JS=or(Cs+"/removeAll"),eC=or(Cs+"/remove");var i0,tC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(i0||(i0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},tg=function(e){return function(t){setTimeout(t,e)}},rC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tg(10);Vd();var rg=kn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),Kn=class extends rg(Object){};window.ftReduxStores||(window.ftReduxStores={});var h0=class e extends Kn{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Hn(i))return i;if(a==null)return;let s=d0({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=c0({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=Ed(s.getInitialState());for(let g of u.keeping)m[g]=(f??m)[g];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...u.overwrites};return s.reducer(f,u)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Dn;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,u=i[f];return u?(...m)=>{let g=u(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Zn=class{static format(t,r,n,a){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(t,r,n,a)}static getMomentDateFormat(t,r){return t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(i);if(!a)return s;let l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var qn=v(P()),og="ft-app-info",wr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};wr.eventName="authentication-change";var ng={session:(e,t)=>{(0,qn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>I.dispatchEvent(new wr(t.payload)),0))}},I=qn.FtReduxStore.get({name:og,reducers:ng,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var m0=v(P()),Yn=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},NC=(0,m0.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(I)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>Zn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Yn([(0,Es.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Yn([(0,Es.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Yn([Ji({store:I.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),Yn([Ji({store:I.name})],t.prototype,"uiLocale",void 0),t});var ig=v(y0(),1);var b0;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(b0||(b0={}));var x0;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(x0||(x0={}));var v0;(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"})(v0||(v0={}));var S0;(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"})(S0||(S0={}));var C0;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(C0||(C0={}));var E0;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(E0||(E0={}));var L0;(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"})(L0||(L0={}));var A0;(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"})(A0||(A0={}));var O0;(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"})(O0||(O0={}));var R0;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(R0||(R0={}));var w0;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(w0||(w0={}));var _0;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(_0||(_0={}));var N0;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(N0||(N0={}));var T0;(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"})(T0||(T0={}));var M0;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(M0||(M0={}));var z0;(function(e){e.ASC="ASC",e.DESC="DESC"})(z0||(z0={}));var P0;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(P0||(P0={}));var I0;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(I0||(I0={}));var k0;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(k0||(k0={}));var D0;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(D0||(D0={}));var B0;(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"})(B0||(B0={}));var U0;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(U0||(U0={}));var $0;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})($0||($0={}));var H0;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(H0||(H0={}));var G0;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(G0||(G0={}));var Se;(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"})(Se||(Se={}));var nt;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(nt||(nt={}));var F0;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(F0||(F0={}));var W0;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(W0||(W0={}));var V0;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(V0||(V0={}));var j0;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(j0||(j0={}));var K0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(K0||(K0={}));var Z0;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(Z0||(Z0={}));var q0;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(q0||(q0={}));var Y0;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Y0||(Y0={}));var X0;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(X0||(X0={}));var ag={[Se.PERSONAL_BOOK_SHARE_USER]:[Se.PERSONAL_BOOK_USER],[Se.HTML_EXPORT_USER]:[Se.PERSONAL_BOOK_USER],[Se.PDF_EXPORT_USER]:[Se.PERSONAL_BOOK_USER],[Se.KHUB_ADMIN]:[Se.CONTENT_PUBLISHER],[Se.ADMIN]:[Se.KHUB_ADMIN,Se.USERS_ADMIN,Se.PORTAL_ADMIN,Se.BEHAVIOR_DATA_USER],[Se.GENERATIVE_AI_EXPORT_USER]:[Se.GENERATIVE_AI_USER]};function Q0(e,t){return e===t||(ag[e]??[]).some(r=>Q0(r,t))}function J0(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=>Q0(n,t))}var na=v(P());var Ls=v(P());var _r=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=I.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=I.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var Jn=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:_r.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):_r.await()}};var qe=class extends Jn{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Ls.CacheRegistry,this.cache=t?a.commonCache:new Ls.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var ea=class extends qe{async listMySearches(){let{session:t}=I.getState();return J0(t,Se.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var ta=class extends qe{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ra=class extends qe{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=I.getState().session;return!!t?.sessionAuthenticated}};var oa=class extends qe{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=I.getState().session;return!!t?.sessionAuthenticated}};var sg="ft-user-assets",cg={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(nt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:a}=t.payload;Os(e,r,[...As(e,r),a]),e4(e,r,1,n),t4(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Os(e,r,As(e,r).map(a=>a.id===n.id?n:a)),t4(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;Os(e,r,As(e,r).filter(i=>i.id!==a)),e4(e,r,-1,n)}},r4={[nt.SEARCHES]:"savedSearches",[nt.BOOKMARKS]:"bookmarks",[nt.BOOKS]:void 0,[nt.COLLECTIONS]:void 0},As=(e,t)=>{var r;let n=r4[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Os=(e,t,r)=>{let n=r4[t];n&&(e[n]=r)},e4=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===nt.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},t4=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},Ye=na.FtReduxStore.get({name:sg,reducers:cg,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(nt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Rs=class{constructor(t=new ra,r=new oa){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ta,this.savedSearchesService=new ea,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=I.getState();(0,na.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ye.actions.clearAssetCount(),Ye.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ye.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ye.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ye.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ye.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ye.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ye.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ye.getState().assetCounts.bookmarkByMap).length!==0;t===nt.BOOKMARKS&&r&&Ye.actions.clearBookmarkCountByMap(),Ye.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ye.actions.bookmarks(r)}}},lg=new Rs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=lg);var ws=class{addCommand(t,r=!1){I.commands.add(t,r)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ws;var at=v(P());var o4,co=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},dg=Symbol("clearAfterUnitTest"),aa=class extends(0,at.withEventBus)(qe){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[o4]=()=>{this.defaultMessages={},this.cache=new at.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,at.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new at.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof at.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new co({loadedContexts:t})),this.dispatchEvent(new co({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new co({loadedContexts:[t]})),this.dispatchEvent(new co({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,at.delay)(0).then(()=>n()).catch(()=>null)))}};o4=dg;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends aa{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends aa{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var lo=window.FluidTopicsI18nService,ia=window.FluidTopicsCustomI18nService;var n4=v(P()),_s=class{highlightHtml(t,r,n){(0,n4.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new _s;var a4=v(P());var Ns=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=I.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i;if(t==null)return"";try{return a4.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}catch(s){throw console.error(`Date ${JSON.stringify(t)} is not valid`,s),s}}};window.FluidTopicsDateService=new Ns;var i4=v(P());var Zo=class{static get(t,r){var n,a;let i=I.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new i4.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var Ts=class{urlToSearchRequest(t){return Zo.get().parse(t)}searchRequestToUrl(t){return Zo.get().serialize(t)}};window.FluidTopicsUrlService=new Ts;var ar=v(P());var Nr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Nr.eventName="change";var Ms=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},s4=new Ms;var sa=class e extends ar.WithEventBus{static build(){return new e(window.history,s4,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ar.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Nr(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,l])=>{let f=r(),u={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Nr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Nr.eventName,t)}currentItem(){return(0,ar.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,ar.deepCopy)(this.states[this.previousDifferentMajorPosition()])}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,ar.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=sa.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var c4=v(X());var l4=c4.css`
1799
1799
  `;var f4=v(X()),Me=v(de()),yt=v(P());function d4(e,t){let{authenticationRequired:r,session:n}=I.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Le=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},ce=class extends yt.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>_r.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new yt.CacheRegistry,this.cleanSessionDebouncer=new yt.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return f4.html`
1800
1800
  <slot></slot>
1801
1801
  `}connectedCallback(){super.connectedCallback(),I.addEventListener(wr.eventName,this.reloadConfiguration)}disconnectedCallback(){I.addEventListener(wr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,n,a,i,s,l,f;super.update(t),t.has("baseUrl")&&(I.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&I.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&I.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&I.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&I.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&I.actions.noCustom(this.noCustom),t.has("editorMode")&&I.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&I.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&I.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>lo.addContext(u)),t.has("openExternalDocumentInNewTab")&&I.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&I.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&I.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(I.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),I.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),I.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&I.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&I.actions.availableContentLocales((f=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&f!==void 0?f:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>d4(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};ce.elementDefinitions={};ce.styles=l4;Le([(0,Me.property)()],ce.prototype,"baseUrl",void 0);Le([(0,Me.property)()],ce.prototype,"apiIntegrationIdentifier",void 0);Le([(0,Me.property)()],ce.prototype,"apiIntegrationAppVersion",void 0);Le([(0,Me.property)()],ce.prototype,"uiLocale",void 0);Le([(0,yt.jsonProperty)(null)],ce.prototype,"availableUiLocales",void 0);Le([(0,yt.jsonProperty)(null)],ce.prototype,"metadataConfiguration",void 0);Le([(0,Me.property)({type:Boolean})],ce.prototype,"editorMode",void 0);Le([(0,Me.property)({type:Boolean})],ce.prototype,"noCustom",void 0);Le([(0,Me.property)({type:Boolean})],ce.prototype,"openExternalDocumentInNewTab",void 0);Le([(0,Me.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],ce.prototype,"noCustomComponent",void 0);Le([(0,Me.property)({type:Boolean})],ce.prototype,"withManualResources",void 0);Le([(0,Me.property)({type:Boolean})],ce.prototype,"navigatorOnline",void 0);Le([(0,Me.property)({type:Boolean})],ce.prototype,"forcedOffline",void 0);Le([(0,Me.property)({type:Object})],ce.prototype,"apiProvider",void 0);Le([(0,Me.property)({type:Boolean})],ce.prototype,"authenticationRequired",void 0);Le([(0,yt.jsonProperty)([])],ce.prototype,"messageContexts",void 0);Le([(0,yt.jsonProperty)(void 0)],ce.prototype,"session",void 0);Le([(0,Me.state)()],ce.prototype,"localesConfiguration",void 0);Le([(0,Me.state)()],ce.prototype,"availableContentLocales",void 0);var u4=v(P());(0,u4.customElement)("ft-app-context")(ce);var p4=v(de());var zs=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},fo=new zs;var fg=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},Yo=Symbol("i18nAttributes"),h4=Symbol("i18nListAttributes"),m4=Symbol("i18nProperties"),ca=Symbol("i18nContexts"),qo=Symbol("i18nUnsubs"),fa=(0,uo.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?ia:lo}i18n(i){let{context:s,key:l,message:f}=i,{custom:u,args:m,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let y=m??(g?g(this):[]);return this.getI18nService(u).resolveMessage(s,l,...y)}return f}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(fo.isI18nKey(i)){let[l,f]=i.split(".");return this.i18n({custom:!0,context:l,key:f,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,f)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,f)=>{var u;return((u=f?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let f=this,u=(m,g,y)=>y?.context&&y.key&&i(m,g,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...m})}:y;(s=this[Yo])===null||s===void 0||s.forEach((m,g)=>f[g]=u(m,g,f[g])),(l=this[h4])===null||l===void 0||l.forEach((m,g)=>{var y;return f[g]=(y=f[g])===null||y===void 0?void 0:y.map(S=>u(m,g,S))})}updateI18nProperties(i){var s;(s=this[m4])===null||s===void 0||s.forEach((l,f)=>{i(l,f)&&(this[f]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let f=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[ca].set(f,{isCustomContext:l}),this[qo].has(f)||this[qo].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[ca].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ca].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[qo].forEach(i=>i()),this[qo].clear()}}return t=ca,r=qo,fg([(0,p4.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),la=class extends fa(uo.FtLitElement){},da=class extends fa(uo.FtLitElementRedux){};var g4=v(P());var Ps=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?fo.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},ug=new Ps;var y4=(e,t)=>(r,n)=>{var a;r.constructor.createProperty(n,{type:Object,hasChanged:g4.hasChanged,converter:fo,...t}),r[Yo]=(a=r[Yo])!==null&&a!==void 0?a:new Map,r[Yo].set(n,e??{})};var ua=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?ia:lo}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a}),this.attributes=new Proxy({},{get:(n,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var b4=v(X());var x4=b4.css`