@fluid-topics/ft-filter 2.1.14 → 2.1.16

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.
@@ -257,15 +257,15 @@
257
257
  position: relative;
258
258
  word-break: break-word;
259
259
  }
260
- `;var es=["top","right","bottom","left"],Qo=["start","end"],ri=es.reduce((t,e)=>t.concat(e,e+"-"+Qo[0],e+"-"+Qo[1]),[]),Er=Math.min,at=Math.max,Cr=Math.round;var Ne=t=>({x:t,y:t}),Vc={left:"right",right:"left",bottom:"top",top:"bottom"};function ts(t,e,r){return at(t,Er(e,r))}function Jr(t,e){return typeof t=="function"?t(e):t}function Or(t){return t.split("-")[0]}function lt(t){return t.split("-")[1]}function ni(t){return t==="x"?"y":"x"}function ii(t){return t==="y"?"height":"width"}function Zr(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function oi(t){return ni(Zr(t))}function rs(t,e,r){r===void 0&&(r=!1);let n=lt(t),i=oi(t),o=ii(i),s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=ti(s)),[s,ti(s)]}function ns(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function ti(t){let e=Or(t);return Vc[e]+t.slice(e.length)}function zc(t){var e,r,n,i;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(n=t.bottom)!=null?n:0,left:(i=t.left)!=null?i:0}}function is(t){return typeof t!="number"?zc(t):{top:t,right:t,bottom:t,left:t}}function Ot(t){let{x:e,y:r,width:n,height:i}=t;return{width:n,height:i,top:r,left:e,right:e+n,bottom:r+i,x:e,y:r}}function os(t,e,r){let{reference:n,floating:i}=t,o=Zr(e),s=oi(e),a=ii(s),l=Or(e),c=o==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2,h;switch(l){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-i.width,y:d};break;default:h={x:n.x,y:n.y}}let m=lt(e);return m&&(h[s]+=p*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function ss(t,e){var r;e===void 0&&(e={});let{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Jr(e,t),m=is(h),x=a[p?d==="floating"?"reference":"floating":d],A=Ot(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),S=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),w=await(o.isElement==null?void 0:o.isElement(C))&&await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1},q=Ot(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:C,strategy:l}):S);return{top:(A.top-q.top+m.top)/w.y,bottom:(q.bottom-A.bottom+m.bottom)/w.y,left:(A.left-q.left+m.left)/w.x,right:(q.right-A.right+m.right)/w.x}}var Wc=50,as=async(t,e,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:ss},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=os(c,n,l),p=n,h=0,m={};for(let v=0;v<o.length;v++){let x=o[v];if(!x)continue;let{name:A,fn:S}=x,{x:C,y:w,data:q,reset:V}=await S({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:e}});u=C??u,d=w??d,m[A]={...m[A],...q},V&&h<Wc&&(h++,typeof V=="object"&&(V.placement&&(p=V.placement),V.rects&&(c=V.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):V.rects),{x:u,y:d}=os(c,p,l)),v=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:m}};function Kc(t,e,r){return(t?[...r.filter(i=>lt(i)===t),...r.filter(i=>lt(i)!==t)]:r.filter(i=>Or(i)===i)).filter(i=>t?lt(i)===t||(e?ns(i)!==i:!1):!0)}var ls=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,n,i;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:p=ri,autoAlignment:h=!0,...m}=Jr(t,e),v=d!==void 0||p===ri?Kc(d||null,h,p):p,x=((r=s.autoPlacement)==null?void 0:r.index)||0,A=v[x];if(A==null)return{};if(a!==A)return{reset:{placement:v[0]}};let S=await l.detectOverflow(e,m),C=rs(A,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),w=[S[Or(A)],S[C[0]],S[C[1]]],q=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:A,overflows:w}],V=v[x+1];if(V)return{data:{index:x+1,overflows:q},reset:{placement:V}};let nt=q.map(he=>{let Ee=lt(he.placement);return[he.placement,Ee&&u?he.overflows.slice(0,2).reduce((me,At)=>me+At,0):he.overflows[0],he.overflows]}).sort((he,Ee)=>he[1]-Ee[1]),it=((i=nt.filter(he=>he[2].slice(0,lt(he[0])?2:3).every(Ee=>Ee<=0))[0])==null?void 0:i[0])||nt[0][0];return it!==a?{data:{index:x+1,overflows:q},reset:{placement:it}}:{}}}};var cs=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:n,placement:i,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:S=>{let{x:C,y:w}=S;return{x:C,y:w}}},...c}=Jr(t,e),u={x:r,y:n},d=await o.detectOverflow(e,c),p=Zr(i),h=ni(p),m=u[h],v=u[p],x=(S,C)=>ts(C+d[S==="y"?"top":"left"],C,C-d[S==="y"?"bottom":"right"]);s&&(m=x(h,m)),a&&(v=x(p,v));let A=l.fn({...e,[h]:m,[p]:v});return{...A,data:{x:A.x-r,y:A.y-n,enabled:{[h]:s,[p]:a}}}}}};function en(){return typeof window<"u"}function Tt(t){return ds(t)?(t.nodeName||"").toLowerCase():"#document"}function de(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ke(t){var e;return(e=(ds(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ds(t){return en()?t instanceof Node||t instanceof de(t).Node:!1}function Oe(t){return en()?t instanceof Element||t instanceof de(t).Element:!1}function Ge(t){return en()?t instanceof HTMLElement||t instanceof de(t).HTMLElement:!1}function us(t){return!en()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof de(t).ShadowRoot}function tr(t){let{overflow:e,overflowX:r,overflowY:n,display:i}=we(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&i!=="inline"&&i!=="contents"}function ps(t){return/^(table|td|th)$/.test(Tt(t))}function wr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Gc=/transform|translate|scale|rotate|perspective|filter/,qc=/paint|layout|strict|content/,wt=t=>!!t&&t!=="none",si;function rr(t){let e=Oe(t)?we(t):t;return wt(e.transform)||wt(e.translate)||wt(e.scale)||wt(e.rotate)||wt(e.perspective)||!tn()&&(wt(e.backdropFilter)||wt(e.filter))||Gc.test(e.willChange||"")||qc.test(e.contain||"")}function fs(t){let e=Qe(t);for(;Ge(e)&&!_t(e);){if(rr(e))return e;if(wr(e))return null;e=Qe(e)}return null}function tn(){return si==null&&(si=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),si}function _t(t){return/^(html|body|#document)$/.test(Tt(t))}function we(t){return de(t).getComputedStyle(t)}function Tr(t){return Oe(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Qe(t){if(Tt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||us(t)&&t.host||Ke(t);return us(e)?e.host:e}function hs(t){let e=Qe(t);return _t(e)?(t.ownerDocument||t).body:Ge(e)&&tr(e)?e:hs(e)}function Qr(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);let i=hs(t),o=i===((n=t.ownerDocument)==null?void 0:n.body),s=de(i);if(o){let a=rn(s);return e.concat(s,s.visualViewport||[],tr(i)?i:[],a&&r?Qr(a):[])}else return e.concat(i,Qr(i,[],r))}function rn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function gs(t){let e=we(t),r=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=Ge(t),o=i?t.offsetWidth:r,s=i?t.offsetHeight:n,a=Cr(r)!==o||Cr(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function bs(t){return Oe(t)?t:t.contextElement}function nr(t){let e=bs(t);if(!Ge(e))return Ne(1);let r=e.getBoundingClientRect(),{width:n,height:i,$:o}=gs(e),s=(o?Cr(r.width):r.width)/n,a=(o?Cr(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Yc=Ne(0);function xs(t){let e=de(t);return!tn()||!e.visualViewport?Yc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Xc(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==de(t)?!1:e}function _r(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let i=t.getBoundingClientRect(),o=bs(t),s=Ne(1);e&&(n?Oe(n)&&(s=nr(n)):s=nr(t));let a=Xc(o,r,n)?xs(o):Ne(0),l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){let p=de(o),h=n&&Oe(n)?de(n):n,m=p,v=rn(m);for(;v&&n&&h!==m;){let x=nr(v),A=v.getBoundingClientRect(),S=we(v),C=A.left+(v.clientLeft+parseFloat(S.paddingLeft))*x.x,w=A.top+(v.clientTop+parseFloat(S.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=C,c+=w,m=de(v),v=rn(m)}}return Ot({width:u,height:d,x:l,y:c})}function nn(t,e){let r=Tr(t).scrollLeft;return e?e.left+r:_r(Ke(t)).left+r}function As(t,e){let r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-nn(t,r),i=r.top+e.scrollTop;return{x:n,y:i}}function Jc(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t,o=i==="fixed",s=Ke(n),a=e?wr(e.floating):!1;if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Ne(1),u=Ne(0),d=Ge(n);if((d||!d&&!o)&&((Tt(n)!=="body"||tr(s))&&(l=Tr(n)),d)){let h=_r(n);c=nr(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}let p=s&&!d&&!o?As(s,l):Ne(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function Zc(t){return Array.from(t.getClientRects())}function Qc(t){let e=Ke(t),r=Tr(t),n=t.ownerDocument.body,i=at(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=at(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+nn(t),a=-r.scrollTop;return we(n).direction==="rtl"&&(s+=at(e.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:a}}var ms=25;function eu(t,e){let r=de(t),n=Ke(t),i=r.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;let u=tn();(!u||u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}let c=nn(n);if(c<=0){let u=n.ownerDocument,d=u.body,p=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(n.clientWidth-d.clientWidth-h);m<=ms&&(o-=m)}else c<=ms&&(o+=c);return{width:o,height:s,x:a,y:l}}function tu(t,e){let r=_r(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,o=Ge(t)?nr(t):Ne(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,c=n*o.y;return{width:s,height:a,x:l,y:c}}function vs(t,e,r){let n;if(e==="viewport")n=eu(t,r);else if(e==="document")n=Qc(Ke(t));else if(Oe(e))n=tu(e,r);else{let i=xs(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ot(n)}function Ss(t,e){let r=Qe(t);return r===e||!Oe(r)||_t(r)?!1:we(r).position==="fixed"||Ss(r,e)}function ru(t,e){let r=e.get(t);if(r)return r;let n=Qr(t,[],!1).filter(a=>Oe(a)&&Tt(a)!=="body"),i=null,o=we(t).position==="fixed",s=o?Qe(t):t;for(;Oe(s)&&!_t(s);){let a=we(s),l=rr(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||tr(s)&&!l&&Ss(t,s))?n=n.filter(u=>u!==s):i=a,s=Qe(s)}return e.set(t,n),n}function nu(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t,s=[...r==="clippingAncestors"?wr(e)?[]:ru(e,this._c):[].concat(r),n],a=vs(e,s[0],i),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let h=vs(e,s[p],i);l=at(h.top,l),c=Er(h.right,c),u=Er(h.bottom,u),d=at(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function iu(t){let{width:e,height:r}=gs(t);return{width:e,height:r}}function ou(t,e,r){let n=Ge(e),i=Ke(e),o=r==="fixed",s=_r(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Ne(0);function c(){l.x=nn(i)}if(n||!n&&!o)if((Tt(e)!=="body"||tr(i))&&(a=Tr(e)),n){let h=_r(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&c();o&&!n&&i&&c();let u=i&&!n&&!o?As(i,a):Ne(0),d=s.left+a.scrollLeft-l.x-u.x,p=s.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:s.width,height:s.height}}function ai(t){return we(t).position==="static"}function ys(t,e){if(!Ge(t)||we(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ke(t)===r&&(r=r.ownerDocument.body),r}function Es(t,e){let r=de(t);if(wr(t))return r;if(!Ge(t)){let i=Qe(t);for(;i&&!_t(i);){if(Oe(i)&&!ai(i))return i;i=Qe(i)}return r}let n=ys(t,e);for(;n&&ps(n)&&ai(n);)n=ys(n,e);return n&&_t(n)&&ai(n)&&!rr(n)?r:n||fs(t)||r}var su=async function(t){let e=this.getOffsetParent||Es,r=this.getDimensions,n=await r(t.floating);return{reference:ou(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function au(t){return we(t).direction==="rtl"}var on={convertOffsetParentRelativeRectToViewportRelativeRect:Jc,getDocumentElement:Ke,getClippingRect:nu,getOffsetParent:Es,getElementRects:su,getClientRects:Zc,getDimensions:iu,getScale:nr,isElement:Oe,isRTL:au};var Cs=ls,Os=cs;var ws=(t,e,r)=>{let n=new Map,i={platform:on,...r},o={...i.platform,_c:n};return as(t,e,{...i,platform:o})};function Ts(t){return lu(t)}function li(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function lu(t){for(let e=t;e;e=li(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=li(t);e;e=li(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||rr(r)||e.tagName==="BODY"))return e}return null}async function _s(t,e,r){let n;return typeof r=="object"?n=r:n={placement:r},ws(t,e,{strategy:n.strategy,platform:{...on,getOffsetParent:i=>on.getOffsetParent(i,Ts)},middleware:[Os({crossAxis:!0}),Cs({allowedPlacements:[n.placement]})]})}var mr=f(E());var Ni=f(z());var Rs=f(z(),1);var ci=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Ls(t,e){return(0,Rs.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Rr(t);try{return JSON.parse(r)}catch{return Rr(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Lr,...e??{}})}function cu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!sn(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!sn(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let i=s=>Object.keys(s).filter(a=>s[a]!=null),o=i(t);if(r=o.length,r!==i(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[n]))return!1;for(n=r;n--!==0;){let s=o[n];if(!sn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function sn(t,e){try{return cu(t,e)}catch{return!1}}function Lr(t,e){return!sn(t,e)}function Rr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function an(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let i=e(n);return i[t]=!0,i}}var Ps=f(z(),1);var ui=t=>{let e=t??{};return(r,n)=>{var i;let o={hasChanged:Lr,attribute:!1,...e};(0,Ps.property)(o)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:(a=>a[n]),store:e.store})}};var ln=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var Rt=f(z(),1);var cn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(a){i(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Ds=f(L(),1);var un=globalThis,uu=un.ShadowRoot&&(un.ShadyCSS===void 0||un.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ks=(t,e)=>{if(uu)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),i=un.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}};var dn=class extends Ds.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return ks(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){ci(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Ns(t,e,...r){var n;let i=t.querySelector(e);for(let o of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(o);return i}var or=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Us,Is=Symbol("constructorPrototype"),Ms=Symbol("constructorName"),Bs=Symbol("exportpartsDebouncer"),$s=Symbol("dynamicDependenciesLoaded"),ir=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};ir.eventName="exportparts-updated";var qe=class extends dn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Us]=new cn(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Bs].run(()=>{var i,o;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Ms]=this.constructor.name,this[Is]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ms]&&Object.setPrototypeOf(this,this[Is])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[$s]||(r[$s]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(ir.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(ir.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new ir)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let o=[...i??[],n];r=Ns(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,n,i,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let h=(o=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],v=[...h,...m].filter(l).map(x=>x.trim());for(let x of v)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(h=>`${p}:${h}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};Us=Bs;or([(0,Rt.property)()],qe.prototype,"exportpartsPrefix",void 0);or([Ls([])],qe.prototype,"exportpartsPrefixes",void 0);or([(0,Rt.property)({reflect:!0})],qe.prototype,"exportparts",void 0);or([(0,Rt.property)()],qe.prototype,"customStylesheet",void 0);or([(0,Rt.property)()],qe.prototype,"elementToFocus",void 0);or([(0,Rt.state)()],qe.prototype,"useAdoptedStyleSheets",void 0);function pn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Pr=Symbol("internalReduxEventsUnsubscribers"),ct=Symbol("internalStoresUnsubscribers"),Lt=Symbol("internalStores"),du=an(Symbol("withRedux"),function(t){var e,r,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Lt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Lt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Lt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Lt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Lt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Lt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[ct].has(s.store):this[ct].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[ct].set(s,a.subscribe(()=>this.updateFromStores())),this[Pr].set(s,[]),pn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[Pr].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ct].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[ct].has(s)&&this[ct].get(s)(),this[ct].delete(s),(a=this[Pr].get(s))===null||a===void 0||a.forEach(l=>l()),this[Pr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=ct,r=Lt,n=Pr,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Hs=class extends du(qe){};function Te(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,o;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function et(t){return!!t&&!!t[U]}function Ie(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===bu})(t)||Array.isArray(t)||!!t[Gs]||!!(!((e=t.constructor)===null||e===void 0)&&e[Gs])||bi(t)||xi(t))}function Pt(t,e,r){r===void 0&&(r=!1),lr(t)===0?(r?Object.keys:ar)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,i){return e(i,n,t)}))}function lr(t){var e=t[U];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:bi(t)?2:xi(t)?3:0}function sr(t,e){return lr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function pu(t,e){return lr(t)===2?t.get(e):t[e]}function qs(t,e,r){var n=lr(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function Ys(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function bi(t){return yu&&t instanceof Map}function xi(t){return gu&&t instanceof Set}function ut(t){return t.o||t.t}function Ai(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Zs(t);delete e[U];for(var r=ar(e),n=0;n<r.length;n++){var i=r[n],o=e[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Si(t,e){return e===void 0&&(e=!1),Ei(t)||et(t)||!Ie(t)||(lr(t)>1&&(t.set=t.add=t.clear=t.delete=fu),Object.freeze(t),e&&Pt(t,(function(r,n){return Si(n,!0)}),!0)),t}function fu(){Te(2)}function Ei(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ye(t){var e=gi[t];return e||Te(18,t),e}function hu(t,e){gi[t]||(gi[t]=e)}function mi(){return Dr}function di(t,e){e&&(Ye("Patches"),t.u=[],t.s=[],t.v=e)}function fn(t){vi(t),t.p.forEach(mu),t.p=null}function vi(t){t===Dr&&(Dr=t.l)}function js(t){return Dr={p:[],l:Dr,h:t,m:!0,_:0}}function mu(t){var e=t[U];e.i===0||e.i===1?e.j():e.g=!0}function pi(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||Ye("ES5").S(e,t,n),n?(r[U].P&&(fn(e),Te(4)),Ie(t)&&(t=hn(e,t),e.l||mn(e,t)),e.u&&Ye("Patches").M(r[U].t,t,e.u,e.s)):t=hn(e,r,[]),fn(e),e.u&&e.v(e.u,e.s),t!==Js?t:void 0}function hn(t,e,r){if(Ei(e))return e;var n=e[U];if(!n)return Pt(e,(function(a,l){return Fs(t,n,e,a,l,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return mn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Ai(n.k):n.o,o=i,s=!1;n.i===3&&(o=new Set(i),i.clear(),s=!0),Pt(o,(function(a,l){return Fs(t,n,i,a,l,r,s)})),mn(t,i,!1),r&&t.u&&Ye("Patches").N(n,r,t.u,t.s)}return n.o}function Fs(t,e,r,n,i,o,s){if(et(i)){var a=hn(t,i,o&&e&&e.i!==3&&!sr(e.R,n)?o.concat(n):void 0);if(qs(r,n,a),!et(a))return;t.m=!1}else s&&r.add(i);if(Ie(i)&&!Ei(i)){if(!t.h.D&&t._<1)return;hn(t,i),e&&e.A.l||mn(t,i)}}function mn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Si(e,r)}function fi(t,e){var r=t[U];return(r?ut(r):t)[e]}function Vs(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function dt(t){t.P||(t.P=!0,t.l&&dt(t.l))}function hi(t){t.o||(t.o=Ai(t.t))}function yi(t,e,r){var n=bi(e)?Ye("MapSet").F(e,r):xi(e)?Ye("MapSet").T(e,r):t.O?(function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:mi(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=Nr;s&&(l=[a],c=kr);var u=Proxy.revocable(l,c),d=u.revoke,p=u.proxy;return a.k=p,a.j=d,p})(e,r):Ye("ES5").J(e,r);return(r?r.A:mi()).p.push(n),n}function vu(t){return et(t)||Te(22,t),(function e(r){if(!Ie(r))return r;var n,i=r[U],o=lr(r);if(i){if(!i.P&&(i.i<4||!Ye("ES5").K(i)))return i.t;i.I=!0,n=zs(r,o),i.I=!1}else n=zs(r,o);return Pt(n,(function(s,a){i&&pu(i.t,s)===a||qs(n,s,e(a))})),o===3?new Set(n):n})(t)}function zs(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ai(t)}function Xs(){function t(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[U];return Nr.get(c,s)},set:function(c){var u=this[U];Nr.set(u,s,c)}},l}function e(s){for(var a=s.length-1;a>=0;a--){var l=s[a][U];if(!l.P)switch(l.i){case 5:n(l)&&dt(l);break;case 4:r(l)&&dt(l)}}}function r(s){for(var a=s.t,l=s.k,c=ar(l),u=c.length-1;u>=0;u--){var d=c[u];if(d!==U){var p=a[d];if(p===void 0&&!sr(a,d))return!0;var h=l[d],m=h&&h[U];if(m?m.t!==p:!Ys(h,p))return!0}}var v=!!a[U];return c.length!==ar(a).length+(v?0:1)}function n(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function i(s){s.g&&Te(3,JSON.stringify(ut(s)))}var o={};hu("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(d,p){if(d){for(var h=Array(p.length),m=0;m<p.length;m++)Object.defineProperty(h,""+m,t(m,!0));return h}var v=Zs(p);delete v[U];for(var x=ar(v),A=0;A<x.length;A++){var S=x[A];v[S]=t(S,d||!!v[S].enumerable)}return Object.create(Object.getPrototypeOf(p),v)})(l,s),u={i:l?5:4,A:a?a.A:mi(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,U,{value:u,writable:!0}),c},S:function(s,a,l){l?et(a)&&a[U].A===s&&e(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var d=u[U];if(d){var p=d.t,h=d.k,m=d.R,v=d.i;if(v===4)Pt(h,(function(w){w!==U&&(p[w]!==void 0||sr(p,w)?m[w]||c(h[w]):(m[w]=!0,dt(d)))})),Pt(p,(function(w){h[w]!==void 0||sr(h,w)||(m[w]=!1,dt(d))}));else if(v===5){if(n(d)&&(dt(d),m.length=!0),h.length<p.length)for(var x=h.length;x<p.length;x++)m[x]=!1;else for(var A=p.length;A<h.length;A++)m[A]=!0;for(var S=Math.min(h.length,p.length),C=0;C<S;C++)h.hasOwnProperty(C)||(m[C]=!0),m[C]===void 0&&c(h[C])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var Ws,Dr,Ci=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yu=typeof Map<"u",gu=typeof Set<"u",Ks=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Js=Ci?Symbol.for("immer-nothing"):((Ws={})["immer-nothing"]=!0,Ws),Gs=Ci?Symbol.for("immer-draftable"):"__$immer_draftable",U=Ci?Symbol.for("immer-state"):"__$immer_state";var bu=""+Object.prototype.constructor,ar=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Zs=Object.getOwnPropertyDescriptors||function(t){var e={};return ar(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},gi={},Nr={get:function(t,e){if(e===U)return t;var r=ut(t);if(!sr(r,e))return(function(i,o,s){var a,l=Vs(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(i.k):void 0})(t,r,e);var n=r[e];return t.I||!Ie(n)?n:n===fi(t.t,e)?(hi(t),t.o[e]=yi(t.A.h,n,t)):n},has:function(t,e){return e in ut(t)},ownKeys:function(t){return Reflect.ownKeys(ut(t))},set:function(t,e,r){var n=Vs(ut(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var i=fi(ut(t),e),o=i?.[U];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Ys(r,i)&&(r!==void 0||sr(t.t,e)))return!0;hi(t),dt(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return fi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,hi(t),dt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=ut(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Te(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Te(12)}},kr={};Pt(Nr,(function(t,e){kr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),kr.deleteProperty=function(t,e){return kr.set.call(this,t,e,void 0)},kr.set=function(t,e,r){return Nr.set.call(this,t[0],e,r,t[0])};var xu=(function(){function t(r){var n=this;this.O=Ks,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var l=n;return function(v){var x=this;v===void 0&&(v=a);for(var A=arguments.length,S=Array(A>1?A-1:0),C=1;C<A;C++)S[C-1]=arguments[C];return l.produce(v,(function(w){var q;return(q=o).call.apply(q,[x,w].concat(S))}))}}var c;if(typeof o!="function"&&Te(6),s!==void 0&&typeof s!="function"&&Te(7),Ie(i)){var u=js(n),d=yi(n,i,void 0),p=!0;try{c=o(d),p=!1}finally{p?fn(u):vi(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(v){return di(u,s),pi(v,u)}),(function(v){throw fn(u),v})):(di(u,s),pi(c,u))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===Js&&(c=void 0),n.D&&Si(c,!0),s){var h=[],m=[];Ye("Patches").M(i,c,h,m),s(h,m)}return c}Te(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];return n.produceWithPatches(c,(function(h){return i.apply(void 0,[h].concat(d))}))};var s,a,l=n.produce(i,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Ie(r)||Te(8),et(r)&&(r=vu(r));var n=js(this),i=yi(this,r,void 0);return i[U].C=!0,vi(n),i},e.finishDraft=function(r,n){var i=r&&r[U],o=i.A;return di(o,n),pi(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Ks&&Te(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var s=Ye("Patches").$;return et(r)?s(r,n):this.produce(r,(function(a){return s(a,n)}))},t})(),ye=new xu,Au=ye.produce,jp=ye.produceWithPatches.bind(ye),Fp=ye.setAutoFreeze.bind(ye),Vp=ye.setUseProxies.bind(ye),zp=ye.applyPatches.bind(ye),Wp=ye.createDraft.bind(ye),Kp=ye.finishDraft.bind(ye),vn=Au;function kt(t){"@babel/helpers - typeof";return kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(t)}function Qs(t,e){if(kt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(kt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ea(t){var e=Qs(t,"string");return kt(e)=="symbol"?e:e+""}function ta(t,e,r){return(e=ea(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ra(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Oi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ra(Object(r),!0).forEach(function(n){ta(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ra(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ie(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var na=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),wi=function(){return Math.random().toString(36).substring(7).split("").join(".")},yn={INIT:"@@redux/INIT"+wi(),REPLACE:"@@redux/REPLACE"+wi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+wi()}};function Su(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ti(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ie(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ie(1));return r(Ti)(t,e)}if(typeof t!="function")throw new Error(ie(2));var i=t,o=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(ie(3));return o}function d(v){if(typeof v!="function")throw new Error(ie(4));if(l)throw new Error(ie(5));var x=!0;return c(),a.push(v),function(){if(x){if(l)throw new Error(ie(6));x=!1,c();var S=a.indexOf(v);a.splice(S,1),s=null}}}function p(v){if(!Su(v))throw new Error(ie(7));if(typeof v.type>"u")throw new Error(ie(8));if(l)throw new Error(ie(9));try{l=!0,o=i(o,v)}finally{l=!1}for(var x=s=a,A=0;A<x.length;A++){var S=x[A];S()}return v}function h(v){if(typeof v!="function")throw new Error(ie(10));i=v,p({type:yn.REPLACE})}function m(){var v,x=d;return v={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(ie(11));function C(){S.next&&S.next(u())}C();var w=x(C);return{unsubscribe:w}}},v[na]=function(){return this},v}return p({type:yn.INIT}),n={dispatch:p,subscribe:d,getState:u,replaceReducer:h},n[na]=m,n}function Eu(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:yn.INIT});if(typeof n>"u")throw new Error(ie(12));if(typeof r(void 0,{type:yn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ie(13))})}function ia(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var o=Object.keys(r),s,a;try{Eu(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var d;for(var p=!1,h={},m=0;m<o.length;m++){var v=o[m],x=r[v],A=c[v],S=x(A,u);if(typeof S>"u"){var C=u&&u.type;throw new Error(ie(14))}h[v]=S,p=p||S!==A}return p=p||o.length!==Object.keys(c).length,p?h:c}}function cr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function oa(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),o=function(){throw new Error(ie(15))},s={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=e.map(function(l){return l(s)});return o=cr.apply(void 0,a)(i.dispatch),Oi(Oi({},i),{},{dispatch:o})}}}function sa(t){var e=function(n){var i=n.dispatch,o=n.getState;return function(s){return function(a){return typeof a=="function"?a(i,o,t):s(a)}}};return e}var aa=sa();aa.withExtraArgument=sa;var _i=aa;var pa=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Cu=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ur=function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},Ou=Object.defineProperty,wu=Object.defineProperties,Tu=Object.getOwnPropertyDescriptors,la=Object.getOwnPropertySymbols,_u=Object.prototype.hasOwnProperty,Ru=Object.prototype.propertyIsEnumerable,ca=function(t,e,r){return e in t?Ou(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},pt=function(t,e){for(var r in e||(e={}))_u.call(e,r)&&ca(t,r,e[r]);if(la)for(var n=0,i=la(e);n<i.length;n++){var r=i[n];Ru.call(e,r)&&ca(t,r,e[r])}return t},Ri=function(t,e){return wu(t,Tu(e))},Lu=function(t,e,r){return new Promise(function(n,i){var o=function(l){try{a(r.next(l))}catch(c){i(c)}},s=function(l){try{a(r.throw(l))}catch(c){i(c)}},a=function(l){return l.done?n(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(t,e)).next())})};var Pu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?cr:cr.apply(null,arguments)},df=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function ku(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function ft(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var o=e.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return pt(pt({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}var Du=(function(t){pa(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.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(e.bind.apply(e,ur([void 0],r[0].concat(this)))):new(e.bind.apply(e,ur([void 0],r.concat(this))))},e})(Array),Nu=(function(t){pa(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.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(e.bind.apply(e,ur([void 0],r[0].concat(this)))):new(e.bind.apply(e,ur([void 0],r.concat(this))))},e})(Array);function ki(t){return Ie(t)?vn(t,function(){}):t}function Iu(t){return typeof t=="boolean"}function Mu(){return function(e){return $u(e)}}function $u(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,o=t.serializableCheck,s=o===void 0?!0:o,a=t.actionCreatorCheck,l=a===void 0?!0:a,c=new Du;if(r&&(Iu(r)?c.push(_i):c.push(_i.withExtraArgument(r.extraArgument))),0){if(i)var u;if(s)var d;if(l)var p}return c}var Li=!0;function fa(t){var e=Mu(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,o=r.middleware,s=o===void 0?e():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,d=r.enhancers,p=d===void 0?void 0:d,h;if(typeof i=="function")h=i;else if(ku(i))h=ia(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(e),!Li&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Li&&m.some(function(w){return typeof w!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=oa.apply(void 0,m),x=cr;l&&(x=Pu(pt({trace:!Li},typeof l=="object"&&l)));var A=new Nu(v),S=A;Array.isArray(p)?S=ur([v],p):typeof p=="function"&&(S=p(A));var C=x.apply(void 0,S);return Ti(h,u,C)}function ha(t){var e={},r=[],n,i={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[a]=s,i},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase:function(o){return n=o,i}};return t(i),[e,r,n]}function Uu(t){return typeof t=="function"}function Bu(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?ha(e):[e,r,n],o=i[0],s=i[1],a=i[2],l;if(Uu(t))l=function(){return ki(t())};else{var c=ki(t);l=function(){return c}}function u(d,p){d===void 0&&(d=l());var h=ur([o[p.type]],s.filter(function(m){var v=m.matcher;return v(p)}).map(function(m){var v=m.reducer;return v}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,v){if(v)if(et(m)){var x=m,A=v(x,p);return A===void 0?m:A}else{if(Ie(m))return vn(m,function(S){return v(S,p)});var A=v(m,p);if(A===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return m},d)}return u.getInitialState=l,u}function Hu(t,e){return t+"/"+e}function ma(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:ki(t.initialState),n=t.reducers||{},i=Object.keys(n),o={},s={},a={};i.forEach(function(u){var d=n[u],p=Hu(e,u),h,m;"reducer"in d?(h=d.reducer,m=d.prepare):h=d,o[u]=h,s[p]=h,a[u]=m?ft(p,m):ft(p)});function l(){var u=typeof t.extraReducers=="function"?ha(t.extraReducers):[t.extraReducers],d=u[0],p=d===void 0?{}:d,h=u[1],m=h===void 0?[]:h,v=u[2],x=v===void 0?void 0:v,A=pt(pt({},p),s);return Bu(r,function(S){for(var C in A)S.addCase(C,A[C]);for(var w=0,q=m;w<q.length;w++){var V=q[w];S.addMatcher(V.matcher,V.reducer)}x&&S.addDefaultCase(x)})}var c;return{name:e,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var ju="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Fu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=ju[Math.random()*64|0];return e},Vu=["name","message","stack","code"],Pi=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),ua=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),zu=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=Vu;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},mf=(function(){function t(e,r,n){var i=ft(e+"/fulfilled",function(u,d,p,h){return{payload:u,meta:Ri(pt({},h||{}),{arg:p,requestId:d,requestStatus:"fulfilled"})}}),o=ft(e+"/pending",function(u,d,p){return{payload:void 0,meta:Ri(pt({},p||{}),{arg:d,requestId:u,requestStatus:"pending"})}}),s=ft(e+"/rejected",function(u,d,p,h,m){return{payload:h,error:(n&&n.serializeError||zu)(u||"Rejected"),meta:Ri(pt({},m||{}),{arg:p,requestId:d,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(d,p,h){var m=n?.idGenerator?n.idGenerator(u):Fu(),v=new l,x,A=!1;function S(w){x=w,v.abort()}var C=(function(){return Lu(this,null,function(){var w,q,V,nt,jn,it,he;return Cu(this,function(Ee){switch(Ee.label){case 0:return Ee.trys.push([0,4,,5]),nt=(w=n?.condition)==null?void 0:w.call(n,u,{getState:p,extra:h}),Ku(nt)?[4,nt]:[3,2];case 1:nt=Ee.sent(),Ee.label=2;case 2:if(nt===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,jn=new Promise(function(me,At){return v.signal.addEventListener("abort",function(){return At({name:"AbortError",message:x||"Aborted"})})}),d(o(m,u,(q=n?.getPendingMeta)==null?void 0:q.call(n,{requestId:m,arg:u},{getState:p,extra:h}))),[4,Promise.race([jn,Promise.resolve(r(u,{dispatch:d,getState:p,extra:h,requestId:m,signal:v.signal,abort:S,rejectWithValue:function(me,At){return new Pi(me,At)},fulfillWithValue:function(me,At){return new ua(me,At)}})).then(function(me){if(me instanceof Pi)throw me;return me instanceof ua?i(me.payload,m,u,me.meta):i(me,m,u)})])];case 3:return V=Ee.sent(),[3,5];case 4:return it=Ee.sent(),V=it instanceof Pi?s(null,m,u,it.payload,it.meta):s(it,m,u),[3,5];case 5:return he=n&&!n.dispatchConditionRejection&&s.match(V)&&V.meta.condition,he||d(V),[2,V]}})})})();return Object.assign(C,{abort:S,requestId:m,arg:u,unwrap:function(){return C.then(Wu)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t})();function Wu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ku(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var va="listener",ya="completed",ga="cancelled",vf="task-"+ga,yf="task-"+ya,gf=va+"-"+ga,bf=va+"-"+ya;var Di="listenerMiddleware";var xf=ft(Di+"/add"),Af=ft(Di+"/removeAll"),Sf=ft(Di+"/remove");var da,Ef=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(da||(da=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Gu=function(t){return function(e){setTimeout(e,t)}},Cf=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Gu(10);Xs();var qu=an(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),gn=class extends qu(Object){};window.ftReduxStores||(window.ftReduxStores={});var ba=class t extends gn{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,o=window.ftReduxStores[n];if(pn(o))return o;if(i==null)return;let s=ma({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=fa({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Rr(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[i.name]=new t(s,a,i.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ln;let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(i));return this.reduxStore.dispatch(d),d}:u=>{this.setState({[l]:i(u)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var bn=class{static format(e,r,n,i,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,i,!!o)):this.getIntlDateTime(e,r,n,i,!!o)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,i,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:i?`${a} ${l}`:a}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var xn=f(E()),Yu="ft-app-info",dr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};dr.eventName="authentication-change";var Ir=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ir.eventName="ui-locale-changed";var Xu={session:(t,e)=>{(0,xn.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>T.dispatchEvent(new dr(e.payload)),0))}},T=xn.FtReduxStore.get({name:Yu,reducers:Xu,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var xa=f(E()),An=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Zf=(0,xa.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(T)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,o;return((o=(i=this.metadataDescriptors.find(a=>a.key===n))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1)?a=>bn.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return An([(0,Ni.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),An([(0,Ni.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),An([ui({store:T.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),An([ui({store:T.name})],e.prototype,"uiLocale",void 0),e});var Aa;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Aa||(Aa={}));var Sa;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Sa||(Sa={}));var Ea;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Ea||(Ea={}));var Ca;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Ca||(Ca={}));var Oa;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Oa||(Oa={}));var wa;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(wa||(wa={}));var Ta;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Ta||(Ta={}));var _a;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(_a||(_a={}));var Ra;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Ra||(Ra={}));var La;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(La||(La={}));var Pa;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(Pa||(Pa={}));var ka;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ka||(ka={}));var Da;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Da||(Da={}));var Na;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Na||(Na={}));var Ia;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ia||(Ia={}));var Ma;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Ma||(Ma={}));var $a;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})($a||($a={}));var Ua;(function(t){t.ASC="ASC",t.DESC="DESC"})(Ua||(Ua={}));var Ba;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Ba||(Ba={}));var Ha;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ha||(Ha={}));var ja;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(ja||(ja={}));var Fa;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Fa||(Fa={}));var Va;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Va||(Va={}));var za;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(za||(za={}));var Wa;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Wa||(Wa={}));var Ka;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Ka||(Ka={}));var Ga;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ga||(Ga={}));var G;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(G||(G={}));var _e;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(_e||(_e={}));var qa;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(qa||(qa={}));var Ya;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Ya||(Ya={}));var Xa;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Xa||(Xa={}));var Ja;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Ja||(Ja={}));var Za;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Za||(Za={}));var Qa;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Qa||(Qa={}));var el;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(el||(el={}));var tl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(tl||(tl={}));var rl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(rl||(rl={}));var nl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(nl||(nl={}));var il;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(il||(il={}));var ol;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ol||(ol={}));var Ju={[G.PERSONAL_BOOK_SHARE_USER]:[G.PERSONAL_BOOK_USER],[G.HTML_EXPORT_USER]:[G.PERSONAL_BOOK_USER],[G.PDF_EXPORT_USER]:[G.PERSONAL_BOOK_USER],[G.KHUB_ADMIN]:[G.CONTENT_PUBLISHER],[G.ADMIN]:[G.KHUB_ADMIN,G.USERS_ADMIN,G.PORTAL_ADMIN,G.BEHAVIOR_DATA_USER],[G.GENERATIVE_AI_EXPORT_USER]:[G.GENERATIVE_AI_USER]};function sl(t,e){return t===e||(Ju[t]??[]).some(r=>sl(r,e))}function al(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>sl(n,e))}var wn=f(E());var Ii=f(E());var Dt=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=T.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let i=T.subscribe(()=>{n=t.get(e),n&&(i(),r(n))})}})}};var pr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Dt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Dt.await()}};var ge=class extends pr{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Ii.CacheRegistry,this.cache=e?i.commonCache:new Ii.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Sn=class extends ge{async listMySearches(){let{session:e}=T.getState();return al(e,G.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var En=class extends ge{async listMyBookmarks(){let e=T.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Cn=class extends ge{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=T.getState().session;return!!e?.sessionAuthenticated}};var On=class extends ge{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=T.getState().session;return!!e?.sessionAuthenticated}};var Zu="ft-user-assets",Qu={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(_e).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:i}=e.payload;$i(t,r,[...Mi(t,r),i]),ll(t,r,1,n),cl(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;$i(t,r,Mi(t,r).map(i=>i.id===n.id?n:i)),cl(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:i}=e.payload;$i(t,r,Mi(t,r).filter(o=>o.id!==i)),ll(t,r,-1,n)}},ul={[_e.SEARCHES]:"savedSearches",[_e.BOOKMARKS]:"bookmarks",[_e.BOOKS]:void 0,[_e.COLLECTIONS]:void 0},Mi=(t,e)=>{var r;let n=ul[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},$i=(t,e,r)=>{let n=ul[e];n&&(t[n]=r)},ll=(t,e,r,n)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===_e.BOOKMARKS&&n)){let o=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,o+r)}},cl=(t,e)=>{let r=t.assetLabels.map(i=>i.title),n=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...n)},ae=wn.FtReduxStore.get({name:Zu,reducers:Qu,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(_e).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ui=class{constructor(e=new Cn,r=new On){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new En,this.savedSearchesService=new Sn,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=T.getState();(0,wn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ae.actions.clearAssetCount(),ae.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ae.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ae.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ae.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ae.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&ae.getState().assetCounts.allAsset[e]!==r.count&&ae.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&ae.getState().assetCounts.bookmarkByMap[e]!==r.count&&ae.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(ae.getState().assetCounts.bookmarkByMap).length!==0;e===_e.BOOKMARKS&&r&&ae.actions.clearBookmarkCountByMap(),ae.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ae.actions.bookmarks(r)}}},ed=new Ui;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ed);var Bi=class{addCommand(e,r=!1){T.commands.add(e,r)}consumeCommand(e){return T.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Bi;var Re=f(E());var dl,fr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},td=Symbol("clearAfterUnitTest"),Tn=class extends(0,Re.withEventBus)(ge){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[dl]=()=>{this.defaultMessages={},this.cache=new Re.CacheRegistry,this.listeners={}},this.currentUiLocale=T.getState().uiLocale,T.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=T.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,Re.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var i;let o=e.toLowerCase(),s=this.resolveContext(o);return new Re.ParametrizedLabelResolver((i=this.defaultMessages[o])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(i){!(i instanceof Re.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new fr({loadedContexts:e})),this.dispatchEvent(new fr({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new fr({loadedContexts:[e]})),this.dispatchEvent(new fr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,Re.delay)(0).then(()=>n()).catch(()=>null)))}};dl=td;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Tn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Tn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Mr=window.FluidTopicsI18nService,Hi=window.FluidTopicsCustomI18nService;var pl=f(E()),ji=class{highlightHtml(e,r,n){(0,pl.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new ji;var fl=f(E());var Fi=class{isDate(e){var r,n,i,o;return(o=(i=((n=(r=T.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===e))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1}format(e,r){var n,i,o,s;if(e==null)return"";try{return fl.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:T.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Fi;var hl=f(E());var $r=class{static get(e,r){var n,i;let o=T.getState(),{lang:s,region:a}=(i=(n=o.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new hl.SearchPlaceConverter(o.baseUrl,e??20,o.searchInAllLanguagesAllowed,r??`${s}-${a}`)}};var Vi=class{urlToSearchRequest(e){return $r.get().parse(e)}searchRequestToUrl(e){return $r.get().serialize(e)}};window.FluidTopicsUrlService=new Vi;var tt=f(E());var Nt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Nt.eventName="change";var zi=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},ml=new zi;var _n=class t extends tt.WithEventBus{static build(){return new t(window.history,ml,()=>window.location,!1)}constructor(e,r,n,i){var o,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},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,tt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Nt(this.currentItem())),0)}installProxies(){let e=r=>(n,i,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};n.apply(i,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(Nt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Nt.eventName,e)}currentItem(){return(0,tt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,tt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,tt.deepCopy)(r.find(n=>e(n)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,tt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let i=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,n);)this.hasState(o)&&(i=o),o++;return i}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let i=r??this.currentState.majorStateId,o=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return o==null||o!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=_n.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var vl=f(L());var yl=vl.css`
261
- `;var xl=f(L()),be=f(z()),$t=f(E());var It=f(E());function gl(t,e){let{authenticationRequired:r,session:n}=T.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var Rn=class extends pr{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Wi=class t extends It.FtStateManager{static build(e){return new t(T,e)}constructor(e,r){super(),this.store=e,this.cache=new It.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new Rn,this.cleanSessionDebouncer=new It.Debouncer,this.reloadDebouncer=new It.Debouncer(500),this.apiProvider=r??(()=>Dt.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(dr.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>gl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){var r,n,i,o,s;this.localesConfiguration=e,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((r=this.localesConfiguration.availableUiLocales)!==null&&r!==void 0?r:[]),this.store.actions.searchInAllLanguagesAllowed((n=this.localesConfiguration.allLanguagesAllowed)!==null&&n!==void 0?n:!1),this.store.actions.searchLanguageSetsUiLanguage((i=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&i!==void 0?i:!1),this.store.actions.uiLanguageSetsSearchLanguage((o=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&o!==void 0?o:!1),this.store.actions.uiLanguageSetsReaderLanguage((s=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&s!==void 0?s:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ir(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},bl=Wi.build();var Mt=class extends Event{constructor(e,r,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=n,this.subscribe=i??!1}};var Ur=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:n}=r;for(let{elementRef:i,callbackRef:o}of n){let s=i.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Mt(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],n=e.callback,i=this.pendingContextRequests.get(e.context);i===void 0&&this.pendingContextRequests.set(e.context,i={callbacks:new WeakMap,requests:[]});let o=i.callbacks.get(r);o===void 0&&i.callbacks.set(r,o=new WeakSet),o.has(n)||(o.add(n),i.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var oe=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},j=class extends $t.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=bl,this.contextRoot=new Ur}render(){return xl.html`
260
+ `;var es=["top","right","bottom","left"],Qo=["start","end"],ri=es.reduce((t,e)=>t.concat(e,e+"-"+Qo[0],e+"-"+Qo[1]),[]),Er=Math.min,at=Math.max,Cr=Math.round;var Ne=t=>({x:t,y:t}),Vc={left:"right",right:"left",bottom:"top",top:"bottom"};function ts(t,e,r){return at(t,Er(e,r))}function Jr(t,e){return typeof t=="function"?t(e):t}function Or(t){return t.split("-")[0]}function lt(t){return t.split("-")[1]}function ni(t){return t==="x"?"y":"x"}function ii(t){return t==="y"?"height":"width"}function Zr(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function oi(t){return ni(Zr(t))}function rs(t,e,r){r===void 0&&(r=!1);let n=lt(t),i=oi(t),o=ii(i),s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=ti(s)),[s,ti(s)]}function ns(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function ti(t){let e=Or(t);return Vc[e]+t.slice(e.length)}function zc(t){var e,r,n,i;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(n=t.bottom)!=null?n:0,left:(i=t.left)!=null?i:0}}function is(t){return typeof t!="number"?zc(t):{top:t,right:t,bottom:t,left:t}}function Ot(t){let{x:e,y:r,width:n,height:i}=t;return{width:n,height:i,top:r,left:e,right:e+n,bottom:r+i,x:e,y:r}}function os(t,e,r){let{reference:n,floating:i}=t,o=Zr(e),s=oi(e),a=ii(s),l=Or(e),c=o==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2,h;switch(l){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-i.width,y:d};break;default:h={x:n.x,y:n.y}}let m=lt(e);return m&&(h[s]+=p*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function ss(t,e){var r;e===void 0&&(e={});let{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Jr(e,t),m=is(h),x=a[p?d==="floating"?"reference":"floating":d],A=Ot(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),S=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),w=await(o.isElement==null?void 0:o.isElement(C))&&await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1},q=Ot(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:C,strategy:l}):S);return{top:(A.top-q.top+m.top)/w.y,bottom:(q.bottom-A.bottom+m.bottom)/w.y,left:(A.left-q.left+m.left)/w.x,right:(q.right-A.right+m.right)/w.x}}var Wc=50,as=async(t,e,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:ss},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=os(c,n,l),p=n,h=0,m={};for(let v=0;v<o.length;v++){let x=o[v];if(!x)continue;let{name:A,fn:S}=x,{x:C,y:w,data:q,reset:V}=await S({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:e}});u=C??u,d=w??d,m[A]={...m[A],...q},V&&h<Wc&&(h++,typeof V=="object"&&(V.placement&&(p=V.placement),V.rects&&(c=V.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):V.rects),{x:u,y:d}=os(c,p,l)),v=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:m}};function Kc(t,e,r){return(t?[...r.filter(i=>lt(i)===t),...r.filter(i=>lt(i)!==t)]:r.filter(i=>Or(i)===i)).filter(i=>t?lt(i)===t||(e?ns(i)!==i:!1):!0)}var ls=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,n,i;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:p=ri,autoAlignment:h=!0,...m}=Jr(t,e),v=d!==void 0||p===ri?Kc(d||null,h,p):p,x=((r=s.autoPlacement)==null?void 0:r.index)||0,A=v[x];if(A==null)return{};if(a!==A)return{reset:{placement:v[0]}};let S=await l.detectOverflow(e,m),C=rs(A,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),w=[S[Or(A)],S[C[0]],S[C[1]]],q=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:A,overflows:w}],V=v[x+1];if(V)return{data:{index:x+1,overflows:q},reset:{placement:V}};let nt=q.map(he=>{let Ee=lt(he.placement);return[he.placement,Ee&&u?he.overflows.slice(0,2).reduce((me,At)=>me+At,0):he.overflows[0],he.overflows]}).sort((he,Ee)=>he[1]-Ee[1]),it=((i=nt.filter(he=>he[2].slice(0,lt(he[0])?2:3).every(Ee=>Ee<=0))[0])==null?void 0:i[0])||nt[0][0];return it!==a?{data:{index:x+1,overflows:q},reset:{placement:it}}:{}}}};var cs=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:n,placement:i,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:S=>{let{x:C,y:w}=S;return{x:C,y:w}}},...c}=Jr(t,e),u={x:r,y:n},d=await o.detectOverflow(e,c),p=Zr(i),h=ni(p),m=u[h],v=u[p],x=(S,C)=>ts(C+d[S==="y"?"top":"left"],C,C-d[S==="y"?"bottom":"right"]);s&&(m=x(h,m)),a&&(v=x(p,v));let A=l.fn({...e,[h]:m,[p]:v});return{...A,data:{x:A.x-r,y:A.y-n,enabled:{[h]:s,[p]:a}}}}}};function en(){return typeof window<"u"}function Tt(t){return ds(t)?(t.nodeName||"").toLowerCase():"#document"}function de(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ke(t){var e;return(e=(ds(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ds(t){return en()?t instanceof Node||t instanceof de(t).Node:!1}function Oe(t){return en()?t instanceof Element||t instanceof de(t).Element:!1}function Ge(t){return en()?t instanceof HTMLElement||t instanceof de(t).HTMLElement:!1}function us(t){return!en()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof de(t).ShadowRoot}function tr(t){let{overflow:e,overflowX:r,overflowY:n,display:i}=we(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&i!=="inline"&&i!=="contents"}function ps(t){return/^(table|td|th)$/.test(Tt(t))}function wr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Gc=/transform|translate|scale|rotate|perspective|filter/,qc=/paint|layout|strict|content/,wt=t=>!!t&&t!=="none",si;function rr(t){let e=Oe(t)?we(t):t;return wt(e.transform)||wt(e.translate)||wt(e.scale)||wt(e.rotate)||wt(e.perspective)||!tn()&&(wt(e.backdropFilter)||wt(e.filter))||Gc.test(e.willChange||"")||qc.test(e.contain||"")}function fs(t){let e=Qe(t);for(;Ge(e)&&!_t(e);){if(rr(e))return e;if(wr(e))return null;e=Qe(e)}return null}function tn(){return si==null&&(si=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),si}function _t(t){return/^(html|body|#document)$/.test(Tt(t))}function we(t){return de(t).getComputedStyle(t)}function Tr(t){return Oe(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Qe(t){if(Tt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||us(t)&&t.host||Ke(t);return us(e)?e.host:e}function hs(t){let e=Qe(t);return _t(e)?(t.ownerDocument||t).body:Ge(e)&&tr(e)?e:hs(e)}function Qr(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);let i=hs(t),o=i===((n=t.ownerDocument)==null?void 0:n.body),s=de(i);if(o){let a=rn(s);return e.concat(s,s.visualViewport||[],tr(i)?i:[],a&&r?Qr(a):[])}else return e.concat(i,Qr(i,[],r))}function rn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function gs(t){let e=we(t),r=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=Ge(t),o=i?t.offsetWidth:r,s=i?t.offsetHeight:n,a=Cr(r)!==o||Cr(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function bs(t){return Oe(t)?t:t.contextElement}function nr(t){let e=bs(t);if(!Ge(e))return Ne(1);let r=e.getBoundingClientRect(),{width:n,height:i,$:o}=gs(e),s=(o?Cr(r.width):r.width)/n,a=(o?Cr(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Yc=Ne(0);function xs(t){let e=de(t);return!tn()||!e.visualViewport?Yc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Xc(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==de(t)?!1:e}function _r(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let i=t.getBoundingClientRect(),o=bs(t),s=Ne(1);e&&(n?Oe(n)&&(s=nr(n)):s=nr(t));let a=Xc(o,r,n)?xs(o):Ne(0),l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){let p=de(o),h=n&&Oe(n)?de(n):n,m=p,v=rn(m);for(;v&&n&&h!==m;){let x=nr(v),A=v.getBoundingClientRect(),S=we(v),C=A.left+(v.clientLeft+parseFloat(S.paddingLeft))*x.x,w=A.top+(v.clientTop+parseFloat(S.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=C,c+=w,m=de(v),v=rn(m)}}return Ot({width:u,height:d,x:l,y:c})}function nn(t,e){let r=Tr(t).scrollLeft;return e?e.left+r:_r(Ke(t)).left+r}function As(t,e){let r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-nn(t,r),i=r.top+e.scrollTop;return{x:n,y:i}}function Jc(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t,o=i==="fixed",s=Ke(n),a=e?wr(e.floating):!1;if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Ne(1),u=Ne(0),d=Ge(n);if((d||!d&&!o)&&((Tt(n)!=="body"||tr(s))&&(l=Tr(n)),d)){let h=_r(n);c=nr(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}let p=s&&!d&&!o?As(s,l):Ne(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function Zc(t){return Array.from(t.getClientRects())}function Qc(t){let e=Ke(t),r=Tr(t),n=t.ownerDocument.body,i=at(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=at(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+nn(t),a=-r.scrollTop;return we(n).direction==="rtl"&&(s+=at(e.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:a}}var ms=25;function eu(t,e){let r=de(t),n=Ke(t),i=r.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;let u=tn();(!u||u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}let c=nn(n);if(c<=0){let u=n.ownerDocument,d=u.body,p=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(n.clientWidth-d.clientWidth-h);m<=ms&&(o-=m)}else c<=ms&&(o+=c);return{width:o,height:s,x:a,y:l}}function tu(t,e){let r=_r(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,o=Ge(t)?nr(t):Ne(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,c=n*o.y;return{width:s,height:a,x:l,y:c}}function vs(t,e,r){let n;if(e==="viewport")n=eu(t,r);else if(e==="document")n=Qc(Ke(t));else if(Oe(e))n=tu(e,r);else{let i=xs(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ot(n)}function Ss(t,e){let r=Qe(t);return r===e||!Oe(r)||_t(r)?!1:we(r).position==="fixed"||Ss(r,e)}function ru(t,e){let r=e.get(t);if(r)return r;let n=Qr(t,[],!1).filter(a=>Oe(a)&&Tt(a)!=="body"),i=null,o=we(t).position==="fixed",s=o?Qe(t):t;for(;Oe(s)&&!_t(s);){let a=we(s),l=rr(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||tr(s)&&!l&&Ss(t,s))?n=n.filter(u=>u!==s):i=a,s=Qe(s)}return e.set(t,n),n}function nu(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t,s=[...r==="clippingAncestors"?wr(e)?[]:ru(e,this._c):[].concat(r),n],a=vs(e,s[0],i),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let h=vs(e,s[p],i);l=at(h.top,l),c=Er(h.right,c),u=Er(h.bottom,u),d=at(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function iu(t){let{width:e,height:r}=gs(t);return{width:e,height:r}}function ou(t,e,r){let n=Ge(e),i=Ke(e),o=r==="fixed",s=_r(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Ne(0);function c(){l.x=nn(i)}if(n||!n&&!o)if((Tt(e)!=="body"||tr(i))&&(a=Tr(e)),n){let h=_r(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&c();o&&!n&&i&&c();let u=i&&!n&&!o?As(i,a):Ne(0),d=s.left+a.scrollLeft-l.x-u.x,p=s.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:s.width,height:s.height}}function ai(t){return we(t).position==="static"}function ys(t,e){if(!Ge(t)||we(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ke(t)===r&&(r=r.ownerDocument.body),r}function Es(t,e){let r=de(t);if(wr(t))return r;if(!Ge(t)){let i=Qe(t);for(;i&&!_t(i);){if(Oe(i)&&!ai(i))return i;i=Qe(i)}return r}let n=ys(t,e);for(;n&&ps(n)&&ai(n);)n=ys(n,e);return n&&_t(n)&&ai(n)&&!rr(n)?r:n||fs(t)||r}var su=async function(t){let e=this.getOffsetParent||Es,r=this.getDimensions,n=await r(t.floating);return{reference:ou(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function au(t){return we(t).direction==="rtl"}var on={convertOffsetParentRelativeRectToViewportRelativeRect:Jc,getDocumentElement:Ke,getClippingRect:nu,getOffsetParent:Es,getElementRects:su,getClientRects:Zc,getDimensions:iu,getScale:nr,isElement:Oe,isRTL:au};var Cs=ls,Os=cs;var ws=(t,e,r)=>{let n=new Map,i={platform:on,...r},o={...i.platform,_c:n};return as(t,e,{...i,platform:o})};function Ts(t){return lu(t)}function li(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function lu(t){for(let e=t;e;e=li(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=li(t);e;e=li(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||rr(r)||e.tagName==="BODY"))return e}return null}async function _s(t,e,r){let n;return typeof r=="object"?n=r:n={placement:r},ws(t,e,{strategy:n.strategy,platform:{...on,getOffsetParent:i=>on.getOffsetParent(i,Ts)},middleware:[Os({crossAxis:!0}),Cs({allowedPlacements:[n.placement]})]})}var mr=f(E());var Ni=f(z());var Rs=f(z(),1);var ci=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Ls(t,e){return(0,Rs.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Rr(t);try{return JSON.parse(r)}catch{return Rr(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Lr,...e??{}})}function cu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!sn(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!sn(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let i=s=>Object.keys(s).filter(a=>s[a]!=null),o=i(t);if(r=o.length,r!==i(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[n]))return!1;for(n=r;n--!==0;){let s=o[n];if(!sn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function sn(t,e){try{return cu(t,e)}catch{return!1}}function Lr(t,e){return!sn(t,e)}function Rr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function an(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let i=e(n);return i[t]=!0,i}}var Ps=f(z(),1);var ui=t=>{let e=t??{};return(r,n)=>{var i;let o={hasChanged:Lr,attribute:!1,...e};(0,Ps.property)(o)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:(a=>a[n]),store:e.store})}};var ln=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var Rt=f(z(),1);var cn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(a){i(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Ds=f(L(),1);var un=globalThis,uu=un.ShadowRoot&&(un.ShadyCSS===void 0||un.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ks=(t,e)=>{if(uu)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),i=un.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}};var dn=class extends Ds.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return ks(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){ci(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Ns(t,e,...r){var n;let i=t.querySelector(e);for(let o of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(o);return i}var or=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Us,Is=Symbol("constructorPrototype"),Ms=Symbol("constructorName"),Bs=Symbol("exportpartsDebouncer"),$s=Symbol("dynamicDependenciesLoaded"),ir=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};ir.eventName="exportparts-updated";var qe=class extends dn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Us]=new cn(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Bs].run(()=>{var i,o;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Ms]=this.constructor.name,this[Is]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ms]&&Object.setPrototypeOf(this,this[Is])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[$s]||(r[$s]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(ir.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(ir.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new ir)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let o=[...i??[],n];r=Ns(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,n,i,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let h=(o=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],v=[...h,...m].filter(l).map(x=>x.trim());for(let x of v)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(h=>`${p}:${h}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};Us=Bs;or([(0,Rt.property)()],qe.prototype,"exportpartsPrefix",void 0);or([Ls([])],qe.prototype,"exportpartsPrefixes",void 0);or([(0,Rt.property)({reflect:!0})],qe.prototype,"exportparts",void 0);or([(0,Rt.property)()],qe.prototype,"customStylesheet",void 0);or([(0,Rt.property)()],qe.prototype,"elementToFocus",void 0);or([(0,Rt.state)()],qe.prototype,"useAdoptedStyleSheets",void 0);function pn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Pr=Symbol("internalReduxEventsUnsubscribers"),ct=Symbol("internalStoresUnsubscribers"),Lt=Symbol("internalStores"),du=an(Symbol("withRedux"),function(t){var e,r,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Lt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Lt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Lt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Lt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Lt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Lt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[ct].has(s.store):this[ct].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[ct].set(s,a.subscribe(()=>this.updateFromStores())),this[Pr].set(s,[]),pn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[Pr].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ct].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[ct].has(s)&&this[ct].get(s)(),this[ct].delete(s),(a=this[Pr].get(s))===null||a===void 0||a.forEach(l=>l()),this[Pr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=ct,r=Lt,n=Pr,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Hs=class extends du(qe){};function Te(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,o;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function et(t){return!!t&&!!t[U]}function Ie(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===bu})(t)||Array.isArray(t)||!!t[Gs]||!!(!((e=t.constructor)===null||e===void 0)&&e[Gs])||bi(t)||xi(t))}function Pt(t,e,r){r===void 0&&(r=!1),lr(t)===0?(r?Object.keys:ar)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,i){return e(i,n,t)}))}function lr(t){var e=t[U];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:bi(t)?2:xi(t)?3:0}function sr(t,e){return lr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function pu(t,e){return lr(t)===2?t.get(e):t[e]}function qs(t,e,r){var n=lr(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function Ys(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function bi(t){return yu&&t instanceof Map}function xi(t){return gu&&t instanceof Set}function ut(t){return t.o||t.t}function Ai(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Zs(t);delete e[U];for(var r=ar(e),n=0;n<r.length;n++){var i=r[n],o=e[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Si(t,e){return e===void 0&&(e=!1),Ei(t)||et(t)||!Ie(t)||(lr(t)>1&&(t.set=t.add=t.clear=t.delete=fu),Object.freeze(t),e&&Pt(t,(function(r,n){return Si(n,!0)}),!0)),t}function fu(){Te(2)}function Ei(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ye(t){var e=gi[t];return e||Te(18,t),e}function hu(t,e){gi[t]||(gi[t]=e)}function mi(){return Dr}function di(t,e){e&&(Ye("Patches"),t.u=[],t.s=[],t.v=e)}function fn(t){vi(t),t.p.forEach(mu),t.p=null}function vi(t){t===Dr&&(Dr=t.l)}function js(t){return Dr={p:[],l:Dr,h:t,m:!0,_:0}}function mu(t){var e=t[U];e.i===0||e.i===1?e.j():e.g=!0}function pi(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||Ye("ES5").S(e,t,n),n?(r[U].P&&(fn(e),Te(4)),Ie(t)&&(t=hn(e,t),e.l||mn(e,t)),e.u&&Ye("Patches").M(r[U].t,t,e.u,e.s)):t=hn(e,r,[]),fn(e),e.u&&e.v(e.u,e.s),t!==Js?t:void 0}function hn(t,e,r){if(Ei(e))return e;var n=e[U];if(!n)return Pt(e,(function(a,l){return Fs(t,n,e,a,l,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return mn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Ai(n.k):n.o,o=i,s=!1;n.i===3&&(o=new Set(i),i.clear(),s=!0),Pt(o,(function(a,l){return Fs(t,n,i,a,l,r,s)})),mn(t,i,!1),r&&t.u&&Ye("Patches").N(n,r,t.u,t.s)}return n.o}function Fs(t,e,r,n,i,o,s){if(et(i)){var a=hn(t,i,o&&e&&e.i!==3&&!sr(e.R,n)?o.concat(n):void 0);if(qs(r,n,a),!et(a))return;t.m=!1}else s&&r.add(i);if(Ie(i)&&!Ei(i)){if(!t.h.D&&t._<1)return;hn(t,i),e&&e.A.l||mn(t,i)}}function mn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Si(e,r)}function fi(t,e){var r=t[U];return(r?ut(r):t)[e]}function Vs(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function dt(t){t.P||(t.P=!0,t.l&&dt(t.l))}function hi(t){t.o||(t.o=Ai(t.t))}function yi(t,e,r){var n=bi(e)?Ye("MapSet").F(e,r):xi(e)?Ye("MapSet").T(e,r):t.O?(function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:mi(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=Nr;s&&(l=[a],c=kr);var u=Proxy.revocable(l,c),d=u.revoke,p=u.proxy;return a.k=p,a.j=d,p})(e,r):Ye("ES5").J(e,r);return(r?r.A:mi()).p.push(n),n}function vu(t){return et(t)||Te(22,t),(function e(r){if(!Ie(r))return r;var n,i=r[U],o=lr(r);if(i){if(!i.P&&(i.i<4||!Ye("ES5").K(i)))return i.t;i.I=!0,n=zs(r,o),i.I=!1}else n=zs(r,o);return Pt(n,(function(s,a){i&&pu(i.t,s)===a||qs(n,s,e(a))})),o===3?new Set(n):n})(t)}function zs(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ai(t)}function Xs(){function t(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[U];return Nr.get(c,s)},set:function(c){var u=this[U];Nr.set(u,s,c)}},l}function e(s){for(var a=s.length-1;a>=0;a--){var l=s[a][U];if(!l.P)switch(l.i){case 5:n(l)&&dt(l);break;case 4:r(l)&&dt(l)}}}function r(s){for(var a=s.t,l=s.k,c=ar(l),u=c.length-1;u>=0;u--){var d=c[u];if(d!==U){var p=a[d];if(p===void 0&&!sr(a,d))return!0;var h=l[d],m=h&&h[U];if(m?m.t!==p:!Ys(h,p))return!0}}var v=!!a[U];return c.length!==ar(a).length+(v?0:1)}function n(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function i(s){s.g&&Te(3,JSON.stringify(ut(s)))}var o={};hu("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(d,p){if(d){for(var h=Array(p.length),m=0;m<p.length;m++)Object.defineProperty(h,""+m,t(m,!0));return h}var v=Zs(p);delete v[U];for(var x=ar(v),A=0;A<x.length;A++){var S=x[A];v[S]=t(S,d||!!v[S].enumerable)}return Object.create(Object.getPrototypeOf(p),v)})(l,s),u={i:l?5:4,A:a?a.A:mi(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,U,{value:u,writable:!0}),c},S:function(s,a,l){l?et(a)&&a[U].A===s&&e(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var d=u[U];if(d){var p=d.t,h=d.k,m=d.R,v=d.i;if(v===4)Pt(h,(function(w){w!==U&&(p[w]!==void 0||sr(p,w)?m[w]||c(h[w]):(m[w]=!0,dt(d)))})),Pt(p,(function(w){h[w]!==void 0||sr(h,w)||(m[w]=!1,dt(d))}));else if(v===5){if(n(d)&&(dt(d),m.length=!0),h.length<p.length)for(var x=h.length;x<p.length;x++)m[x]=!1;else for(var A=p.length;A<h.length;A++)m[A]=!0;for(var S=Math.min(h.length,p.length),C=0;C<S;C++)h.hasOwnProperty(C)||(m[C]=!0),m[C]===void 0&&c(h[C])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var Ws,Dr,Ci=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yu=typeof Map<"u",gu=typeof Set<"u",Ks=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Js=Ci?Symbol.for("immer-nothing"):((Ws={})["immer-nothing"]=!0,Ws),Gs=Ci?Symbol.for("immer-draftable"):"__$immer_draftable",U=Ci?Symbol.for("immer-state"):"__$immer_state";var bu=""+Object.prototype.constructor,ar=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Zs=Object.getOwnPropertyDescriptors||function(t){var e={};return ar(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},gi={},Nr={get:function(t,e){if(e===U)return t;var r=ut(t);if(!sr(r,e))return(function(i,o,s){var a,l=Vs(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(i.k):void 0})(t,r,e);var n=r[e];return t.I||!Ie(n)?n:n===fi(t.t,e)?(hi(t),t.o[e]=yi(t.A.h,n,t)):n},has:function(t,e){return e in ut(t)},ownKeys:function(t){return Reflect.ownKeys(ut(t))},set:function(t,e,r){var n=Vs(ut(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var i=fi(ut(t),e),o=i?.[U];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Ys(r,i)&&(r!==void 0||sr(t.t,e)))return!0;hi(t),dt(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return fi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,hi(t),dt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=ut(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Te(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Te(12)}},kr={};Pt(Nr,(function(t,e){kr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),kr.deleteProperty=function(t,e){return kr.set.call(this,t,e,void 0)},kr.set=function(t,e,r){return Nr.set.call(this,t[0],e,r,t[0])};var xu=(function(){function t(r){var n=this;this.O=Ks,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var l=n;return function(v){var x=this;v===void 0&&(v=a);for(var A=arguments.length,S=Array(A>1?A-1:0),C=1;C<A;C++)S[C-1]=arguments[C];return l.produce(v,(function(w){var q;return(q=o).call.apply(q,[x,w].concat(S))}))}}var c;if(typeof o!="function"&&Te(6),s!==void 0&&typeof s!="function"&&Te(7),Ie(i)){var u=js(n),d=yi(n,i,void 0),p=!0;try{c=o(d),p=!1}finally{p?fn(u):vi(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(v){return di(u,s),pi(v,u)}),(function(v){throw fn(u),v})):(di(u,s),pi(c,u))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===Js&&(c=void 0),n.D&&Si(c,!0),s){var h=[],m=[];Ye("Patches").M(i,c,h,m),s(h,m)}return c}Te(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];return n.produceWithPatches(c,(function(h){return i.apply(void 0,[h].concat(d))}))};var s,a,l=n.produce(i,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Ie(r)||Te(8),et(r)&&(r=vu(r));var n=js(this),i=yi(this,r,void 0);return i[U].C=!0,vi(n),i},e.finishDraft=function(r,n){var i=r&&r[U],o=i.A;return di(o,n),pi(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Ks&&Te(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var s=Ye("Patches").$;return et(r)?s(r,n):this.produce(r,(function(a){return s(a,n)}))},t})(),ye=new xu,Au=ye.produce,jp=ye.produceWithPatches.bind(ye),Fp=ye.setAutoFreeze.bind(ye),Vp=ye.setUseProxies.bind(ye),zp=ye.applyPatches.bind(ye),Wp=ye.createDraft.bind(ye),Kp=ye.finishDraft.bind(ye),vn=Au;function kt(t){"@babel/helpers - typeof";return kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(t)}function Qs(t,e){if(kt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(kt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ea(t){var e=Qs(t,"string");return kt(e)=="symbol"?e:e+""}function ta(t,e,r){return(e=ea(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ra(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Oi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ra(Object(r),!0).forEach(function(n){ta(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ra(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ie(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var na=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),wi=function(){return Math.random().toString(36).substring(7).split("").join(".")},yn={INIT:"@@redux/INIT"+wi(),REPLACE:"@@redux/REPLACE"+wi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+wi()}};function Su(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ti(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ie(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ie(1));return r(Ti)(t,e)}if(typeof t!="function")throw new Error(ie(2));var i=t,o=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(ie(3));return o}function d(v){if(typeof v!="function")throw new Error(ie(4));if(l)throw new Error(ie(5));var x=!0;return c(),a.push(v),function(){if(x){if(l)throw new Error(ie(6));x=!1,c();var S=a.indexOf(v);a.splice(S,1),s=null}}}function p(v){if(!Su(v))throw new Error(ie(7));if(typeof v.type>"u")throw new Error(ie(8));if(l)throw new Error(ie(9));try{l=!0,o=i(o,v)}finally{l=!1}for(var x=s=a,A=0;A<x.length;A++){var S=x[A];S()}return v}function h(v){if(typeof v!="function")throw new Error(ie(10));i=v,p({type:yn.REPLACE})}function m(){var v,x=d;return v={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(ie(11));function C(){S.next&&S.next(u())}C();var w=x(C);return{unsubscribe:w}}},v[na]=function(){return this},v}return p({type:yn.INIT}),n={dispatch:p,subscribe:d,getState:u,replaceReducer:h},n[na]=m,n}function Eu(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:yn.INIT});if(typeof n>"u")throw new Error(ie(12));if(typeof r(void 0,{type:yn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ie(13))})}function ia(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var o=Object.keys(r),s,a;try{Eu(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var d;for(var p=!1,h={},m=0;m<o.length;m++){var v=o[m],x=r[v],A=c[v],S=x(A,u);if(typeof S>"u"){var C=u&&u.type;throw new Error(ie(14))}h[v]=S,p=p||S!==A}return p=p||o.length!==Object.keys(c).length,p?h:c}}function cr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function oa(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),o=function(){throw new Error(ie(15))},s={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=e.map(function(l){return l(s)});return o=cr.apply(void 0,a)(i.dispatch),Oi(Oi({},i),{},{dispatch:o})}}}function sa(t){var e=function(n){var i=n.dispatch,o=n.getState;return function(s){return function(a){return typeof a=="function"?a(i,o,t):s(a)}}};return e}var aa=sa();aa.withExtraArgument=sa;var _i=aa;var pa=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Cu=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ur=function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},Ou=Object.defineProperty,wu=Object.defineProperties,Tu=Object.getOwnPropertyDescriptors,la=Object.getOwnPropertySymbols,_u=Object.prototype.hasOwnProperty,Ru=Object.prototype.propertyIsEnumerable,ca=function(t,e,r){return e in t?Ou(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},pt=function(t,e){for(var r in e||(e={}))_u.call(e,r)&&ca(t,r,e[r]);if(la)for(var n=0,i=la(e);n<i.length;n++){var r=i[n];Ru.call(e,r)&&ca(t,r,e[r])}return t},Ri=function(t,e){return wu(t,Tu(e))},Lu=function(t,e,r){return new Promise(function(n,i){var o=function(l){try{a(r.next(l))}catch(c){i(c)}},s=function(l){try{a(r.throw(l))}catch(c){i(c)}},a=function(l){return l.done?n(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(t,e)).next())})};var Pu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?cr:cr.apply(null,arguments)},df=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function ku(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function ft(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var o=e.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return pt(pt({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}var Du=(function(t){pa(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.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(e.bind.apply(e,ur([void 0],r[0].concat(this)))):new(e.bind.apply(e,ur([void 0],r.concat(this))))},e})(Array),Nu=(function(t){pa(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.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(e.bind.apply(e,ur([void 0],r[0].concat(this)))):new(e.bind.apply(e,ur([void 0],r.concat(this))))},e})(Array);function ki(t){return Ie(t)?vn(t,function(){}):t}function Iu(t){return typeof t=="boolean"}function Mu(){return function(e){return $u(e)}}function $u(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,o=t.serializableCheck,s=o===void 0?!0:o,a=t.actionCreatorCheck,l=a===void 0?!0:a,c=new Du;if(r&&(Iu(r)?c.push(_i):c.push(_i.withExtraArgument(r.extraArgument))),0){if(i)var u;if(s)var d;if(l)var p}return c}var Li=!0;function fa(t){var e=Mu(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,o=r.middleware,s=o===void 0?e():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,d=r.enhancers,p=d===void 0?void 0:d,h;if(typeof i=="function")h=i;else if(ku(i))h=ia(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(e),!Li&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Li&&m.some(function(w){return typeof w!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=oa.apply(void 0,m),x=cr;l&&(x=Pu(pt({trace:!Li},typeof l=="object"&&l)));var A=new Nu(v),S=A;Array.isArray(p)?S=ur([v],p):typeof p=="function"&&(S=p(A));var C=x.apply(void 0,S);return Ti(h,u,C)}function ha(t){var e={},r=[],n,i={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[a]=s,i},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase:function(o){return n=o,i}};return t(i),[e,r,n]}function Uu(t){return typeof t=="function"}function Bu(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?ha(e):[e,r,n],o=i[0],s=i[1],a=i[2],l;if(Uu(t))l=function(){return ki(t())};else{var c=ki(t);l=function(){return c}}function u(d,p){d===void 0&&(d=l());var h=ur([o[p.type]],s.filter(function(m){var v=m.matcher;return v(p)}).map(function(m){var v=m.reducer;return v}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,v){if(v)if(et(m)){var x=m,A=v(x,p);return A===void 0?m:A}else{if(Ie(m))return vn(m,function(S){return v(S,p)});var A=v(m,p);if(A===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return m},d)}return u.getInitialState=l,u}function Hu(t,e){return t+"/"+e}function ma(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:ki(t.initialState),n=t.reducers||{},i=Object.keys(n),o={},s={},a={};i.forEach(function(u){var d=n[u],p=Hu(e,u),h,m;"reducer"in d?(h=d.reducer,m=d.prepare):h=d,o[u]=h,s[p]=h,a[u]=m?ft(p,m):ft(p)});function l(){var u=typeof t.extraReducers=="function"?ha(t.extraReducers):[t.extraReducers],d=u[0],p=d===void 0?{}:d,h=u[1],m=h===void 0?[]:h,v=u[2],x=v===void 0?void 0:v,A=pt(pt({},p),s);return Bu(r,function(S){for(var C in A)S.addCase(C,A[C]);for(var w=0,q=m;w<q.length;w++){var V=q[w];S.addMatcher(V.matcher,V.reducer)}x&&S.addDefaultCase(x)})}var c;return{name:e,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var ju="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Fu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=ju[Math.random()*64|0];return e},Vu=["name","message","stack","code"],Pi=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),ua=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),zu=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=Vu;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},mf=(function(){function t(e,r,n){var i=ft(e+"/fulfilled",function(u,d,p,h){return{payload:u,meta:Ri(pt({},h||{}),{arg:p,requestId:d,requestStatus:"fulfilled"})}}),o=ft(e+"/pending",function(u,d,p){return{payload:void 0,meta:Ri(pt({},p||{}),{arg:d,requestId:u,requestStatus:"pending"})}}),s=ft(e+"/rejected",function(u,d,p,h,m){return{payload:h,error:(n&&n.serializeError||zu)(u||"Rejected"),meta:Ri(pt({},m||{}),{arg:p,requestId:d,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(d,p,h){var m=n?.idGenerator?n.idGenerator(u):Fu(),v=new l,x,A=!1;function S(w){x=w,v.abort()}var C=(function(){return Lu(this,null,function(){var w,q,V,nt,jn,it,he;return Cu(this,function(Ee){switch(Ee.label){case 0:return Ee.trys.push([0,4,,5]),nt=(w=n?.condition)==null?void 0:w.call(n,u,{getState:p,extra:h}),Ku(nt)?[4,nt]:[3,2];case 1:nt=Ee.sent(),Ee.label=2;case 2:if(nt===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,jn=new Promise(function(me,At){return v.signal.addEventListener("abort",function(){return At({name:"AbortError",message:x||"Aborted"})})}),d(o(m,u,(q=n?.getPendingMeta)==null?void 0:q.call(n,{requestId:m,arg:u},{getState:p,extra:h}))),[4,Promise.race([jn,Promise.resolve(r(u,{dispatch:d,getState:p,extra:h,requestId:m,signal:v.signal,abort:S,rejectWithValue:function(me,At){return new Pi(me,At)},fulfillWithValue:function(me,At){return new ua(me,At)}})).then(function(me){if(me instanceof Pi)throw me;return me instanceof ua?i(me.payload,m,u,me.meta):i(me,m,u)})])];case 3:return V=Ee.sent(),[3,5];case 4:return it=Ee.sent(),V=it instanceof Pi?s(null,m,u,it.payload,it.meta):s(it,m,u),[3,5];case 5:return he=n&&!n.dispatchConditionRejection&&s.match(V)&&V.meta.condition,he||d(V),[2,V]}})})})();return Object.assign(C,{abort:S,requestId:m,arg:u,unwrap:function(){return C.then(Wu)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t})();function Wu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ku(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var va="listener",ya="completed",ga="cancelled",vf="task-"+ga,yf="task-"+ya,gf=va+"-"+ga,bf=va+"-"+ya;var Di="listenerMiddleware";var xf=ft(Di+"/add"),Af=ft(Di+"/removeAll"),Sf=ft(Di+"/remove");var da,Ef=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(da||(da=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Gu=function(t){return function(e){setTimeout(e,t)}},Cf=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Gu(10);Xs();var qu=an(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),gn=class extends qu(Object){};window.ftReduxStores||(window.ftReduxStores={});var ba=class t extends gn{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,o=window.ftReduxStores[n];if(pn(o))return o;if(i==null)return;let s=ma({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=fa({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Rr(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[i.name]=new t(s,a,i.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ln;let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(i));return this.reduxStore.dispatch(d),d}:u=>{this.setState({[l]:i(u)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var bn=class{static format(e,r,n,i,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,i,!!o)):this.getIntlDateTime(e,r,n,i,!!o)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,i,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:i?`${a} ${l}`:a}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var xn=f(E()),Yu="ft-app-info",dr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};dr.eventName="authentication-change";var Ir=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ir.eventName="ui-locale-changed";var Xu={session:(t,e)=>{(0,xn.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>T.dispatchEvent(new dr(e.payload)),0))}},T=xn.FtReduxStore.get({name:Yu,reducers:Xu,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var xa=f(E()),An=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Zf=(0,xa.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(T)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,o;return((o=(i=this.metadataDescriptors.find(a=>a.key===n))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1)?a=>bn.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return An([(0,Ni.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),An([(0,Ni.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),An([ui({store:T.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),An([ui({store:T.name})],e.prototype,"uiLocale",void 0),e});var Aa;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Aa||(Aa={}));var Sa;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Sa||(Sa={}));var Ea;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Ea||(Ea={}));var Ca;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Ca||(Ca={}));var Oa;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Oa||(Oa={}));var wa;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(wa||(wa={}));var Ta;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Ta||(Ta={}));var _a;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(_a||(_a={}));var Ra;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Ra||(Ra={}));var La;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(La||(La={}));var Pa;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(Pa||(Pa={}));var ka;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ka||(ka={}));var Da;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Da||(Da={}));var Na;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Na||(Na={}));var Ia;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ia||(Ia={}));var Ma;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Ma||(Ma={}));var $a;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})($a||($a={}));var Ua;(function(t){t.ASC="ASC",t.DESC="DESC"})(Ua||(Ua={}));var Ba;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Ba||(Ba={}));var Ha;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ha||(Ha={}));var ja;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(ja||(ja={}));var Fa;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Fa||(Fa={}));var Va;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Va||(Va={}));var za;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(za||(za={}));var Wa;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Wa||(Wa={}));var Ka;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Ka||(Ka={}));var Ga;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ga||(Ga={}));var G;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(G||(G={}));var _e;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(_e||(_e={}));var qa;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(qa||(qa={}));var Ya;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Ya||(Ya={}));var Xa;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Xa||(Xa={}));var Ja;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Ja||(Ja={}));var Za;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Za||(Za={}));var Qa;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Qa||(Qa={}));var el;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(el||(el={}));var tl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(tl||(tl={}));var rl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(rl||(rl={}));var nl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(nl||(nl={}));var il;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(il||(il={}));var ol;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ol||(ol={}));var Ju={[G.PERSONAL_BOOK_SHARE_USER]:[G.PERSONAL_BOOK_USER],[G.HTML_EXPORT_USER]:[G.PERSONAL_BOOK_USER],[G.PDF_EXPORT_USER]:[G.PERSONAL_BOOK_USER],[G.KHUB_ADMIN]:[G.CONTENT_PUBLISHER],[G.ADMIN]:[G.KHUB_ADMIN,G.USERS_ADMIN,G.PORTAL_ADMIN,G.BEHAVIOR_DATA_USER],[G.GENERATIVE_AI_EXPORT_USER]:[G.GENERATIVE_AI_USER]};function sl(t,e){return t===e||(Ju[t]??[]).some(r=>sl(r,e))}function al(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>sl(n,e))}var wn=f(E());var Ii=f(E());var Dt=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=T.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let i=T.subscribe(()=>{n=t.get(e),n&&(i(),r(n))})}})}};var pr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Dt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Dt.await()}};var ge=class extends pr{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Ii.CacheRegistry,this.cache=e?i.commonCache:new Ii.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Sn=class extends ge{async listMySearches(){let{session:e}=T.getState();return al(e,G.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var En=class extends ge{async listMyBookmarks(){let e=T.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Cn=class extends ge{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=T.getState().session;return!!e?.sessionAuthenticated}};var On=class extends ge{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=T.getState().session;return!!e?.sessionAuthenticated}};var Zu="ft-user-assets",Qu={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(_e).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:i}=e.payload;$i(t,r,[...Mi(t,r),i]),ll(t,r,1,n),cl(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;$i(t,r,Mi(t,r).map(i=>i.id===n.id?n:i)),cl(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:i}=e.payload;$i(t,r,Mi(t,r).filter(o=>o.id!==i)),ll(t,r,-1,n)}},ul={[_e.SEARCHES]:"savedSearches",[_e.BOOKMARKS]:"bookmarks",[_e.BOOKS]:void 0,[_e.COLLECTIONS]:void 0},Mi=(t,e)=>{var r;let n=ul[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},$i=(t,e,r)=>{let n=ul[e];n&&(t[n]=r)},ll=(t,e,r,n)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===_e.BOOKMARKS&&n)){let o=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,o+r)}},cl=(t,e)=>{let r=t.assetLabels.map(i=>i.title),n=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...n)},ae=wn.FtReduxStore.get({name:Zu,reducers:Qu,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(_e).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ui=class{constructor(e=new Cn,r=new On){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new En,this.savedSearchesService=new Sn,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=T.getState();(0,wn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ae.actions.clearAssetCount(),ae.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ae.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ae.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ae.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ae.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&ae.getState().assetCounts.allAsset[e]!==r.count&&ae.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&ae.getState().assetCounts.bookmarkByMap[e]!==r.count&&ae.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(ae.getState().assetCounts.bookmarkByMap).length!==0;e===_e.BOOKMARKS&&r&&ae.actions.clearBookmarkCountByMap(),ae.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ae.actions.bookmarks(r)}}},ed=new Ui;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ed);var Bi=class{addCommand(e,r=!1){T.commands.add(e,r)}consumeCommand(e){return T.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Bi;var Re=f(E());var dl,fr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},td=Symbol("clearAfterUnitTest"),Tn=class extends(0,Re.withEventBus)(ge){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[dl]=()=>{this.defaultMessages={},this.cache=new Re.CacheRegistry,this.listeners={}},this.currentUiLocale=T.getState().uiLocale,T.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=T.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,Re.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var i;let o=e.toLowerCase(),s=this.resolveContext(o);return new Re.ParametrizedLabelResolver((i=this.defaultMessages[o])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(i){!(i instanceof Re.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new fr({loadedContexts:e})),this.dispatchEvent(new fr({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new fr({loadedContexts:[e]})),this.dispatchEvent(new fr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,Re.delay)(0).then(()=>n()).catch(()=>null)))}};dl=td;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Tn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Tn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Mr=window.FluidTopicsI18nService,Hi=window.FluidTopicsCustomI18nService;var pl=f(E()),ji=class{highlightHtml(e,r,n){(0,pl.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new ji;var fl=f(E());var Fi=class{isDate(e){var r,n,i,o;return(o=(i=((n=(r=T.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===e))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1}format(e,r){var n,i,o,s;if(e==null)return"";try{return fl.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:T.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Fi;var hl=f(E());var $r=class{static get(e,r){var n,i,o,s;let a=T.getState(),{lang:l,region:c}=(o=(i=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new hl.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var Vi=class{urlToSearchRequest(e){return $r.get().parse(e)}searchRequestToUrl(e){return $r.get().serialize(e)}};window.FluidTopicsUrlService=new Vi;var tt=f(E());var Nt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Nt.eventName="change";var zi=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},ml=new zi;var _n=class t extends tt.WithEventBus{static build(){return new t(window.history,ml,()=>window.location,!1)}constructor(e,r,n,i){var o,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},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,tt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Nt(this.currentItem())),0)}installProxies(){let e=r=>(n,i,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};n.apply(i,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(Nt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Nt.eventName,e)}currentItem(){return(0,tt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,tt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,tt.deepCopy)(r.find(n=>e(n)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,tt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let i=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,n);)this.hasState(o)&&(i=o),o++;return i}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let i=r??this.currentState.majorStateId,o=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return o==null||o!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=_n.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var vl=f(L());var yl=vl.css`
261
+ `;var xl=f(L()),be=f(z()),$t=f(E());var It=f(E());function gl(t,e){let{authenticationRequired:r,session:n}=T.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var Rn=class extends pr{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Wi=class t extends It.FtStateManager{static build(e){return new t(T,e)}constructor(e,r){super(),this.store=e,this.cache=new It.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Rn,this.cleanSessionDebouncer=new It.Debouncer,this.reloadDebouncer=new It.Debouncer(500),this.apiProvider=r??(()=>Dt.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(dr.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>gl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ir(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},bl=Wi.build();var Mt=class extends Event{constructor(e,r,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=n,this.subscribe=i??!1}};var Ur=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:n}=r;for(let{elementRef:i,callbackRef:o}of n){let s=i.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Mt(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],n=e.callback,i=this.pendingContextRequests.get(e.context);i===void 0&&this.pendingContextRequests.set(e.context,i={callbacks:new WeakMap,requests:[]});let o=i.callbacks.get(r);o===void 0&&i.callbacks.set(r,o=new WeakSet),o.has(n)||(o.add(n),i.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var oe=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},j=class extends $t.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=bl,this.contextRoot=new Ur}render(){return xl.html`
262
262
  <slot></slot>
263
263
  `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Mr.addContext(n)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};j.elementDefinitions={};j.styles=yl;oe([(0,be.property)()],j.prototype,"baseUrl",void 0);oe([(0,be.property)()],j.prototype,"apiIntegrationIdentifier",void 0);oe([(0,be.property)()],j.prototype,"apiIntegrationAppVersion",void 0);oe([(0,be.property)()],j.prototype,"uiLocale",void 0);oe([(0,$t.jsonProperty)(null)],j.prototype,"availableUiLocales",void 0);oe([(0,$t.jsonProperty)(null)],j.prototype,"metadataConfiguration",void 0);oe([(0,be.property)({type:Boolean})],j.prototype,"editorMode",void 0);oe([(0,be.property)({type:Boolean})],j.prototype,"noCustom",void 0);oe([(0,be.property)({type:Boolean})],j.prototype,"openExternalDocumentInNewTab",void 0);oe([(0,be.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],j.prototype,"noCustomComponent",void 0);oe([(0,be.property)({type:Boolean})],j.prototype,"withManualResources",void 0);oe([(0,be.property)({type:Boolean})],j.prototype,"navigatorOnline",void 0);oe([(0,be.property)({type:Boolean})],j.prototype,"forcedOffline",void 0);oe([(0,be.property)({type:Boolean})],j.prototype,"authenticationRequired",void 0);oe([(0,$t.jsonProperty)([])],j.prototype,"messageContexts",void 0);oe([(0,$t.jsonProperty)(void 0)],j.prototype,"session",void 0);var Sl=f(E());var Al={"ft-app-context":j};(0,Sl.customElements)(Al);var El=f(z());var Ki=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,n]=e.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},hr=new Ki;var id=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Hr=Symbol("i18nAttributes"),Cl=Symbol("i18nListAttributes"),Ol=Symbol("i18nProperties"),Ln=Symbol("i18nContexts"),Br=Symbol("i18nUnsubs"),Dn=(0,mr.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?Hi:Mr}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:d}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(s,a,...p)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(hr.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&o(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(s=this[Hr])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[Cl])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(h=>c(u,d,h))})}updateI18nProperties(o){var s;(s=this[Ol])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[Ln].set(l,{isCustomContext:a}),this[Br].has(l)||this[Br].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[Ln].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ln].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Br].forEach(o=>o()),this[Br].clear()}}return e=Ln,r=Br,id([(0,El.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Pn=class extends Dn(mr.FtLitElement){},kn=class extends Dn(mr.FtLitElementRedux){};var wl=f(E());var Gi=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(n=>typeof n=="string"?hr.fromAttribute(n):n):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},od=new Gi;var Tl=(t,e)=>(r,n)=>{var i;r.constructor.createProperty(n,{type:Object,hasChanged:wl.hasChanged,converter:hr,...e}),r[Hr]=(i=r[Hr])!==null&&i!==void 0?i:new Map,r[Hr].set(n,t??{})};var _l=f(L());var Rl=_l.css`
264
264
  `;var Nn=f(L()),In=f(z()),Mn=f(E());var jr=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Me=class extends kn{constructor(){super(),this.editorMode=!1,this.addStore(T)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Nn.nothing:Nn.html`
265
265
  <span class="ft-i18n">
266
266
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
267
267
  </span>
268
- `}update(e){var r;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Me.elementDefinitions={};Me.styles=Rl;jr([(0,Mn.redux)()],Me.prototype,"editorMode",void 0);jr([(0,In.property)()],Me.prototype,"context",void 0);jr([(0,In.property)()],Me.prototype,"key",void 0);jr([(0,Mn.jsonProperty)([])],Me.prototype,"args",void 0);jr([(0,In.property)()],Me.prototype,"defaultMessage",void 0);var Pl=f(E());var Ll={"ft-i18n":Me};(0,Pl.customElements)(Ll);var $e=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},X=class extends Pn{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new Le.Debouncer,this.revealDebouncer=new Le.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=e=>{this.isIgnored(e)||this.show()},this.onFocusIn=e=>{!this.isIgnored(e)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var e,r;return kl.html`
268
+ `}update(e){var r;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Me.elementDefinitions={};Me.styles=Rl;jr([(0,Mn.redux)()],Me.prototype,"editorMode",void 0);jr([(0,In.property)()],Me.prototype,"context",void 0);jr([(0,In.property)()],Me.prototype,"key",void 0);jr([(0,Mn.jsonProperty)([])],Me.prototype,"args",void 0);jr([(0,In.property)()],Me.prototype,"defaultMessage",void 0);var Pl=f(E());var Ll={"ft-i18n":Me};(0,Pl.customElements)(Ll);var $e=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},X=class extends Pn{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new Le.Debouncer,this.revealDebouncer=new Le.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=e=>{this.isIgnored(e)?this.matchesIgnored(e)&&this.hide():this.show()},this.onFocusIn=e=>{!this.isIgnored(e)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var e,r;return kl.html`
269
269
  <div part="container"
270
270
  class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
271
271
  <slot part="slot"></slot>
@@ -280,7 +280,7 @@
280
280
  </div>
281
281
  </div>
282
282
  </div>
283
- `}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,n;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(n=this.tooltip)===null||n===void 0||n.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let n=this.manual;this.manual=!0;let i=this.text;this.text={message:e},await this.show(r),this.text=i,this.manual=n}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&_s(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${Le.designSystemVariables.transitionDuration}, left ${Le.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(e){return this.manual||(0,Le.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}};X.elementDefinitions={"ft-typography":Y};X.styles=Zo;$e([Tl()],X.prototype,"text",void 0);$e([(0,Pe.property)({type:Boolean})],X.prototype,"manual",void 0);$e([(0,Pe.property)({type:Boolean})],X.prototype,"inline",void 0);$e([(0,Le.numberProperty)()],X.prototype,"delay",void 0);$e([(0,Pe.property)()],X.prototype,"position",void 0);$e([(0,Le.jsonProperty)([])],X.prototype,"ignoreMatchingElements",void 0);$e([(0,Pe.queryAssignedNodes)()],X.prototype,"slotNodes",void 0);$e([(0,Pe.query)(".ft-tooltip--container")],X.prototype,"container",void 0);$e([(0,Pe.query)(".ft-tooltip")],X.prototype,"tooltip",void 0);$e([(0,Pe.query)(".ft-tooltip--content")],X.prototype,"tooltipContent",void 0);$e([(0,Pe.state)()],X.prototype,"visible",void 0);var Nl=f(E());var Dl={"ft-tooltip":X};(0,Nl.customElements)(Dl);var Il=f(L()),Be=f(E()),Ue={size:Be.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:Be.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",Be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:Be.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",Be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:Be.FtCssVariableFactory.extend("--ft-icon-material-font-family","",Be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:Be.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Ml=[Il.css`
283
+ `}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,n;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(n=this.tooltip)===null||n===void 0||n.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let n=this.manual;this.manual=!0;let i=this.text;this.text={message:e},await this.show(r),this.text=i,this.manual=n}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&_s(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${Le.designSystemVariables.transitionDuration}, left ${Le.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(e){return(0,Le.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(e){return this.manual||this.matchesIgnored(e)}};X.elementDefinitions={"ft-typography":Y};X.styles=Zo;$e([Tl()],X.prototype,"text",void 0);$e([(0,Pe.property)({type:Boolean})],X.prototype,"manual",void 0);$e([(0,Pe.property)({type:Boolean})],X.prototype,"inline",void 0);$e([(0,Le.numberProperty)()],X.prototype,"delay",void 0);$e([(0,Pe.property)()],X.prototype,"position",void 0);$e([(0,Le.jsonProperty)([])],X.prototype,"ignoreMatchingElements",void 0);$e([(0,Pe.queryAssignedNodes)()],X.prototype,"slotNodes",void 0);$e([(0,Pe.query)(".ft-tooltip--container")],X.prototype,"container",void 0);$e([(0,Pe.query)(".ft-tooltip")],X.prototype,"tooltip",void 0);$e([(0,Pe.query)(".ft-tooltip--content")],X.prototype,"tooltipContent",void 0);$e([(0,Pe.state)()],X.prototype,"visible",void 0);var Nl=f(E());var Dl={"ft-tooltip":X};(0,Nl.customElements)(Dl);var Il=f(L()),Be=f(E()),Ue={size:Be.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:Be.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",Be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:Be.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",Be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:Be.FtCssVariableFactory.extend("--ft-icon-material-font-family","",Be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:Be.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Ml=[Il.css`
284
284
  :host, i.ft-icon {
285
285
  display: inline-flex;
286
286
  align-items: center;