@fluid-topics/ft-reader-search-in-document 2.2.39 → 2.2.41

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.
@@ -267,7 +267,7 @@
267
267
  position: relative;
268
268
  word-break: break-word;
269
269
  }
270
- `});function Qd(t,e,r){return Ur(t,Bs(e,r))}function Bo(t,e){return typeof t=="function"?t(e):t}function Vs(t){return t.split("-")[0]}function Vr(t){return t.split("-")[1]}function rl(t){return t==="x"?"y":"x"}function il(t){return t==="y"?"height":"width"}function Uo(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function sl(t){return rl(Uo(t))}function Xd(t,e,r){r===void 0&&(r=!1);let i=Vr(t),s=sl(t),o=il(s),n=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(n=el(n)),[n,el(n)]}function Yd(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function el(t){let e=Vs(t);return Kx[e]+t.slice(e.length)}function Wx(t){var e,r,i,s;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(s=t.left)!=null?s:0}}function Zd(t){return typeof t!="number"?Wx(t):{top:t,right:t,bottom:t,left:t}}function gi(t){let{x:e,y:r,width:i,height:s}=t;return{width:i,height:s,top:r,left:e,right:e+i,bottom:r+s,x:e,y:r}}var Gd,Wd,tl,Bs,Ur,Us,nr,Kx,Vo=l(()=>{Gd=["top","right","bottom","left"],Wd=["start","end"],tl=Gd.reduce((t,e)=>t.concat(e,e+"-"+Wd[0],e+"-"+Wd[1]),[]),Bs=Math.min,Ur=Math.max,Us=Math.round,nr=t=>({x:t,y:t}),Kx={left:"right",right:"left",bottom:"top",top:"bottom"}});function Jd(t,e,r){let{reference:i,floating:s}=t,o=Uo(e),n=sl(e),a=il(n),u=Vs(e),d=o==="y",p=i.x+i.width/2-s.width/2,h=i.y+i.height/2-s.height/2,m=i[a]/2-s[a]/2,x;switch(u){case"top":x={x:p,y:i.y-s.height};break;case"bottom":x={x:p,y:i.y+i.height};break;case"right":x={x:i.x+i.width,y:h};break;case"left":x={x:i.x-s.width,y:h};break;default:x={x:i.x,y:i.y}}let C=Vr(e);return C&&(x[n]+=m*(C==="end"?1:-1)*(r&&d?-1:1)),x}async function ep(t,e){var r;e===void 0&&(e={});let{x:i,y:s,platform:o,rects:n,elements:a,strategy:u}=t,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:m=!1,padding:x=0}=Bo(e,t),C=Zd(x),E=a[m?h==="floating"?"reference":"floating":h],P=gi(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(E)))==null||r?E:E.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:d,rootBoundary:p,strategy:u})),G=h==="floating"?{x:i,y:s,width:n.floating.width,height:n.floating.height}:n.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(A))&&await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1},ee=gi(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:G,offsetParent:A,strategy:u}):G);return{top:(P.top-ee.top+C.top)/_.y,bottom:(ee.bottom-P.bottom+C.bottom)/_.y,left:(P.left-ee.left+C.left)/_.x,right:(ee.right-P.right+C.right)/_.x}}function Qx(t,e,r){return(t?[...r.filter(s=>Vr(s)===t),...r.filter(s=>Vr(s)!==t)]:r.filter(s=>Vs(s)===s)).filter(s=>t?Vr(s)===t||(e?Yd(s)!==s:!1):!0)}var Gx,tp,rp,ip,sp=l(()=>{Vo();Vo();Gx=50,tp=async(t,e,r)=>{let{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:n}=r,a=n.detectOverflow?n:{...n,detectOverflow:ep},u=await(n.isRTL==null?void 0:n.isRTL(e)),d=await n.getElementRects({reference:t,floating:e,strategy:s}),{x:p,y:h}=Jd(d,i,u),m=i,x=0,C={};for(let k=0;k<o.length;k++){let E=o[k];if(!E)continue;let{name:P,fn:G}=E,{x:A,y:_,data:ee,reset:K}=await G({x:p,y:h,initialPlacement:i,placement:m,strategy:s,middlewareData:C,rects:d,platform:a,elements:{reference:t,floating:e}});p=A??p,h=_??h,C[P]={...C[P],...ee},K&&x<Gx&&(x++,typeof K=="object"&&(K.placement&&(m=K.placement),K.rects&&(d=K.rects===!0?await n.getElementRects({reference:t,floating:e,strategy:s}):K.rects),{x:p,y:h}=Jd(d,m,u)),k=-1)}return{x:p,y:h,placement:m,strategy:s,middlewareData:C}};rp=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,s;let{rects:o,middlewareData:n,placement:a,platform:u,elements:d}=e,{crossAxis:p=!1,alignment:h,allowedPlacements:m=tl,autoAlignment:x=!0,...C}=Bo(t,e),k=h!==void 0||m===tl?Qx(h||null,x,m):m,E=((r=n.autoPlacement)==null?void 0:r.index)||0,P=k[E];if(P==null)return{};if(a!==P)return{reset:{placement:k[0]}};let G=await u.detectOverflow(e,C),A=Xd(P,o,await(u.isRTL==null?void 0:u.isRTL(d.floating))),_=[G[Vs(P)],G[A[0]],G[A[1]]],ee=[...((i=n.autoPlacement)==null?void 0:i.overflows)||[],{placement:P,overflows:_}],K=k[E+1];if(K)return{data:{index:E+1,overflows:ee},reset:{placement:K}};let Re=ee.map(Tt=>{let Is=Vr(Tt.placement);return[Tt.placement,Is&&p?Tt.overflows.slice(0,2).reduce(($x,Dx)=>$x+Dx,0):Tt.overflows[0],Tt.overflows]}).sort((Tt,Is)=>Tt[1]-Is[1]),Do=((s=Re.filter(Tt=>Tt[2].slice(0,Vr(Tt[0])?2:3).every(Is=>Is<=0))[0])==null?void 0:s[0])||Re[0][0];return Do!==a?{data:{index:E+1,overflows:ee},reset:{placement:Do}}:{}}}},ip=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:s,platform:o}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:u={fn:G=>{let{x:A,y:_}=G;return{x:A,y:_}}},...d}=Bo(t,e),p={x:r,y:i},h=await o.detectOverflow(e,d),m=Uo(s),x=rl(m),C=p[x],k=p[m],E=(G,A)=>Qd(A+h[G==="y"?"top":"left"],A,A-h[G==="y"?"bottom":"right"]);n&&(C=E(x,C)),a&&(k=E(m,k));let P=u.fn({...e,[x]:C,[m]:k});return{...P,data:{x:P.x-r,y:P.y-i,enabled:{[x]:n,[m]:a}}}}}}});function Ho(){return typeof window<"u"}function bi(t){return np(t)?(t.nodeName||"").toLowerCase():"#document"}function ct(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ar(t){var e;return(e=(np(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function np(t){return Ho()?t instanceof Node||t instanceof ct(t).Node:!1}function qt(t){return Ho()?t instanceof Element||t instanceof ct(t).Element:!1}function wr(t){return Ho()?t instanceof HTMLElement||t instanceof ct(t).HTMLElement:!1}function op(t){return!Ho()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ct(t).ShadowRoot}function zs(t){let{overflow:e,overflowX:r,overflowY:i,display:s}=Kt(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&s!=="inline"&&s!=="contents"}function ap(t){return/^(table|td|th)$/.test(bi(t))}function Hs(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}function Xi(t){let e=qt(t)?Kt(t):t;return yi(e.transform)||yi(e.translate)||yi(e.scale)||yi(e.rotate)||yi(e.perspective)||!jo()&&(yi(e.backdropFilter)||yi(e.filter))||Xx.test(e.willChange||"")||Yx.test(e.contain||"")}function lp(t){let e=zr(t);for(;wr(e)&&!Yi(e);){if(Xi(e))return e;if(Hs(e))return null;e=zr(e)}return null}function jo(){return ol==null&&(ol=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ol}function Yi(t){return/^(html|body|#document)$/.test(bi(t))}function Kt(t){return ct(t).getComputedStyle(t)}function js(t){return qt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function zr(t){if(bi(t)==="html")return t;let e=t.assignedSlot||t.parentNode||op(t)&&t.host||Ar(t);return op(e)?e.host:e}function cp(t){let e=zr(t);return Yi(e)?(t.ownerDocument||t).body:wr(e)&&zs(e)?e:cp(e)}function zo(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let s=cp(t),o=s===((i=t.ownerDocument)==null?void 0:i.body),n=ct(s);if(o){let a=qo(n);return e.concat(n,n.visualViewport||[],zs(s)?s:[],a&&r?zo(a):[])}else return e.concat(s,zo(s,[],r))}function qo(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}var Xx,Yx,yi,ol,nl=l(()=>{Xx=/transform|translate|scale|rotate|perspective|filter/,Yx=/paint|layout|strict|content/,yi=t=>!!t&&t!=="none"});function pp(t){let e=Kt(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,s=wr(t),o=s?t.offsetWidth:r,n=s?t.offsetHeight:i,a=Us(r)!==o||Us(i)!==n;return a&&(r=o,i=n),{width:r,height:i,$:a}}function hp(t){return qt(t)?t:t.contextElement}function Zi(t){let e=hp(t);if(!wr(e))return nr(1);let r=e.getBoundingClientRect(),{width:i,height:s,$:o}=pp(e),n=(o?Us(r.width):r.width)/i,a=(o?Us(r.height):r.height)/s;return(!n||!Number.isFinite(n))&&(n=1),(!a||!Number.isFinite(a))&&(a=1),{x:n,y:a}}function fp(t){let e=ct(t);return!jo()||!e.visualViewport?Zx:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Jx(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===ct(t)}function qs(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let s=t.getBoundingClientRect(),o=hp(t),n=nr(1);e&&(i?qt(i)&&(n=Zi(i)):n=Zi(t));let a=Jx(o,r,i)?fp(o):nr(0),u=(s.left+a.x)/n.x,d=(s.top+a.y)/n.y,p=s.width/n.x,h=s.height/n.y;if(o&&i){let m=ct(o),x=qt(i)?ct(i):i,C=m,k=qo(C);for(;k&&x!==C;){let E=Zi(k),P=k.getBoundingClientRect(),G=Kt(k),A=P.left+(k.clientLeft+parseFloat(G.paddingLeft))*E.x,_=P.top+(k.clientTop+parseFloat(G.paddingTop))*E.y;u*=E.x,d*=E.y,p*=E.x,h*=E.y,u+=A,d+=_,C=ct(k),k=qo(C)}}return gi({width:p,height:h,x:u,y:d})}function Ko(t,e){let r=js(t).scrollLeft;return e?e.left+r:qs(Ar(t)).left+r}function mp(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-Ko(t,r),s=r.top+e.scrollTop;return{x:i,y:s}}function eS(t){let{elements:e,rect:r,offsetParent:i,strategy:s}=t,o=s==="fixed",n=Ar(i),a=e?Hs(e.floating):!1;if(i===n||a&&o)return r;let u={scrollLeft:0,scrollTop:0},d=nr(1),p=nr(0),h=wr(i);if((h||!o)&&((bi(i)!=="body"||zs(n))&&(u=js(i)),h)){let x=qs(i);d=Zi(i),p.x=x.x+i.clientLeft,p.y=x.y+i.clientTop}let m=n&&!h&&!o?mp(n,u):nr(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+p.x+m.x,y:r.y*d.y-u.scrollTop*d.y+p.y+m.y}}function tS(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function rS(t){let e=js(t),r=t.ownerDocument.body,i=Ur(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ur(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-e.scrollLeft+Ko(t),n=-e.scrollTop;return Kt(r).direction==="rtl"&&(o+=Ur(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:n}}function sS(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",s=ct(t),o=Ar(t),n=s.visualViewport,a=o.clientWidth,u=o.clientHeight,d=0,p=0;if(n){let m=!jo()||e==="fixed";i?m||(d=-n.offsetLeft,p=-n.offsetTop):(a=n.width,u=n.height,m&&(d=n.offsetLeft,p=n.offsetTop))}if(Ko(o)<=0){let m=o.ownerDocument,x=m.body,C=getComputedStyle(x),k=m.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,E=Math.abs(o.clientWidth-x.clientWidth-k),P=getComputedStyle(o).scrollbarGutter==="stable both-edges"?E/2:E;P<=iS&&(a-=P)}return{width:a,height:u,x:d,y:p}}function oS(t,e){let r=qs(t,!0,e==="fixed"),i=r.top+t.clientTop,s=r.left+t.clientLeft,o=Zi(t),n=t.clientWidth*o.x,a=t.clientHeight*o.y,u=s*o.x,d=i*o.y;return{width:n,height:a,x:u,y:d}}function up(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=sS(t,r,e);else if(e==="document")i=rS(Ar(t));else if(qt(e))i=oS(e,r);else{let s=fp(t);i={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return gi(i)}function nS(t,e){let r=e.get(t);if(r)return r;let i=zo(t,[],!1).filter(a=>qt(a)&&bi(a)!=="body"),s=null,o=Kt(t).position==="fixed",n=o?zr(t):t;for(;qt(n)&&!Yi(n);){let a=Kt(n),u=Xi(n),d=s?s.position:o?"fixed":"";!u&&(d==="fixed"||d==="absolute"&&a.position==="static")?i=i.filter(h=>h!==n):s=a,n=zr(n)}return e.set(t,i),i}function aS(t){let{element:e,boundary:r,rootBoundary:i,strategy:s}=t,n=[...r==="clippingAncestors"?Hs(e)?[]:nS(e,this._c):[].concat(r),i],a=up(e,n[0],s),u=a.top,d=a.right,p=a.bottom,h=a.left;for(let m=1;m<n.length;m++){let x=up(e,n[m],s);u=Ur(x.top,u),d=Bs(x.right,d),p=Bs(x.bottom,p),h=Ur(x.left,h)}return{width:d-h,height:p-u,x:h,y:u}}function lS(t){let{width:e,height:r}=pp(t);return{width:e,height:r}}function cS(t,e,r){let i=wr(e),s=Ar(e),o=r==="fixed",n=qs(t,!0,o,e),a={scrollLeft:0,scrollTop:0},u=nr(0);if((i||!o)&&((bi(e)!=="body"||zs(s))&&(a=js(e)),i)){let m=qs(e,!0,o,e);u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}!i&&s&&(u.x=Ko(s));let d=s&&!i&&!o?mp(s,a):nr(0),p=n.left+a.scrollLeft-u.x-d.x,h=n.top+a.scrollTop-u.y-d.y;return{x:p,y:h,width:n.width,height:n.height}}function al(t){return Kt(t).position==="static"}function dp(t,e){if(!wr(t)||Kt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ar(t)===r&&(r=r.ownerDocument.body),r}function gp(t,e){let r=ct(t);if(Hs(t))return r;if(!wr(t)){let s=zr(t);for(;s&&!Yi(s);){if(qt(s)&&!al(s))return s;s=zr(s)}return r}let i=dp(t,e);for(;i&&ap(i)&&al(i);)i=dp(i,e);return i&&Yi(i)&&al(i)&&!Xi(i)?r:i||lp(t)||r}function dS(t){return Kt(t).direction==="rtl"}var Zx,iS,uS,Wo,yp,bp,vp,xp=l(()=>{sp();Vo();nl();Zx=nr(0);iS=25;uS=async function(t){let e=this.getOffsetParent||gp,r=this.getDimensions,i=await r(t.floating);return{reference:cS(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};Wo={convertOffsetParentRelativeRectToViewportRelativeRect:eS,getDocumentElement:Ar,getClippingRect:aS,getOffsetParent:gp,getElementRects:uS,getClientRects:tS,getDimensions:lS,getScale:Zi,isElement:qt,isRTL:dS},yp=rp,bp=ip,vp=(t,e,r)=>{let i=new Map,s=r??{},o={...Wo,...s.platform,_c:i};return tp(t,e,{...s,platform:o})}});function Sp(t){return pS(t)}function ll(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function pS(t){for(let e=t;e;e=ll(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=ll(t);e;e=ll(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Xi(r)||e.tagName==="BODY"))return e}return null}var Ep=l(()=>{nl()});async function Cp(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},vp(t,e,{strategy:i.strategy,platform:{...Wo,getOffsetParent:s=>Wo.getOffsetParent(s,Sp)},middleware:[bp({crossAxis:!0}),yp({allowedPlacements:[i.placement]})]})}var Ap=l(()=>{"use strict";xp();Ep()});function Op(t,e){return(0,wp.property)({type:Object,converter:hS(t),hasChanged:Ws,...e??{}})}var wp,cl,hS,Go=l(()=>{"use strict";wp=c(F(),1);vi();cl=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},hS=t=>({fromAttribute:e=>{if(e==null)return Ks(t);try{return JSON.parse(e)}catch{return Ks(t)}},toAttribute:e=>JSON.stringify(e)})});function fS(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Ji(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Ji(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let s=n=>Object.keys(n).filter(a=>n[a]!=null),o=s(t);if(r=o.length,r!==s(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){let n=o[i];if(!Ji(t[n],e[n]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Ji(t,e){try{return fS(t,e)}catch{return!1}}function Ws(t,e){return!Ji(t,e)}function Ks(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Qo(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let s=e(i);return s[t]=!0,s}}var vi=l(()=>{"use strict";Go()});var _p,ul,Rp=l(()=>{"use strict";vi();_p=c(F(),1),ul=t=>{let e=t??{};return(r,i)=>{var s;let o={hasChanged:Ws,attribute:!1,...e};(0,_p.property)(o)(r,i);let n=r.constructor;n.reduxProperties=new Map(n.reduxProperties),n.reduxProperties.set(i,{selector:(s=e.selector)!==null&&s!==void 0?s:(a=>a[i]),store:e.store})}}});var Xo,dl=l(()=>{"use strict";Xo=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}}});var Yo,Tp=l(()=>{"use strict";Yo=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let s=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let n of i)try{await n()}catch(a){s(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 Jo,Zo,kp=l(()=>{"use strict";Jo=c(y(),1);Go();Zo=class extends Jo.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return(0,Jo.adoptStyles)(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){cl(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 Lp(t,e,...r){var i;let s=t.querySelector(e);for(let o of r)s=(i=s?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return s}var Ip=l(()=>{"use strict"});var xi,ts,Mp,$p,Dp,Np,Pp,es,ar,Fp=l(()=>{"use strict";xi=c(F(),1);Go();Tp();kp();Ip();ts=function(t,e,r,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(s<3?n(o):s>3?n(e,r,o):n(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o},$p=Symbol("constructorPrototype"),Dp=Symbol("constructorName"),Np=Symbol("exportpartsDebouncer"),Pp=Symbol("dynamicDependenciesLoaded"),es=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};es.eventName="exportparts-updated";ar=class extends Zo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Mp]=new Yo(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Np].run(()=>{var s,o;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.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[Dp]=this.constructor.name,this[$p]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Dp]&&Object.setPrototypeOf(this,this[$p])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Pp]||(r[Pp]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(es.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(es.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 es)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:s}=this.elementToFocus;if(i!=null){let o=[...s??[],i];r=Lp(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,s;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,i,s,o,n,a;let u=m=>m!=null&&m.trim().length>0,d=e.filter(u).map(m=>m.trim());if(d.length===0){this.exportparts=void 0;return}let p=new Set;for(let m of(o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let x=(n=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&n!==void 0?n:[],C=(a=(s=m.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(E=>E.split(":")[1]))!==null&&a!==void 0?a:[],k=[...x,...C].filter(u).map(E=>E.trim());for(let E of k)p.add(E)}if(p.size===0){this.exportparts=void 0;return}let h=[...p.values()].flatMap(m=>d.map(x=>`${m}:${x}--${m}`));this.exportparts=[...this.part,...h].join(", ")}};Mp=Np;ts([(0,xi.property)()],ar.prototype,"exportpartsPrefix",void 0);ts([Op([])],ar.prototype,"exportpartsPrefixes",void 0);ts([(0,xi.property)({reflect:!0})],ar.prototype,"exportparts",void 0);ts([(0,xi.property)()],ar.prototype,"customStylesheet",void 0);ts([(0,xi.property)()],ar.prototype,"elementToFocus",void 0);ts([(0,xi.state)()],ar.prototype,"useAdoptedStyleSheets",void 0)});function en(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var tn=l(()=>{"use strict"});var Gs,Hr,Si,mS,Bp,Up=l(()=>{"use strict";Fp();tn();vi();Gs=Symbol("internalReduxEventsUnsubscribers"),Hr=Symbol("internalStoresUnsubscribers"),Si=Symbol("internalStores"),mS=Qo(Symbol("withRedux"),function(t){var e,r,i;class s extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(n){super.willUpdate(n),[...this.reduxConstructor.reduxReactiveProperties].some(a=>n.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Si].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Si].values()][0]}getStore(n){return n==null?this.getUnnamedStore():this[Si].get(n)}addStore(n,a){var u;a=(u=a??n.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(a),this[Si].set(a,n),this.subscribeToStore(a,n),this.updateFromStores()}removeStore(n){let a=typeof n=="string"?n:n.name;this.unsubscribeFromStore(a),this[Si].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Si].forEach((n,a)=>this.subscribeToStore(a,n)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((n,a)=>{let u=this.constructor.getPropertyOptions(a);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:a)){let d=this.getStore(n.store);d&&(n.store?this[Hr].has(n.store):this[Hr].size>0)&&(this[a]=n.selector(d.getState(),this))}})}subscribeToStore(n,a){var u,d;this[Hr].set(n,a.subscribe(()=>this.updateFromStores())),this[Gs].set(n,[]),en(a)&&(!((u=a.deprecatedKeys)===null||u===void 0)&&u.length&&this.reduxConstructor.reduxProperties.forEach((p,h)=>{this.getStore(p.store)===a&&a.deprecatedKeys.includes(h)&&console.warn("Element",this,"is subscribed to deprecated key",h,"in store",a.name)}),a.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||a.name===p.store)){let m=x=>this[h](x);a.addEventListener(p.eventName,m),this[Gs].get(n).push(()=>a.removeEventListener(p.eventName,m))}}))),this.onStoreAvailable(n)}unsubscribeFromStores(){this[Hr].forEach((n,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(n){var a;this[Hr].has(n)&&this[Hr].get(n)(),this[Hr].delete(n),(a=this[Gs].get(n))===null||a===void 0||a.forEach(u=>u()),this[Gs].delete(n)}onStoreAvailable(n){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Hr,r=Si,i=Gs,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),Bp=class extends mS(ar){}});function Me(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. `}function sn(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function hl(t,e,r){if(typeof t!="function")throw new Error(Me(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Me(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Me(1));return r(hl)(t,e)}let i=t,s=e,o=new Map,n=o,a=0,u=!1;function d(){n===o&&(n=new Map,o.forEach((E,P)=>{n.set(P,E)}))}function p(){if(u)throw new Error(Me(3));return s}function h(E){if(typeof E!="function")throw new Error(Me(4));if(u)throw new Error(Me(5));let P=!0;d();let G=a++;return n.set(G,E),function(){if(P){if(u)throw new Error(Me(6));P=!1,d(),n.delete(G),o=null}}}function m(E){if(!sn(E))throw new Error(Me(7));if(typeof E.type>"u")throw new Error(Me(8));if(typeof E.type!="string")throw new Error(Me(17));if(u)throw new Error(Me(9));try{u=!0,s=i(s,E)}finally{u=!1}return(o=n).forEach(G=>{G()}),E}function x(E){if(typeof E!="function")throw new Error(Me(10));i=E,m({type:rn.REPLACE})}function C(){let E=h;return{subscribe(P){if(typeof P!="object"||P===null)throw new Error(Me(11));function G(){let _=P;_.next&&_.next(p())}return G(),{unsubscribe:E(G)}},[Vp](){return this}}}return m({type:rn.INIT}),{dispatch:m,subscribe:h,getState:p,replaceReducer:x,[Vp]:C}}function bS(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:rn.INIT})>"u")throw new Error(Me(12));if(typeof r(void 0,{type:rn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Me(13))})}function fl(t){let e=Object.keys(t),r={};for(let n=0;n<e.length;n++){let a=e[n];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),s,o;try{bS(r)}catch(n){o=n}return function(a={},u){if(o)throw o;let d=!1,p={};for(let h=0;h<i.length;h++){let m=i[h],x=r[m],C=a[m],k=x(C,u);if(typeof k>"u"){let E=u&&u.type;throw new Error(Me(14))}p[m]=k,d=d||k!==C}return d=d||i.length!==Object.keys(a).length,d?p:a}}function Qs(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function zp(...t){return e=>(r,i)=>{let s=e(r,i),o=()=>{throw new Error(Me(15))},n={getState:s.getState,dispatch:(u,...d)=>o(u,...d)},a=t.map(u=>u(n));return o=Qs(...a)(s.dispatch),{...s,dispatch:o}}}function Hp(t){return sn(t)&&"type"in t&&typeof t.type=="string"}var gS,Vp,pl,yS,rn,ml=l(()=>{gS=typeof Symbol=="function"&&Symbol.observable||"@@observable",Vp=gS,pl=()=>Math.random().toString(36).substring(7).split("").join("."),yS={INIT:`@@redux/INIT${pl()}`,REPLACE:`@@redux/REPLACE${pl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pl()}`},rn=yS});function Wt(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}function yt(t){return t?Jp(t)||gn(t)||!!t[jp]||!!t[ln]?.[jp]||yn(t)||eo(t):!1}function Jp(t){if(!t||!_l(t))return!1;let e=is(t);if(e===null||e===gt[fn])return!0;let r=gt.hasOwnProperty.call(e,ln)&&e[ln];if(r===Object)return!0;if(!rs(r))return!1;let i=qp.get(r);return i===void 0&&(i=Function.toString.call(r),qp.set(r,i)),i===vS}function mn(t,e,r=!0){Js(t)===0?(r?Reflect.ownKeys(t):gt.keys(t)).forEach(s=>{e(s,t[s],t)}):t.forEach((i,s)=>e(s,i,t))}function Js(t){let e=t[je];return e?e.type_:gn(t)?1:yn(t)?2:eo(t)?3:0}function xS(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function SS(t){let e=+t;return Number.isInteger(e)&&String(e)===t}function Sl(t,e){if(yn(t))return new Map(t);if(eo(t))return new Set(t);if(gn(t))return Array[fn].slice.call(t);let r=Jp(t);if(e===!0||e==="class_only"&&!r){let i=gt.getOwnPropertyDescriptors(t);delete i[je];let s=Reflect.ownKeys(i);for(let o=0;o<s.length;o++){let n=s[o],a=i[n];a[nn]===!1&&(a[nn]=!0,a[vl]=!0),(a.get||a.set)&&(i[n]={[vl]:!0,[nn]:!0,[cn]:a[cn],[Xs]:t[n]})}return gt.create(is(t),i)}else{let i=is(t);if(i!==null&&r)return{...t};let s=gt.create(i);return gt.assign(s,t)}}function bn(t,e=!1){return vn(t)||lr(t)||!yt(t)||(Js(t)>1&&gt.defineProperties(t,{set:on,add:on,clear:on,delete:on}),gt.freeze(t),e&&mn(t,(r,i)=>{bn(i,!0)},!1)),t}function ES(){Wt(2)}function vn(t){return t===null||!_l(t)?!0:gt.isFrozen(t)}function Ei(t){let e=eh[t];return e||Wt(0,t),e}function Gp(t,e){e&&(t.patchPlugin_=Ei(El),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Cl(t){Al(t),t.drafts_.forEach(AS),t.drafts_=null}function Al(t){t===Ys&&(Ys=t.parent_)}function AS(t){let e=t[je];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Xp(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[je].modified_&&(Cl(e),Wt(4)),yt(t)&&(t=Yp(e,t));let{patchPlugin_:s}=e;s&&s.generateReplacementPatches_(r[je].base_,t,e)}else t=Yp(e,r);return wS(e,t,!0),Cl(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Zp?t:void 0}function Yp(t,e){if(vn(e))return e;let r=e[je];if(!r)return pn(e,t.handledSet_,t);if(!xn(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);sh(r,t)}return r.copy_}function wS(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&bn(e,r)}function rh(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}function ih(t,e,r,i){let s=Or(t),o=t.type_;if(i!==void 0&&xl(s,i,o)===e){un(s,i,r,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;mn(s,(u,d)=>{if(lr(d)){let p=a.get(d)||[];p.push(u),a.set(d,p)}})}let n=t.draftLocations_.get(e)??OS;for(let a of n)un(s,a,r,o)}function _S(t,e,r){t.callbacks_.push(function(s){let o=e;if(!o||!xn(o,s))return;s.mapSetPlugin_?.fixSetContents(o);let n=Rl(o);ih(t,o.draft_??o,n,r),sh(o,s)})}function sh(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let s=i.getPath(t);s&&i.generatePatches_(t,s,e)}rh(t)}}function RS(t,e,r){let{scope_:i}=t;if(lr(r)){let s=r[je];xn(s,i)&&s.callbacks_.push(function(){an(t);let n=Rl(s);ih(t,r,n,e)})}else yt(r)&&t.callbacks_.push(function(){let o=Or(t);t.type_===3?o.has(r)&&pn(r,i.handledSet_,i):xl(o,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&pn(xl(t.copy_,e,t.type_),i.handledSet_,i)})}function pn(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||lr(t)||e.has(t)||!yt(t)||vn(t)||(e.add(t),mn(t,(i,s)=>{if(lr(s)){let o=s[je];if(xn(o,r)){let n=Rl(o);un(t,i,n,t.type_),rh(o)}}else yt(s)&&pn(s,e,r)})),t}function TS(t,e){let r=gn(t),i={type_:r?1:0,scope_:e?e.scope_:th(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=i,o=hn;r&&(s=[i],o=Zs);let{revoke:n,proxy:a}=Proxy.revocable(s,o);return i.draft_=a,i.revoke_=n,[a,i]}function bl(t,e){let r=t[je];return(r?Or(r):t)[e]}function kS(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||!yt(r)||r[je]?!1:t.baseRefs_.has(r)}function LS(t,e,r){let i=oh(e,r);return i?Xs in i?i[Xs]:i.get?.call(t.draft_):void 0}function oh(t,e){if(!(e in t))return;let r=is(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=is(r)}}function wl(t){t.modified_||(t.modified_=!0,t.parent_&&wl(t.parent_))}function an(t){t.copy_||(t.assigned_=new Map,t.copy_=Sl(t.base_,t.scope_.immer_.useStrictShallowCopy_))}function Ol(t,e,r,i){let[s,o]=yn(e)?Ei(dn).proxyMap_(e,r):eo(e)?Ei(dn).proxySet_(e,r):TS(e,r);return(r?.scope_??th()).drafts_.push(s),o.callbacks_=r?.callbacks_??[],o.key_=i,r&&i!==void 0?_S(r,o,i):o.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:d}=u;o.modified_&&d&&d.generatePatches_(o,[],u)}),s}function nh(t){return lr(t)||Wt(10,t),ah(t)}function ah(t){if(!yt(t)||vn(t))return t;let e=t[je],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Sl(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=Sl(t,!0);let s=r;return eo(r)&&(r=new Set),mn(s,(o,n)=>{un(r,o,ah(n))},i),e&&(e.finalized_=!1),r}var Zp,jp,je,gt,is,ln,fn,vl,cn,nn,Xs,lr,vS,qp,gl,xl,un,gn,yn,eo,_l,rs,yl,Or,Rl,on,dn,El,Kp,eh,Wp,Ys,th,CS,Qp,xn,OS,hn,Zs,IS,$S,x0,DS,Tl,lh=l(()=>{Zp=Symbol.for("immer-nothing"),jp=Symbol.for("immer-draftable"),je=Symbol.for("immer-state");gt=Object,is=gt.getPrototypeOf,ln="constructor",fn="prototype",vl="configurable",cn="enumerable",nn="writable",Xs="value",lr=t=>!!t&&!!t[je];vS=gt[fn][ln].toString(),qp=new WeakMap;gl=(t,e,r=Js(t))=>r===2?t.has(e):gt[fn].hasOwnProperty.call(t,e),xl=(t,e,r=Js(t))=>r===2?t.get(e):t[e],un=(t,e,r,i=Js(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};gn=Array.isArray,yn=t=>t instanceof Map,eo=t=>t instanceof Set,_l=t=>typeof t=="object",rs=t=>typeof t=="function",yl=t=>typeof t=="boolean";Or=t=>t.copy_||t.base_,Rl=t=>t.modified_?t.copy_:t.base_;on={[Xs]:ES};dn="MapSet",El="Patches",Kp="ArrayMethods",eh={};Wp=t=>!!eh[t],th=()=>Ys,CS=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Wp(dn)?Ei(dn):void 0,arrayMethodsPlugin_:Wp(Kp)?Ei(Kp):void 0});Qp=t=>Ys=CS(Ys,t);xn=(t,e)=>t.scope_===e,OS=[];hn={get(t,e){if(e===je)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let s=Or(t);if(!gl(s,e,t.type_))return LS(t,s,e);let o=s[e];if(t.finalized_||!yt(o)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&SS(e))return o;if(o===bl(t.base_,e)||kS(t,e,o)){an(t);let n=t.type_===1?+e:e,a=Ol(t.scope_,o,t,n);return t.copy_[n]=a}return o},has(t,e){return e in Or(t)},ownKeys(t){return Reflect.ownKeys(Or(t))},set(t,e,r){let i=oh(Or(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let s=bl(Or(t),e),o=s?.[je];if(o&&o.base_===r)return t.copy_[e]=r,t.assigned_.delete(e),!0;if(xS(r,s)&&(r!==void 0||gl(t.base_,e,t.type_)))return!0;an(t),wl(t)}return t.copy_[e]===r&&(r!==void 0||gl(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),RS(t,e,r)),!0},deleteProperty(t,e){return an(t),bl(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),wl(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Or(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[nn]:!0,[vl]:t.type_!==1||e!=="length",[cn]:i[cn],[Xs]:r[e]}},defineProperty(){Wt(11)},getPrototypeOf(t){return is(t.base_)},setPrototypeOf(){Wt(12)}},Zs={};for(let t in hn){let e=hn[t];Zs[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Zs.deleteProperty=function(t,e){return Zs.set.call(this,t,e,void 0)};Zs.set=function(t,e,r){return hn.set.call(this,t[0],e,r,t[0])};IS=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(rs(e)&&!rs(r)){let o=r;r=e;let n=this;return function(u=o,...d){return n.produce(u,p=>r.call(this,p,...d))}}rs(r)||Wt(6),i!==void 0&&!rs(i)&&Wt(7);let s;if(yt(e)){let o=Qp(this),n=Ol(o,e,void 0),a=!0;try{s=r(n),a=!1}finally{a?Cl(o):Al(o)}return Gp(o,i),Xp(s,o)}else if(!e||!_l(e)){if(s=r(e),s===void 0&&(s=e),s===Zp&&(s=void 0),this.autoFreeze_&&bn(s,!0),i){let o=[],n=[];Ei(El).generateReplacementPatches_(e,s,{patches_:o,inversePatches_:n}),i(o,n)}return s}else Wt(1,e)},this.produceWithPatches=(e,r)=>{if(rs(e))return(n,...a)=>this.produceWithPatches(n,u=>e(u,...a));let i,s;return[this.produce(e,r,(n,a)=>{i=n,s=a}),i,s]},yl(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),yl(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),yl(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){yt(t)||Wt(8),lr(t)&&(t=nh(t));let e=Qp(this),r=Ol(e,t,void 0);return r[je].isManual_=!0,Al(e),r}finishDraft(t,e){let r=t&&t[je];(!r||!r.isManual_)&&Wt(9);let{scope_:i}=r;return Gp(i,e),Xp(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let s=e[r];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}r>-1&&(e=e.slice(r+1));let i=Ei(El).applyPatches_;return lr(t)?i(t,e):this.produce(t,s=>i(s,e))}};$S=globalThis.Iterator,x0=typeof $S?.from=="function",DS=new IS,Tl=DS.produce});function ch(t){return({dispatch:r,getState:i})=>s=>o=>typeof o=="function"?o(r,i,t):s(o)}var uh,dh,ph=l(()=>{uh=ch(),dh=ch});function jr(t,e){function r(...i){if(e){let s=e(...i);if(!s)throw new Error(cr(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>Hp(i)&&i.type===t,r}function hh(t){return yt(t)?Tl(t,()=>{}):t}function Sn(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function NS(t){return typeof t=="boolean"}function bh(t){let e=FS(),{reducer:r=void 0,middleware:i,devTools:s=!0,duplicateMiddlewareCheck:o=!0,preloadedState:n=void 0,enhancers:a=void 0}=t||{},u;if(typeof r=="function")u=r;else if(sn(r))u=fl(r);else throw new Error(cr(1));let d;typeof i=="function"?d=i(e):d=e();let p=Qs;s&&(p=PS({trace:!1,...typeof s=="object"&&s}));let h=zp(...d),m=zS(h),x=typeof a=="function"?a(m):m(),C=p(...x);return hl(u,n,C)}function vh(t){let e={},r=[],i,s={addCase(o,n){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(cr(28));if(a in e)throw new Error(cr(29));return e[a]=n,s},addAsyncThunk(o,n){return n.pending&&(e[o.pending.type]=n.pending),n.rejected&&(e[o.rejected.type]=n.rejected),n.fulfilled&&(e[o.fulfilled.type]=n.fulfilled),n.settled&&r.push({matcher:o.settled,reducer:n.settled}),s},addMatcher(o,n){return r.push({matcher:o,reducer:n}),s},addDefaultCase(o){return i=o,s}};return t(s),[e,r,i]}function HS(t){return typeof t=="function"}function jS(t,e){let[r,i,s]=vh(e),o;if(HS(t))o=()=>hh(t());else{let a=hh(t);o=()=>a}function n(a=o(),u){let d=[r[u.type],...i.filter(({matcher:p})=>p(u)).map(({reducer:p})=>p)];return d.filter(p=>!!p).length===0&&(d=[s]),d.reduce((p,h)=>{if(h)if(lr(p)){let m=h(p,u);return m===void 0?p:m}else{if(yt(p))return Tl(p,m=>h(m,u));{let m=h(p,u);if(m===void 0){if(p===null)return p;throw new Error(cr(9))}return m}}return p},a)}return n.getInitialState=o,n}function KS(...t){return e=>t.some(r=>qS(r,e))}function ZS(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function JS(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}function eE(t,e){return`${t}/${e}`}function tE({creators:t}={}){let e=t?.asyncThunk?.[xh];return function(i){let{name:s,reducerPath:o=s}=i;if(!s)throw new Error(cr(11));typeof process<"u";let n=(typeof i.reducers=="function"?i.reducers(iE()):i.reducers)||{},a=Object.keys(n),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(A,_){let ee=typeof A=="string"?A:A.type;if(!ee)throw new Error(cr(12));if(ee in u.sliceCaseReducersByType)throw new Error(cr(13));return u.sliceCaseReducersByType[ee]=_,d},addMatcher(A,_){return u.sliceMatchers.push({matcher:A,reducer:_}),d},exposeAction(A,_){return u.actionCreators[A]=_,d},exposeCaseReducer(A,_){return u.sliceCaseReducersByName[A]=_,d}};a.forEach(A=>{let _=n[A],ee={reducerName:A,type:eE(s,A),createNotation:typeof i.reducers=="function"};oE(_)?aE(ee,_,d,e):sE(ee,_,d)});function p(){let[A={},_=[],ee=void 0]=typeof i.extraReducers=="function"?vh(i.extraReducers):[i.extraReducers],K={...A,...u.sliceCaseReducersByType};return jS(i.initialState,Re=>{for(let He in K)Re.addCase(He,K[He]);for(let He of u.sliceMatchers)Re.addMatcher(He.matcher,He.reducer);for(let He of _)Re.addMatcher(He.matcher,He.reducer);ee&&Re.addDefaultCase(ee)})}let h=A=>A,m=new Map,x=new WeakMap,C;function k(A,_){return C||(C=p()),C(A,_)}function E(){return C||(C=p()),C.getInitialState()}function P(A,_=!1){function ee(Re){let He=Re[A];return typeof He>"u"&&_&&(He=Sn(x,ee,E)),He}function K(Re=h){return Sn(Sn(m,_,()=>new WeakMap),Re,()=>{let He={};for(let[Do,Tt]of Object.entries(i.selectors??{}))He[Do]=rE(Tt,Re,()=>Sn(x,Re,E),_);return He})}return{reducerPath:A,getSelectors:K,get selectors(){return K(ee)},selectSlice:ee}}let G={name:s,reducer:k,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:E,...P(o),injectInto(A,{reducerPath:_,...ee}={}){let K=_??o;return A.inject({reducerPath:K,reducer:k},ee),{...G,...P(K,!0)}}};return G}}function rE(t,e,r,i){function s(o,...n){let a=e(o);return typeof a>"u"&&i&&(a=r()),t(a,...n)}return s.unwrapped=t,s}function iE(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function sE({type:t,reducerName:e,createNotation:r},i,s){let o,n;if("reducer"in i){if(r&&!nE(i))throw new Error(cr(17));o=i.reducer,n=i.prepare}else o=i;s.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,n?jr(t,n):jr(t))}function oE(t){return t._reducerDefinitionType==="asyncThunk"}function nE(t){return t._reducerDefinitionType==="reducerWithPrepare"}function aE({type:t,reducerName:e},r,i,s){if(!s)throw new Error(cr(18));let{payloadCreator:o,fulfilled:n,pending:a,rejected:u,settled:d,options:p}=r,h=s(t,o,p);i.exposeAction(e,h),n&&i.addCase(h.fulfilled,n),a&&i.addCase(h.pending,a),u&&i.addCase(h.rejected,u),d&&i.addMatcher(h.settled,d),i.exposeCaseReducer(e,{fulfilled:n||En,pending:a||En,rejected:u||En,settled:d||En})}function En(){}function cr(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var PS,MS,yh,FS,BS,fh,US,VS,zS,qS,WS,GS,QS,kl,mh,XS,gh,YS,xh,R0,Sh,Eh,Ch,Ah,T0,k0,L0,I0,wh,Ll,lE,$0,cE,Oh=l(()=>{ml();lh();ph();ml();PS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Qs:Qs.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;MS=t=>t&&typeof t.match=="function";yh=class to extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,to.prototype)}static get[Symbol.species](){return to}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new to(...e[0].concat(this)):new to(...e.concat(this))}};FS=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:o=!0}=e??{},n=new yh;return r&&(NS(r)?n.push(uh):n.push(dh(r.extraArgument))),n},BS="RTK_autoBatch",fh=t=>e=>{setTimeout(e,t)},US=(t,e)=>r=>{let i=!1,s,o,n=()=>{i||(i=!0,cancelAnimationFrame(s),clearTimeout(o),r())};s=t(n),o=setTimeout(n,e)},VS=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),s=!0,o=!1,n=!1,a=new Set,u=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?US(window.requestAnimationFrame,100):fh(10):t.type==="callback"?t.queueNotification:fh(t.timeout),d=()=>{n=!1,o&&(o=!1,a.forEach(p=>p()))};return Object.assign({},i,{subscribe(p){let h=()=>s&&p(),m=i.subscribe(h);return a.add(p),()=>{m(),a.delete(p)}},dispatch(p){try{return s=!p?.meta?.[BS],o=!s,o&&(n||(n=!0,u(d))),i.dispatch(p)}finally{s=!0}}})},zS=t=>function(r){let{autoBatch:i=!0}=r??{},s=new yh(t);return i&&s.push(VS(typeof i=="object"?i:void 0)),s};qS=(t,e)=>MS(t)?t.match(e):t(e);WS="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",GS=(t=21)=>{let e="",r=t;for(;r--;)e+=WS[Math.random()*64|0];return e},QS=["name","message","stack","code"],kl=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},mh=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},XS=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of QS)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},gh="External signal was aborted",YS=(()=>{function t(e,r,i){let s=jr(e+"/fulfilled",(u,d,p,h)=>({payload:u,meta:{...h||{},arg:p,requestId:d,requestStatus:"fulfilled"}})),o=jr(e+"/pending",(u,d,p)=>({payload:void 0,meta:{...p||{},arg:d,requestId:u,requestStatus:"pending"}})),n=jr(e+"/rejected",(u,d,p,h,m)=>({payload:h,error:(i&&i.serializeError||XS)(u||"Rejected"),meta:{...m||{},arg:p,requestId:d,rejectedWithValue:h!==void 0,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function a(u,{signal:d}={}){return(p,h,m)=>{let x=i?.idGenerator?i.idGenerator(u):GS(),C=new AbortController,k,E;function P(A){E=A,C.abort()}d&&(d.aborted?P(gh):d.addEventListener("abort",()=>P(gh),{once:!0}));let G=(async function(){let A;try{let _=i?.condition?.(u,{getState:h,extra:m});if(JS(_)&&(_=await _),_===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(C.signal.aborted)throw{name:"AbortError",message:E||"Aborted"};let ee=new Promise((K,Re)=>{k=()=>{Re({name:"AbortError",message:E||"Aborted"})},C.signal.addEventListener("abort",k,{once:!0})});p(o(x,u,i?.getPendingMeta?.({requestId:x,arg:u},{getState:h,extra:m}))),A=await Promise.race([ee,Promise.resolve(r(u,{dispatch:p,getState:h,extra:m,requestId:x,signal:C.signal,abort:P,rejectWithValue:((K,Re)=>new kl(K,Re)),fulfillWithValue:((K,Re)=>new mh(K,Re))})).then(K=>{if(K instanceof kl)throw K;return K instanceof mh?s(K.payload,x,u,K.meta):s(K,x,u)})])}catch(_){A=_ instanceof kl?n(null,x,u,_.payload,_.meta):n(_,x,u)}finally{k&&C.signal.removeEventListener("abort",k)}return i&&!i.dispatchConditionRejection&&n.match(A)&&A.meta.condition||p(A),A})();return Object.assign(G,{abort:P,requestId:x,arg:u,unwrap(){return G.then(ZS)}})}}return Object.assign(a,{pending:o,rejected:n,fulfilled:s,settled:KS(n,s),typePrefix:e})}return t.withTypes=()=>t,t})();xh=Symbol.for("rtk-slice-createasyncthunk"),R0={[xh]:YS};Sh=tE();Eh="listener",Ch="completed",Ah="cancelled",T0=`task-${Ah}`,k0=`task-${Ch}`,L0=`${Eh}-${Ah}`,I0=`${Eh}-${Ch}`,{assign:wh}=Object,Ll="listenerMiddleware",lE=wh(jr(`${Ll}/add`),{withTypes:()=>lE}),$0=jr(`${Ll}/removeAll`),cE=wh(jr(`${Ll}/remove`),{withTypes:()=>cE})});var uE,Cn,_h=l(()=>{"use strict";vi();uE=Qo(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,s){this.eventBus.addEventListener(r,i,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,s){this.eventBus.removeEventListener(r,i,s)}}}),Cn=class extends uE(Object){}});var Rh,Th=l(()=>{"use strict";Oh();tn();dl();_h();vi();window.ftReduxStores||(window.ftReduxStores={});Rh=class t extends Cn{static get(e){var r;let i=typeof e=="string"?e:e.name,s=typeof e=="string"?void 0:e,o=window.ftReduxStores[i];if(en(o))return o;if(s==null)return;let n=Sh({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=bh({reducer:(u,d)=>{if(d.type==="CLEAR_FT_REDUX_STORE"){let p=Ks(n.getInitialState());for(let h of d.keeping)p[h]=(u??p)[h];return p}else if(typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...d.overwrites};return n.reducer(u,d)}});return window.ftReduxStores[s.name]=new t(n,a,s.eventBus,s.deprecatedKeys)}constructor(e,r,i,s){super(),this.reduxSlice=e,this.reduxStore=r,this.deprecatedKeys=s,this.isFtReduxStore=!0,this.commands=new Xo,this.injectInto=(n,a)=>this.reduxSlice.injectInto(n,a),this.selectSlice=n=>this.reduxSlice.selectSlice(n);let o=n=>n!=null?JSON.parse(JSON.stringify(n)):n;this.actions=new Proxy(this.reduxSlice.actions,{get:(n,a,u)=>{let d=a,p=n[d];return p?(...h)=>{let m=p(...h.map(o));return this.reduxStore.dispatch(m),m}:h=>{let m=d,x=this.getState()[m];Ji(x,h)||this.setState({[m]:o(h)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}}});var kh=l(()=>{"use strict";vi()});var Lh=l(()=>{"use strict"});var Ih=l(()=>{"use strict";Rp();dl();Up();Th();tn();kh();Lh()});var An,$h=l(()=>{"use strict";An=class{static format(e,r,i,s,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,s,!!o)):this.getIntlDateTime(e,r,i,s,!!o)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,s,o){let n=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(n),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(n);return o?u:s?`${a} ${u}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}}});var wn,dE,ur,ro,pE,S,qe=l(()=>{"use strict";wn=c(f()),dE="ft-app-info",ur=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ur.eventName="authentication-change";ro=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ro.eventName="ui-locale-changed";pE={session:(t,e)=>{(0,wn.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>S.dispatchEvent(new ur(e.payload)),0))}},S=wn.FtReduxStore.get({name:dE,reducers:pE,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}})});var Il,Dh,On,cA,Ph=l(()=>{"use strict";Il=c(F());Ih();$h();qe();Dh=c(f()),On=function(t,e,r,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(s<3?n(o):s>3?n(e,r,o):n(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o},cA=(0,Dh.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(S)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var s,o;return((o=(s=this.metadataDescriptors.find(a=>a.key===i))===null||s===void 0?void 0:s.date)!==null&&o!==void 0?o:!1)?a=>An.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return On([(0,Il.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),On([(0,Il.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),On([ul({store:S.name,selector:r=>{var i,s;return(s=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&s!==void 0?s:[]}})],e.prototype,"metadataDescriptors",void 0),On([ul({store:S.name})],e.prototype,"uiLocale",void 0),e})});var $l=l(()=>{});var Mh,Nh,Fh,qr,Bh,Uh,Vh,Ci,zh,Hh,jh,qh,Kh,Wh,Gh,Qh,Xh,_n,Yh,Zh,ss,Jh,Rn,ef,tf,dr,os,rf,he,Lt,sf,Dl=l(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Mh||(Mh={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Nh||(Nh={}));(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"})(Fh||(Fh={}));(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"})(qr||(qr={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Bh||(Bh={}));(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Uh||(Uh={}));(function(t){t.PUBLISHED="PUBLISHED",t.AI="AI"})(Vh||(Vh={}));(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"})(Ci||(Ci={}));(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(zh||(zh={}));(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Hh||(Hh={}));(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",t.DOC_DIFF="DOC_DIFF"})(jh||(jh={}));(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"})(qh||(qh={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Kh||(Kh={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Wh||(Wh={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Gh||(Gh={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Qh||(Qh={}));(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"})(Xh||(Xh={}));(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(_n||(_n={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(Yh||(Yh={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Zh||(Zh={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(ss||(ss={}));(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Jh||(Jh={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Rn||(Rn={}));(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"})(ef||(ef={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(tf||(tf={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(dr||(dr={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(os||(os={}));(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(rf||(rf={}));(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"})(he||(he={}));(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Lt||(Lt={}));(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(sf||(sf={}))});var of,nf,af,lf,cf,uf,df,pf,hf,ff,mf,gf,yf=l(()=>{(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(of||(of={}));(function(t){t.VALID="VALID",t.INVALID="INVALID"})(nf||(nf={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(af||(af={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(lf||(lf={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(cf||(cf={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(uf||(uf={}));(function(t){t.CHAT="CHAT",t.COMPLETION="COMPLETION",t.RAG="RAG",t.AGENT="AGENT"})(df||(df={}));(function(t){t.TEXT="TEXT",t.HTML="HTML"})(pf||(pf={}));(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(hf||(hf={}));(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(ff||(ff={}));(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"})(mf||(mf={}));(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(gf||(gf={}))});var bf=l(()=>{Dl();yf()});function vf(t,e){return t===e||(hE[t]??[]).some(r=>vf(r,e))}function io(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(i=>vf(i,e))}function xf(t,...e){return t==null?!1:e.some(r=>io(t,r))}var hE,Sf=l(()=>{Dl();hE={[he.PERSONAL_BOOK_SHARE_USER]:[he.PERSONAL_BOOK_USER],[he.HTML_EXPORT_USER]:[he.PERSONAL_BOOK_USER],[he.PDF_EXPORT_USER]:[he.PERSONAL_BOOK_USER],[he.KHUB_ADMIN]:[he.CONTENT_PUBLISHER],[he.ADMIN]:[he.KHUB_ADMIN,he.USERS_ADMIN,he.PORTAL_ADMIN,he.BEHAVIOR_DATA_USER],[he.GENERATIVE_AI_EXPORT_USER]:[he.GENERATIVE_AI_USER]}});var Ef=l(()=>{});var Kr=l(()=>{$l();bf();Sf();Ef();$l()});var Ai,Pl=l(()=>{"use strict";qe();Ai=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=S.getState(),s=e??i;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let s=S.subscribe(()=>{i=t.get(e),i&&(s(),r(i))})}})}}});var ns,Ml=l(()=>{"use strict";Pl();ns=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ai.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ai.await()}}});var Nl,Ke,Wr=l(()=>{"use strict";Nl=c(f());Ml();Ke=class extends ns{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(o,n)=>typeof n!="object"||n==null||Array.isArray(n)?n:Object.fromEntries(Object.entries(n).sort(([a],[u])=>a.localeCompare(u)));let s=this.constructor;s.commonCache=(i=s.commonCache)!==null&&i!==void 0?i:new Nl.CacheRegistry,this.cache=e?s.commonCache:new Nl.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}}});var Tn,Fl=l(()=>{"use strict";qe();Kr();Wr();Tn=class extends Ke{async listMySearches(){let{session:e}=S.getState();return io(e,he.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}}});var kn,Bl=l(()=>{"use strict";qe();Wr();kn=class extends Ke{async listMyBookmarks(){let e=S.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}}});var Ln,Cf=l(()=>{"use strict";qe();Wr();Ln=class extends Ke{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=S.getState().session;return!!e?.sessionAuthenticated}}});var In,Af=l(()=>{"use strict";Wr();qe();In=class extends Ke{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=S.getState().session;return!!e?.sessionAuthenticated}}});var $n,fE,mE,_f,Ul,Vl,wf,Of,Ye,zl,gE,Hl=l(()=>{"use strict";Kr();$n=c(f());Fl();Bl();qe();Cf();Af();fE="ft-user-assets",mE={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(Lt).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:s}=e.payload;Vl(t,r,[...Ul(t,r),s]),wf(t,r,1,i),Of(t,s)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;Vl(t,r,Ul(t,r).map(s=>s.id===i.id?i:s)),Of(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:s}=e.payload;Vl(t,r,Ul(t,r).filter(o=>o.id!==s)),wf(t,r,-1,i)}},_f={[Lt.SEARCHES]:"savedSearches",[Lt.BOOKMARKS]:"bookmarks",[Lt.BOOKS]:void 0,[Lt.COLLECTIONS]:void 0},Ul=(t,e)=>{var r;let i=_f[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},Vl=(t,e,r)=>{let i=_f[e];i&&(t[i]=r)},wf=(t,e,r,i)=>{let s=t.assetCounts.allAsset[e];if(s!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,s+r),e===Lt.BOOKMARKS&&i)){let o=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Of=(t,e)=>{let r=t.assetLabels.map(s=>s.title),i=e.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));t.assetLabels.push(...i)},Ye=$n.FtReduxStore.get({name:fE,reducers:mE,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Lt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),zl=class{constructor(e=new Ln,r=new In){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=S.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new kn,this.savedSearchesService=new Tn,S.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=S.getState();(0,$n.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(),Ye.actions.clearAssetCount(),Ye.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ye.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ye.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ye.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Ye.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Ye.getState().assetCounts.allAsset[e]!==r.count&&Ye.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Ye.getState().assetCounts.bookmarkByMap[e]!==r.count&&Ye.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Ye.getState().assetCounts.bookmarkByMap).length!==0;e===Lt.BOOKMARKS&&r&&Ye.actions.clearBookmarkCountByMap(),Ye.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;Ye.actions.bookmarks(r)}}},gE=new zl;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=gE)});var Rf=l(()=>{"use strict";Kr();Hl()});var jl,Tf=l(()=>{"use strict";qe();jl=class{addCommand(e,r=!1){S.commands.add(e,r)}consumeCommand(e){return S.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new jl});var It,kf,as,yE,Dn,ls,Pn,Lf=l(()=>{"use strict";qe();It=c(f());Wr();as=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},yE=Symbol("clearAfterUnitTest"),Dn=class extends(0,It.withEventBus)(Ke){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[kf]=()=>{this.defaultMessages={},this.cache=new It.CacheRegistry,this.listeners={}},this.currentUiLocale=S.getState().uiLocale,S.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=S.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let s={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,It.deepEqual)(this.defaultMessages[e],s)||(this.defaultMessages[e]=s,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var s;let o=e.toLowerCase(),n=this.resolveContext(o);return new It.ParametrizedLabelResolver((s=this.defaultMessages[o])!==null&&s!==void 0?s:{},n).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(s){!(s instanceof It.CanceledPromiseError)&&r&&console.error(s)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var s;return(s=this.listeners[e])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new as({loadedContexts:e})),this.dispatchEvent(new as({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new as({loadedContexts:[e]})),this.dispatchEvent(new as({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,It.delay)(0).then(()=>i()).catch(()=>null)))}};kf=yE;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Dn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Dn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});ls=window.FluidTopicsI18nService,Pn=window.FluidTopicsCustomI18nService});var If,ql,$f=l(()=>{"use strict";If=c(f()),ql=class{highlightHtml(e,r,i){(0,If.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new ql});var Df,Kl,Pf=l(()=>{"use strict";Df=c(f());qe();Kl=class{isDate(e){var r,i,s,o;return(o=(i=((s=(r=S.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===e))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1}format(e,r){var i,s,o,n;if(e==null)return"";try{return Df.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:S.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(n=r?.onlyTime)!==null&&n!==void 0?n:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Kl});var Mf,_r,Wl=l(()=>{"use strict";Mf=c(f());qe();_r=class{static get(e,r,{baseUrl:i,localesConfiguration:s,availableContentLocales:o}=S.getState()){var n;if(!r||o.length>0&&!o.some(a=>a.lang===r)){let a=s?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(n=o[0])===null||n===void 0?void 0:n.lang}return new Mf.SearchPlaceConverter(i,e??20,s?.allLanguagesAllowed,r,o)}}});var Mn,Nf=l(()=>{"use strict";Wr();Mn=class extends Ke{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([i,s])=>Array.isArray(s)?[i,s.map(o=>typeof o=="object"&&o!=null&&!Array.isArray(o)?this.sortEventArrays(o):o).sort((o,n)=>typeof o=="object"&&o!==null&&"key"in o?o.key.localeCompare(n.key):typeof o=="string"&&typeof n=="string"?o.localeCompare(n):String(o).localeCompare(String(n)))]:typeof s=="object"&&s!==null?[i,this.sortEventArrays(s)]:[i,s]);return Object.fromEntries(r)}sendEvents(e,r){let i="anything not undefined";return document.dispatchEvent(new CustomEvent("ft:analytics:userevents",{detail:e})),this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>i).catch(s=>(console.info(r),console.debug(s),i)),1e3)}}});var Gl,Ff=l(()=>{"use strict";Wl();Gl=class{urlToSearchRequest(e){return _r.get().parse(e)}searchRequestToUrl(e){return _r.get().serialize(e)}};window.FluidTopicsUrlService=new Gl});var wi,Oi,Bf=l(()=>{"use strict";wi=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};wi.eventName="before-location-change";Oi=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Oi.eventName="change"});var Ql,Uf,Vf=l(()=>{"use strict";Ql=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))}},Uf=new Ql});var Rr,Nn,zf=l(()=>{"use strict";Rr=c(f());Bf();Vf();Nn=class t extends Rr.WithEventBus{static build(){return new t(window.history,Uf,()=>window.location,!1)}constructor(e,r,i,s){var o,n;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(n=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&n!==void 0?n:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Rr.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Oi(this.currentItem())),0)}installProxies(){let e=r=>(i,s,[o,n,a])=>{let u=new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),d=new wi(u);this.dispatchEvent(d);let p=r(),h={...p===this.currentIndex?this.currentState:void 0,...o,index:p,href:d.detail.nextLocation.href};i.apply(s,[h,n,h.href]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(e){this.addEventListener(wi.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(wi.eventName,e)}addHistoryChangeListener(e){this.addEventListener(Oi.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Oi.eventName,e)}currentItem(){return(0,Rr.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,Rr.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Rr.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Rr.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let s=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(s=o),o++;return s}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let s=r??this.currentState.majorStateId,o=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=s}}});var Hf=l(()=>{"use strict";zf();window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Nn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)})});var jf=l(()=>{"use strict";qe()});var Fn=l(()=>{"use strict";Bl();Pl();Tf();Lf();Wr();$f();Fl();Pf();Wl();Nf();Ff();Hf();jf()});var qf,Kf,Xl=l(()=>{"use strict";qf=c(y()),Kf=qf.css`
270
+ `});function Qd(t,e,r){return Ur(t,Bs(e,r))}function Bo(t,e){return typeof t=="function"?t(e):t}function Vs(t){return t.split("-")[0]}function Vr(t){return t.split("-")[1]}function rl(t){return t==="x"?"y":"x"}function il(t){return t==="y"?"height":"width"}function Uo(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function sl(t){return rl(Uo(t))}function Xd(t,e,r){r===void 0&&(r=!1);let i=Vr(t),s=sl(t),o=il(s),n=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(n=el(n)),[n,el(n)]}function Yd(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function el(t){let e=Vs(t);return Kx[e]+t.slice(e.length)}function Wx(t){var e,r,i,s;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(s=t.left)!=null?s:0}}function Zd(t){return typeof t!="number"?Wx(t):{top:t,right:t,bottom:t,left:t}}function gi(t){let{x:e,y:r,width:i,height:s}=t;return{width:i,height:s,top:r,left:e,right:e+i,bottom:r+s,x:e,y:r}}var Gd,Wd,tl,Bs,Ur,Us,nr,Kx,Vo=l(()=>{Gd=["top","right","bottom","left"],Wd=["start","end"],tl=Gd.reduce((t,e)=>t.concat(e,e+"-"+Wd[0],e+"-"+Wd[1]),[]),Bs=Math.min,Ur=Math.max,Us=Math.round,nr=t=>({x:t,y:t}),Kx={left:"right",right:"left",bottom:"top",top:"bottom"}});function Jd(t,e,r){let{reference:i,floating:s}=t,o=Uo(e),n=sl(e),a=il(n),u=Vs(e),d=o==="y",p=i.x+i.width/2-s.width/2,h=i.y+i.height/2-s.height/2,m=i[a]/2-s[a]/2,x;switch(u){case"top":x={x:p,y:i.y-s.height};break;case"bottom":x={x:p,y:i.y+i.height};break;case"right":x={x:i.x+i.width,y:h};break;case"left":x={x:i.x-s.width,y:h};break;default:x={x:i.x,y:i.y}}let C=Vr(e);return C&&(x[n]+=m*(C==="end"?1:-1)*(r&&d?-1:1)),x}async function ep(t,e){var r;e===void 0&&(e={});let{x:i,y:s,platform:o,rects:n,elements:a,strategy:u}=t,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:m=!1,padding:x=0}=Bo(e,t),C=Zd(x),E=a[m?h==="floating"?"reference":"floating":h],P=gi(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(E)))==null||r?E:E.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:d,rootBoundary:p,strategy:u})),G=h==="floating"?{x:i,y:s,width:n.floating.width,height:n.floating.height}:n.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(A))&&await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1},ee=gi(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:G,offsetParent:A,strategy:u}):G);return{top:(P.top-ee.top+C.top)/_.y,bottom:(ee.bottom-P.bottom+C.bottom)/_.y,left:(P.left-ee.left+C.left)/_.x,right:(ee.right-P.right+C.right)/_.x}}function Qx(t,e,r){return(t?[...r.filter(s=>Vr(s)===t),...r.filter(s=>Vr(s)!==t)]:r.filter(s=>Vs(s)===s)).filter(s=>t?Vr(s)===t||(e?Yd(s)!==s:!1):!0)}var Gx,tp,rp,ip,sp=l(()=>{Vo();Vo();Gx=50,tp=async(t,e,r)=>{let{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:n}=r,a=n.detectOverflow?n:{...n,detectOverflow:ep},u=await(n.isRTL==null?void 0:n.isRTL(e)),d=await n.getElementRects({reference:t,floating:e,strategy:s}),{x:p,y:h}=Jd(d,i,u),m=i,x=0,C={};for(let k=0;k<o.length;k++){let E=o[k];if(!E)continue;let{name:P,fn:G}=E,{x:A,y:_,data:ee,reset:K}=await G({x:p,y:h,initialPlacement:i,placement:m,strategy:s,middlewareData:C,rects:d,platform:a,elements:{reference:t,floating:e}});p=A??p,h=_??h,C[P]={...C[P],...ee},K&&x<Gx&&(x++,typeof K=="object"&&(K.placement&&(m=K.placement),K.rects&&(d=K.rects===!0?await n.getElementRects({reference:t,floating:e,strategy:s}):K.rects),{x:p,y:h}=Jd(d,m,u)),k=-1)}return{x:p,y:h,placement:m,strategy:s,middlewareData:C}};rp=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,s;let{rects:o,middlewareData:n,placement:a,platform:u,elements:d}=e,{crossAxis:p=!1,alignment:h,allowedPlacements:m=tl,autoAlignment:x=!0,...C}=Bo(t,e),k=h!==void 0||m===tl?Qx(h||null,x,m):m,E=((r=n.autoPlacement)==null?void 0:r.index)||0,P=k[E];if(P==null)return{};if(a!==P)return{reset:{placement:k[0]}};let G=await u.detectOverflow(e,C),A=Xd(P,o,await(u.isRTL==null?void 0:u.isRTL(d.floating))),_=[G[Vs(P)],G[A[0]],G[A[1]]],ee=[...((i=n.autoPlacement)==null?void 0:i.overflows)||[],{placement:P,overflows:_}],K=k[E+1];if(K)return{data:{index:E+1,overflows:ee},reset:{placement:K}};let Re=ee.map(Tt=>{let Is=Vr(Tt.placement);return[Tt.placement,Is&&p?Tt.overflows.slice(0,2).reduce(($x,Dx)=>$x+Dx,0):Tt.overflows[0],Tt.overflows]}).sort((Tt,Is)=>Tt[1]-Is[1]),Do=((s=Re.filter(Tt=>Tt[2].slice(0,Vr(Tt[0])?2:3).every(Is=>Is<=0))[0])==null?void 0:s[0])||Re[0][0];return Do!==a?{data:{index:E+1,overflows:ee},reset:{placement:Do}}:{}}}},ip=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:s,platform:o}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:u={fn:G=>{let{x:A,y:_}=G;return{x:A,y:_}}},...d}=Bo(t,e),p={x:r,y:i},h=await o.detectOverflow(e,d),m=Uo(s),x=rl(m),C=p[x],k=p[m],E=(G,A)=>Qd(A+h[G==="y"?"top":"left"],A,A-h[G==="y"?"bottom":"right"]);n&&(C=E(x,C)),a&&(k=E(m,k));let P=u.fn({...e,[x]:C,[m]:k});return{...P,data:{x:P.x-r,y:P.y-i,enabled:{[x]:n,[m]:a}}}}}}});function Ho(){return typeof window<"u"}function bi(t){return np(t)?(t.nodeName||"").toLowerCase():"#document"}function ct(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ar(t){var e;return(e=(np(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function np(t){return Ho()?t instanceof Node||t instanceof ct(t).Node:!1}function qt(t){return Ho()?t instanceof Element||t instanceof ct(t).Element:!1}function wr(t){return Ho()?t instanceof HTMLElement||t instanceof ct(t).HTMLElement:!1}function op(t){return!Ho()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ct(t).ShadowRoot}function zs(t){let{overflow:e,overflowX:r,overflowY:i,display:s}=Kt(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&s!=="inline"&&s!=="contents"}function ap(t){return/^(table|td|th)$/.test(bi(t))}function Hs(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}function Xi(t){let e=qt(t)?Kt(t):t;return yi(e.transform)||yi(e.translate)||yi(e.scale)||yi(e.rotate)||yi(e.perspective)||!jo()&&(yi(e.backdropFilter)||yi(e.filter))||Xx.test(e.willChange||"")||Yx.test(e.contain||"")}function lp(t){let e=zr(t);for(;wr(e)&&!Yi(e);){if(Xi(e))return e;if(Hs(e))return null;e=zr(e)}return null}function jo(){return ol==null&&(ol=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ol}function Yi(t){return/^(html|body|#document)$/.test(bi(t))}function Kt(t){return ct(t).getComputedStyle(t)}function js(t){return qt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function zr(t){if(bi(t)==="html")return t;let e=t.assignedSlot||t.parentNode||op(t)&&t.host||Ar(t);return op(e)?e.host:e}function cp(t){let e=zr(t);return Yi(e)?(t.ownerDocument||t).body:wr(e)&&zs(e)?e:cp(e)}function zo(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let s=cp(t),o=s===((i=t.ownerDocument)==null?void 0:i.body),n=ct(s);if(o){let a=qo(n);return e.concat(n,n.visualViewport||[],zs(s)?s:[],a&&r?zo(a):[])}else return e.concat(s,zo(s,[],r))}function qo(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}var Xx,Yx,yi,ol,nl=l(()=>{Xx=/transform|translate|scale|rotate|perspective|filter/,Yx=/paint|layout|strict|content/,yi=t=>!!t&&t!=="none"});function pp(t){let e=Kt(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,s=wr(t),o=s?t.offsetWidth:r,n=s?t.offsetHeight:i,a=Us(r)!==o||Us(i)!==n;return a&&(r=o,i=n),{width:r,height:i,$:a}}function hp(t){return qt(t)?t:t.contextElement}function Zi(t){let e=hp(t);if(!wr(e))return nr(1);let r=e.getBoundingClientRect(),{width:i,height:s,$:o}=pp(e),n=(o?Us(r.width):r.width)/i,a=(o?Us(r.height):r.height)/s;return(!n||!Number.isFinite(n))&&(n=1),(!a||!Number.isFinite(a))&&(a=1),{x:n,y:a}}function fp(t){let e=ct(t);return!jo()||!e.visualViewport?Zx:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Jx(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===ct(t)}function qs(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let s=t.getBoundingClientRect(),o=hp(t),n=nr(1);e&&(i?qt(i)&&(n=Zi(i)):n=Zi(t));let a=Jx(o,r,i)?fp(o):nr(0),u=(s.left+a.x)/n.x,d=(s.top+a.y)/n.y,p=s.width/n.x,h=s.height/n.y;if(o&&i){let m=ct(o),x=qt(i)?ct(i):i,C=m,k=qo(C);for(;k&&x!==C;){let E=Zi(k),P=k.getBoundingClientRect(),G=Kt(k),A=P.left+(k.clientLeft+parseFloat(G.paddingLeft))*E.x,_=P.top+(k.clientTop+parseFloat(G.paddingTop))*E.y;u*=E.x,d*=E.y,p*=E.x,h*=E.y,u+=A,d+=_,C=ct(k),k=qo(C)}}return gi({width:p,height:h,x:u,y:d})}function Ko(t,e){let r=js(t).scrollLeft;return e?e.left+r:qs(Ar(t)).left+r}function mp(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-Ko(t,r),s=r.top+e.scrollTop;return{x:i,y:s}}function eS(t){let{elements:e,rect:r,offsetParent:i,strategy:s}=t,o=s==="fixed",n=Ar(i),a=e?Hs(e.floating):!1;if(i===n||a&&o)return r;let u={scrollLeft:0,scrollTop:0},d=nr(1),p=nr(0),h=wr(i);if((h||!o)&&((bi(i)!=="body"||zs(n))&&(u=js(i)),h)){let x=qs(i);d=Zi(i),p.x=x.x+i.clientLeft,p.y=x.y+i.clientTop}let m=n&&!h&&!o?mp(n,u):nr(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+p.x+m.x,y:r.y*d.y-u.scrollTop*d.y+p.y+m.y}}function tS(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function rS(t){let e=js(t),r=t.ownerDocument.body,i=Ur(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ur(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-e.scrollLeft+Ko(t),n=-e.scrollTop;return Kt(r).direction==="rtl"&&(o+=Ur(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:n}}function sS(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",s=ct(t),o=Ar(t),n=s.visualViewport,a=o.clientWidth,u=o.clientHeight,d=0,p=0;if(n){let m=!jo()||e==="fixed";i?m||(d=-n.offsetLeft,p=-n.offsetTop):(a=n.width,u=n.height,m&&(d=n.offsetLeft,p=n.offsetTop))}if(Ko(o)<=0){let m=o.ownerDocument,x=m.body,C=getComputedStyle(x),k=m.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,E=Math.abs(o.clientWidth-x.clientWidth-k),P=getComputedStyle(o).scrollbarGutter==="stable both-edges"?E/2:E;P<=iS&&(a-=P)}return{width:a,height:u,x:d,y:p}}function oS(t,e){let r=qs(t,!0,e==="fixed"),i=r.top+t.clientTop,s=r.left+t.clientLeft,o=Zi(t),n=t.clientWidth*o.x,a=t.clientHeight*o.y,u=s*o.x,d=i*o.y;return{width:n,height:a,x:u,y:d}}function up(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=sS(t,r,e);else if(e==="document")i=rS(Ar(t));else if(qt(e))i=oS(e,r);else{let s=fp(t);i={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return gi(i)}function nS(t,e){let r=e.get(t);if(r)return r;let i=zo(t,[],!1).filter(a=>qt(a)&&bi(a)!=="body"),s=null,o=Kt(t).position==="fixed",n=o?zr(t):t;for(;qt(n)&&!Yi(n);){let a=Kt(n),u=Xi(n),d=s?s.position:o?"fixed":"";!u&&(d==="fixed"||d==="absolute"&&a.position==="static")?i=i.filter(h=>h!==n):s=a,n=zr(n)}return e.set(t,i),i}function aS(t){let{element:e,boundary:r,rootBoundary:i,strategy:s}=t,n=[...r==="clippingAncestors"?Hs(e)?[]:nS(e,this._c):[].concat(r),i],a=up(e,n[0],s),u=a.top,d=a.right,p=a.bottom,h=a.left;for(let m=1;m<n.length;m++){let x=up(e,n[m],s);u=Ur(x.top,u),d=Bs(x.right,d),p=Bs(x.bottom,p),h=Ur(x.left,h)}return{width:d-h,height:p-u,x:h,y:u}}function lS(t){let{width:e,height:r}=pp(t);return{width:e,height:r}}function cS(t,e,r){let i=wr(e),s=Ar(e),o=r==="fixed",n=qs(t,!0,o,e),a={scrollLeft:0,scrollTop:0},u=nr(0);if((i||!o)&&((bi(e)!=="body"||zs(s))&&(a=js(e)),i)){let m=qs(e,!0,o,e);u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}!i&&s&&(u.x=Ko(s));let d=s&&!i&&!o?mp(s,a):nr(0),p=n.left+a.scrollLeft-u.x-d.x,h=n.top+a.scrollTop-u.y-d.y;return{x:p,y:h,width:n.width,height:n.height}}function al(t){return Kt(t).position==="static"}function dp(t,e){if(!wr(t)||Kt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ar(t)===r&&(r=r.ownerDocument.body),r}function gp(t,e){let r=ct(t);if(Hs(t))return r;if(!wr(t)){let s=zr(t);for(;s&&!Yi(s);){if(qt(s)&&!al(s))return s;s=zr(s)}return r}let i=dp(t,e);for(;i&&ap(i)&&al(i);)i=dp(i,e);return i&&Yi(i)&&al(i)&&!Xi(i)?r:i||lp(t)||r}function dS(t){return Kt(t).direction==="rtl"}var Zx,iS,uS,Wo,yp,bp,vp,xp=l(()=>{sp();Vo();nl();Zx=nr(0);iS=25;uS=async function(t){let e=this.getOffsetParent||gp,r=this.getDimensions,i=await r(t.floating);return{reference:cS(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};Wo={convertOffsetParentRelativeRectToViewportRelativeRect:eS,getDocumentElement:Ar,getClippingRect:aS,getOffsetParent:gp,getElementRects:uS,getClientRects:tS,getDimensions:lS,getScale:Zi,isElement:qt,isRTL:dS},yp=rp,bp=ip,vp=(t,e,r)=>{let i=new Map,s=r??{},o={...Wo,...s.platform,_c:i};return tp(t,e,{...s,platform:o})}});function Sp(t){return pS(t)}function ll(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function pS(t){for(let e=t;e;e=ll(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=ll(t);e;e=ll(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Xi(r)||e.tagName==="BODY"))return e}return null}var Ep=l(()=>{nl()});async function Cp(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},vp(t,e,{strategy:i.strategy,platform:{...Wo,getOffsetParent:s=>Wo.getOffsetParent(s,Sp)},middleware:[bp({crossAxis:!0}),yp({allowedPlacements:[i.placement]})]})}var Ap=l(()=>{"use strict";xp();Ep()});function Op(t,e){return(0,wp.property)({type:Object,converter:hS(t),hasChanged:Ws,...e??{}})}var wp,cl,hS,Go=l(()=>{"use strict";wp=c(F(),1);vi();cl=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},hS=t=>({fromAttribute:e=>{if(e==null)return Ks(t);try{return JSON.parse(e)}catch{return Ks(t)}},toAttribute:e=>JSON.stringify(e)})});function fS(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Ji(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Ji(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let s=n=>Object.keys(n).filter(a=>n[a]!=null),o=s(t);if(r=o.length,r!==s(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){let n=o[i];if(!Ji(t[n],e[n]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Ji(t,e){try{return fS(t,e)}catch{return!1}}function Ws(t,e){return!Ji(t,e)}function Ks(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Qo(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let s=e(i);return s[t]=!0,s}}var vi=l(()=>{"use strict";Go()});var _p,ul,Rp=l(()=>{"use strict";vi();_p=c(F(),1),ul=t=>{let e=t??{};return(r,i)=>{var s;let o={hasChanged:Ws,attribute:!1,...e};(0,_p.property)(o)(r,i);let n=r.constructor;n.reduxProperties=new Map(n.reduxProperties),n.reduxProperties.set(i,{selector:(s=e.selector)!==null&&s!==void 0?s:(a=>a[i]),store:e.store})}}});var Xo,dl=l(()=>{"use strict";Xo=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}}});var Yo,Tp=l(()=>{"use strict";Yo=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let s=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let n of i)try{await n()}catch(a){s(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 Jo,Zo,kp=l(()=>{"use strict";Jo=c(y(),1);Go();Zo=class extends Jo.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return(0,Jo.adoptStyles)(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){cl(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 Lp(t,e,...r){var i;let s=t.querySelector(e);for(let o of r)s=(i=s?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return s}var Ip=l(()=>{"use strict"});var xi,ts,Mp,$p,Dp,Np,Pp,es,ar,Fp=l(()=>{"use strict";xi=c(F(),1);Go();Tp();kp();Ip();ts=function(t,e,r,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(s<3?n(o):s>3?n(e,r,o):n(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o},$p=Symbol("constructorPrototype"),Dp=Symbol("constructorName"),Np=Symbol("exportpartsDebouncer"),Pp=Symbol("dynamicDependenciesLoaded"),es=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};es.eventName="exportparts-updated";ar=class extends Zo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Mp]=new Yo(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Np].run(()=>{var s,o;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.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[Dp]=this.constructor.name,this[$p]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Dp]&&Object.setPrototypeOf(this,this[$p])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Pp]||(r[Pp]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(es.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(es.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 es)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:s}=this.elementToFocus;if(i!=null){let o=[...s??[],i];r=Lp(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,s;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,i,s,o,n,a;let u=m=>m!=null&&m.trim().length>0,d=e.filter(u).map(m=>m.trim());if(d.length===0){this.exportparts=void 0;return}let p=new Set;for(let m of(o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let x=(n=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&n!==void 0?n:[],C=(a=(s=m.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(E=>E.split(":")[1]))!==null&&a!==void 0?a:[],k=[...x,...C].filter(u).map(E=>E.trim());for(let E of k)p.add(E)}if(p.size===0){this.exportparts=void 0;return}let h=[...p.values()].flatMap(m=>d.map(x=>`${m}:${x}--${m}`));this.exportparts=[...this.part,...h].join(", ")}};Mp=Np;ts([(0,xi.property)()],ar.prototype,"exportpartsPrefix",void 0);ts([Op([])],ar.prototype,"exportpartsPrefixes",void 0);ts([(0,xi.property)({reflect:!0})],ar.prototype,"exportparts",void 0);ts([(0,xi.property)()],ar.prototype,"customStylesheet",void 0);ts([(0,xi.property)()],ar.prototype,"elementToFocus",void 0);ts([(0,xi.state)()],ar.prototype,"useAdoptedStyleSheets",void 0)});function en(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var tn=l(()=>{"use strict"});var Gs,Hr,Si,mS,Bp,Up=l(()=>{"use strict";Fp();tn();vi();Gs=Symbol("internalReduxEventsUnsubscribers"),Hr=Symbol("internalStoresUnsubscribers"),Si=Symbol("internalStores"),mS=Qo(Symbol("withRedux"),function(t){var e,r,i;class s extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(n){super.willUpdate(n),[...this.reduxConstructor.reduxReactiveProperties].some(a=>n.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Si].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Si].values()][0]}getStore(n){return n==null?this.getUnnamedStore():this[Si].get(n)}addStore(n,a){var u;a=(u=a??n.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(a),this[Si].set(a,n),this.subscribeToStore(a,n),this.updateFromStores()}removeStore(n){let a=typeof n=="string"?n:n.name;this.unsubscribeFromStore(a),this[Si].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Si].forEach((n,a)=>this.subscribeToStore(a,n)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((n,a)=>{let u=this.constructor.getPropertyOptions(a);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:a)){let d=this.getStore(n.store);d&&(n.store?this[Hr].has(n.store):this[Hr].size>0)&&(this[a]=n.selector(d.getState(),this))}})}subscribeToStore(n,a){var u,d;this[Hr].set(n,a.subscribe(()=>this.updateFromStores())),this[Gs].set(n,[]),en(a)&&(!((u=a.deprecatedKeys)===null||u===void 0)&&u.length&&this.reduxConstructor.reduxProperties.forEach((p,h)=>{this.getStore(p.store)===a&&a.deprecatedKeys.includes(h)&&console.warn("Element",this,"is subscribed to deprecated key",h,"in store",a.name)}),a.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||a.name===p.store)){let m=x=>this[h](x);a.addEventListener(p.eventName,m),this[Gs].get(n).push(()=>a.removeEventListener(p.eventName,m))}}))),this.onStoreAvailable(n)}unsubscribeFromStores(){this[Hr].forEach((n,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(n){var a;this[Hr].has(n)&&this[Hr].get(n)(),this[Hr].delete(n),(a=this[Gs].get(n))===null||a===void 0||a.forEach(u=>u()),this[Gs].delete(n)}onStoreAvailable(n){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Hr,r=Si,i=Gs,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),Bp=class extends mS(ar){}});function Me(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. `}function sn(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function hl(t,e,r){if(typeof t!="function")throw new Error(Me(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Me(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Me(1));return r(hl)(t,e)}let i=t,s=e,o=new Map,n=o,a=0,u=!1;function d(){n===o&&(n=new Map,o.forEach((E,P)=>{n.set(P,E)}))}function p(){if(u)throw new Error(Me(3));return s}function h(E){if(typeof E!="function")throw new Error(Me(4));if(u)throw new Error(Me(5));let P=!0;d();let G=a++;return n.set(G,E),function(){if(P){if(u)throw new Error(Me(6));P=!1,d(),n.delete(G),o=null}}}function m(E){if(!sn(E))throw new Error(Me(7));if(typeof E.type>"u")throw new Error(Me(8));if(typeof E.type!="string")throw new Error(Me(17));if(u)throw new Error(Me(9));try{u=!0,s=i(s,E)}finally{u=!1}return(o=n).forEach(G=>{G()}),E}function x(E){if(typeof E!="function")throw new Error(Me(10));i=E,m({type:rn.REPLACE})}function C(){let E=h;return{subscribe(P){if(typeof P!="object"||P===null)throw new Error(Me(11));function G(){let _=P;_.next&&_.next(p())}return G(),{unsubscribe:E(G)}},[Vp](){return this}}}return m({type:rn.INIT}),{dispatch:m,subscribe:h,getState:p,replaceReducer:x,[Vp]:C}}function bS(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:rn.INIT})>"u")throw new Error(Me(12));if(typeof r(void 0,{type:rn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Me(13))})}function fl(t){let e=Object.keys(t),r={};for(let n=0;n<e.length;n++){let a=e[n];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),s,o;try{bS(r)}catch(n){o=n}return function(a={},u){if(o)throw o;let d=!1,p={};for(let h=0;h<i.length;h++){let m=i[h],x=r[m],C=a[m],k=x(C,u);if(typeof k>"u"){let E=u&&u.type;throw new Error(Me(14))}p[m]=k,d=d||k!==C}return d=d||i.length!==Object.keys(a).length,d?p:a}}function Qs(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function zp(...t){return e=>(r,i)=>{let s=e(r,i),o=()=>{throw new Error(Me(15))},n={getState:s.getState,dispatch:(u,...d)=>o(u,...d)},a=t.map(u=>u(n));return o=Qs(...a)(s.dispatch),{...s,dispatch:o}}}function Hp(t){return sn(t)&&"type"in t&&typeof t.type=="string"}var gS,Vp,pl,yS,rn,ml=l(()=>{gS=typeof Symbol=="function"&&Symbol.observable||"@@observable",Vp=gS,pl=()=>Math.random().toString(36).substring(7).split("").join("."),yS={INIT:`@@redux/INIT${pl()}`,REPLACE:`@@redux/REPLACE${pl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pl()}`},rn=yS});function Wt(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}function yt(t){return t?Jp(t)||gn(t)||!!t[jp]||!!t[ln]?.[jp]||yn(t)||eo(t):!1}function Jp(t){if(!t||!_l(t))return!1;let e=is(t);if(e===null||e===gt[fn])return!0;let r=gt.hasOwnProperty.call(e,ln)&&e[ln];if(r===Object)return!0;if(!rs(r))return!1;let i=qp.get(r);return i===void 0&&(i=Function.toString.call(r),qp.set(r,i)),i===vS}function mn(t,e,r=!0){Js(t)===0?(r?Reflect.ownKeys(t):gt.keys(t)).forEach(s=>{e(s,t[s],t)}):t.forEach((i,s)=>e(s,i,t))}function Js(t){let e=t[je];return e?e.type_:gn(t)?1:yn(t)?2:eo(t)?3:0}function xS(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function SS(t){let e=+t;return Number.isInteger(e)&&String(e)===t}function Sl(t,e){if(yn(t))return new Map(t);if(eo(t))return new Set(t);if(gn(t))return Array[fn].slice.call(t);let r=Jp(t);if(e===!0||e==="class_only"&&!r){let i=gt.getOwnPropertyDescriptors(t);delete i[je];let s=Reflect.ownKeys(i);for(let o=0;o<s.length;o++){let n=s[o],a=i[n];a[nn]===!1&&(a[nn]=!0,a[vl]=!0),(a.get||a.set)&&(i[n]={[vl]:!0,[nn]:!0,[cn]:a[cn],[Xs]:t[n]})}return gt.create(is(t),i)}else{let i=is(t);if(i!==null&&r)return{...t};let s=gt.create(i);return gt.assign(s,t)}}function bn(t,e=!1){return vn(t)||lr(t)||!yt(t)||(Js(t)>1&&gt.defineProperties(t,{set:on,add:on,clear:on,delete:on}),gt.freeze(t),e&&mn(t,(r,i)=>{bn(i,!0)},!1)),t}function ES(){Wt(2)}function vn(t){return t===null||!_l(t)?!0:gt.isFrozen(t)}function Ei(t){let e=eh[t];return e||Wt(0,t),e}function Gp(t,e){e&&(t.patchPlugin_=Ei(El),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Cl(t){Al(t),t.drafts_.forEach(AS),t.drafts_=null}function Al(t){t===Ys&&(Ys=t.parent_)}function AS(t){let e=t[je];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Xp(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[je].modified_&&(Cl(e),Wt(4)),yt(t)&&(t=Yp(e,t));let{patchPlugin_:s}=e;s&&s.generateReplacementPatches_(r[je].base_,t,e)}else t=Yp(e,r);return wS(e,t,!0),Cl(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Zp?t:void 0}function Yp(t,e){if(vn(e))return e;let r=e[je];if(!r)return pn(e,t.handledSet_,t);if(!xn(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);sh(r,t)}return r.copy_}function wS(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&bn(e,r)}function rh(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}function ih(t,e,r,i){let s=Or(t),o=t.type_;if(i!==void 0&&xl(s,i,o)===e){un(s,i,r,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;mn(s,(u,d)=>{if(lr(d)){let p=a.get(d)||[];p.push(u),a.set(d,p)}})}let n=t.draftLocations_.get(e)??OS;for(let a of n)un(s,a,r,o)}function _S(t,e,r){t.callbacks_.push(function(s){let o=e;if(!o||!xn(o,s))return;s.mapSetPlugin_?.fixSetContents(o);let n=Rl(o);ih(t,o.draft_??o,n,r),sh(o,s)})}function sh(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let s=i.getPath(t);s&&i.generatePatches_(t,s,e)}rh(t)}}function RS(t,e,r){let{scope_:i}=t;if(lr(r)){let s=r[je];xn(s,i)&&s.callbacks_.push(function(){an(t);let n=Rl(s);ih(t,r,n,e)})}else yt(r)&&t.callbacks_.push(function(){let o=Or(t);t.type_===3?o.has(r)&&pn(r,i.handledSet_,i):xl(o,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&pn(xl(t.copy_,e,t.type_),i.handledSet_,i)})}function pn(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||lr(t)||e.has(t)||!yt(t)||vn(t)||(e.add(t),mn(t,(i,s)=>{if(lr(s)){let o=s[je];if(xn(o,r)){let n=Rl(o);un(t,i,n,t.type_),rh(o)}}else yt(s)&&pn(s,e,r)})),t}function TS(t,e){let r=gn(t),i={type_:r?1:0,scope_:e?e.scope_:th(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=i,o=hn;r&&(s=[i],o=Zs);let{revoke:n,proxy:a}=Proxy.revocable(s,o);return i.draft_=a,i.revoke_=n,[a,i]}function bl(t,e){let r=t[je];return(r?Or(r):t)[e]}function kS(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||!yt(r)||r[je]?!1:t.baseRefs_.has(r)}function LS(t,e,r){let i=oh(e,r);return i?Xs in i?i[Xs]:i.get?.call(t.draft_):void 0}function oh(t,e){if(!(e in t))return;let r=is(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=is(r)}}function wl(t){t.modified_||(t.modified_=!0,t.parent_&&wl(t.parent_))}function an(t){t.copy_||(t.assigned_=new Map,t.copy_=Sl(t.base_,t.scope_.immer_.useStrictShallowCopy_))}function Ol(t,e,r,i){let[s,o]=yn(e)?Ei(dn).proxyMap_(e,r):eo(e)?Ei(dn).proxySet_(e,r):TS(e,r);return(r?.scope_??th()).drafts_.push(s),o.callbacks_=r?.callbacks_??[],o.key_=i,r&&i!==void 0?_S(r,o,i):o.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:d}=u;o.modified_&&d&&d.generatePatches_(o,[],u)}),s}function nh(t){return lr(t)||Wt(10,t),ah(t)}function ah(t){if(!yt(t)||vn(t))return t;let e=t[je],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Sl(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=Sl(t,!0);let s=r;return eo(r)&&(r=new Set),mn(s,(o,n)=>{un(r,o,ah(n))},i),e&&(e.finalized_=!1),r}var Zp,jp,je,gt,is,ln,fn,vl,cn,nn,Xs,lr,vS,qp,gl,xl,un,gn,yn,eo,_l,rs,yl,Or,Rl,on,dn,El,Kp,eh,Wp,Ys,th,CS,Qp,xn,OS,hn,Zs,IS,$S,x0,DS,Tl,lh=l(()=>{Zp=Symbol.for("immer-nothing"),jp=Symbol.for("immer-draftable"),je=Symbol.for("immer-state");gt=Object,is=gt.getPrototypeOf,ln="constructor",fn="prototype",vl="configurable",cn="enumerable",nn="writable",Xs="value",lr=t=>!!t&&!!t[je];vS=gt[fn][ln].toString(),qp=new WeakMap;gl=(t,e,r=Js(t))=>r===2?t.has(e):gt[fn].hasOwnProperty.call(t,e),xl=(t,e,r=Js(t))=>r===2?t.get(e):t[e],un=(t,e,r,i=Js(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};gn=Array.isArray,yn=t=>t instanceof Map,eo=t=>t instanceof Set,_l=t=>typeof t=="object",rs=t=>typeof t=="function",yl=t=>typeof t=="boolean";Or=t=>t.copy_||t.base_,Rl=t=>t.modified_?t.copy_:t.base_;on={[Xs]:ES};dn="MapSet",El="Patches",Kp="ArrayMethods",eh={};Wp=t=>!!eh[t],th=()=>Ys,CS=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Wp(dn)?Ei(dn):void 0,arrayMethodsPlugin_:Wp(Kp)?Ei(Kp):void 0});Qp=t=>Ys=CS(Ys,t);xn=(t,e)=>t.scope_===e,OS=[];hn={get(t,e){if(e===je)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let s=Or(t);if(!gl(s,e,t.type_))return LS(t,s,e);let o=s[e];if(t.finalized_||!yt(o)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&SS(e))return o;if(o===bl(t.base_,e)||kS(t,e,o)){an(t);let n=t.type_===1?+e:e,a=Ol(t.scope_,o,t,n);return t.copy_[n]=a}return o},has(t,e){return e in Or(t)},ownKeys(t){return Reflect.ownKeys(Or(t))},set(t,e,r){let i=oh(Or(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let s=bl(Or(t),e),o=s?.[je];if(o&&o.base_===r)return t.copy_[e]=r,t.assigned_.delete(e),!0;if(xS(r,s)&&(r!==void 0||gl(t.base_,e,t.type_)))return!0;an(t),wl(t)}return t.copy_[e]===r&&(r!==void 0||gl(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),RS(t,e,r)),!0},deleteProperty(t,e){return an(t),bl(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),wl(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Or(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[nn]:!0,[vl]:t.type_!==1||e!=="length",[cn]:i[cn],[Xs]:r[e]}},defineProperty(){Wt(11)},getPrototypeOf(t){return is(t.base_)},setPrototypeOf(){Wt(12)}},Zs={};for(let t in hn){let e=hn[t];Zs[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Zs.deleteProperty=function(t,e){return Zs.set.call(this,t,e,void 0)};Zs.set=function(t,e,r){return hn.set.call(this,t[0],e,r,t[0])};IS=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(rs(e)&&!rs(r)){let o=r;r=e;let n=this;return function(u=o,...d){return n.produce(u,p=>r.call(this,p,...d))}}rs(r)||Wt(6),i!==void 0&&!rs(i)&&Wt(7);let s;if(yt(e)){let o=Qp(this),n=Ol(o,e,void 0),a=!0;try{s=r(n),a=!1}finally{a?Cl(o):Al(o)}return Gp(o,i),Xp(s,o)}else if(!e||!_l(e)){if(s=r(e),s===void 0&&(s=e),s===Zp&&(s=void 0),this.autoFreeze_&&bn(s,!0),i){let o=[],n=[];Ei(El).generateReplacementPatches_(e,s,{patches_:o,inversePatches_:n}),i(o,n)}return s}else Wt(1,e)},this.produceWithPatches=(e,r)=>{if(rs(e))return(n,...a)=>this.produceWithPatches(n,u=>e(u,...a));let i,s;return[this.produce(e,r,(n,a)=>{i=n,s=a}),i,s]},yl(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),yl(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),yl(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){yt(t)||Wt(8),lr(t)&&(t=nh(t));let e=Qp(this),r=Ol(e,t,void 0);return r[je].isManual_=!0,Al(e),r}finishDraft(t,e){let r=t&&t[je];(!r||!r.isManual_)&&Wt(9);let{scope_:i}=r;return Gp(i,e),Xp(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let s=e[r];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}r>-1&&(e=e.slice(r+1));let i=Ei(El).applyPatches_;return lr(t)?i(t,e):this.produce(t,s=>i(s,e))}};$S=globalThis.Iterator,x0=typeof $S?.from=="function",DS=new IS,Tl=DS.produce});function ch(t){return({dispatch:r,getState:i})=>s=>o=>typeof o=="function"?o(r,i,t):s(o)}var uh,dh,ph=l(()=>{uh=ch(),dh=ch});function jr(t,e){function r(...i){if(e){let s=e(...i);if(!s)throw new Error(cr(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>Hp(i)&&i.type===t,r}function hh(t){return yt(t)?Tl(t,()=>{}):t}function Sn(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function NS(t){return typeof t=="boolean"}function bh(t){let e=FS(),{reducer:r=void 0,middleware:i,devTools:s=!0,duplicateMiddlewareCheck:o=!0,preloadedState:n=void 0,enhancers:a=void 0}=t||{},u;if(typeof r=="function")u=r;else if(sn(r))u=fl(r);else throw new Error(cr(1));let d;typeof i=="function"?d=i(e):d=e();let p=Qs;s&&(p=PS({trace:!1,...typeof s=="object"&&s}));let h=zp(...d),m=zS(h),x=typeof a=="function"?a(m):m(),C=p(...x);return hl(u,n,C)}function vh(t){let e={},r=[],i,s={addCase(o,n){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(cr(28));if(a in e)throw new Error(cr(29));return e[a]=n,s},addAsyncThunk(o,n){return n.pending&&(e[o.pending.type]=n.pending),n.rejected&&(e[o.rejected.type]=n.rejected),n.fulfilled&&(e[o.fulfilled.type]=n.fulfilled),n.settled&&r.push({matcher:o.settled,reducer:n.settled}),s},addMatcher(o,n){return r.push({matcher:o,reducer:n}),s},addDefaultCase(o){return i=o,s}};return t(s),[e,r,i]}function HS(t){return typeof t=="function"}function jS(t,e){let[r,i,s]=vh(e),o;if(HS(t))o=()=>hh(t());else{let a=hh(t);o=()=>a}function n(a=o(),u){let d=[r[u.type],...i.filter(({matcher:p})=>p(u)).map(({reducer:p})=>p)];return d.filter(p=>!!p).length===0&&(d=[s]),d.reduce((p,h)=>{if(h)if(lr(p)){let m=h(p,u);return m===void 0?p:m}else{if(yt(p))return Tl(p,m=>h(m,u));{let m=h(p,u);if(m===void 0){if(p===null)return p;throw new Error(cr(9))}return m}}return p},a)}return n.getInitialState=o,n}function KS(...t){return e=>t.some(r=>qS(r,e))}function ZS(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function JS(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}function eE(t,e){return`${t}/${e}`}function tE({creators:t}={}){let e=t?.asyncThunk?.[xh];return function(i){let{name:s,reducerPath:o=s}=i;if(!s)throw new Error(cr(11));typeof process<"u";let n=(typeof i.reducers=="function"?i.reducers(iE()):i.reducers)||{},a=Object.keys(n),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(A,_){let ee=typeof A=="string"?A:A.type;if(!ee)throw new Error(cr(12));if(ee in u.sliceCaseReducersByType)throw new Error(cr(13));return u.sliceCaseReducersByType[ee]=_,d},addMatcher(A,_){return u.sliceMatchers.push({matcher:A,reducer:_}),d},exposeAction(A,_){return u.actionCreators[A]=_,d},exposeCaseReducer(A,_){return u.sliceCaseReducersByName[A]=_,d}};a.forEach(A=>{let _=n[A],ee={reducerName:A,type:eE(s,A),createNotation:typeof i.reducers=="function"};oE(_)?aE(ee,_,d,e):sE(ee,_,d)});function p(){let[A={},_=[],ee=void 0]=typeof i.extraReducers=="function"?vh(i.extraReducers):[i.extraReducers],K={...A,...u.sliceCaseReducersByType};return jS(i.initialState,Re=>{for(let He in K)Re.addCase(He,K[He]);for(let He of u.sliceMatchers)Re.addMatcher(He.matcher,He.reducer);for(let He of _)Re.addMatcher(He.matcher,He.reducer);ee&&Re.addDefaultCase(ee)})}let h=A=>A,m=new Map,x=new WeakMap,C;function k(A,_){return C||(C=p()),C(A,_)}function E(){return C||(C=p()),C.getInitialState()}function P(A,_=!1){function ee(Re){let He=Re[A];return typeof He>"u"&&_&&(He=Sn(x,ee,E)),He}function K(Re=h){return Sn(Sn(m,_,()=>new WeakMap),Re,()=>{let He={};for(let[Do,Tt]of Object.entries(i.selectors??{}))He[Do]=rE(Tt,Re,()=>Sn(x,Re,E),_);return He})}return{reducerPath:A,getSelectors:K,get selectors(){return K(ee)},selectSlice:ee}}let G={name:s,reducer:k,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:E,...P(o),injectInto(A,{reducerPath:_,...ee}={}){let K=_??o;return A.inject({reducerPath:K,reducer:k},ee),{...G,...P(K,!0)}}};return G}}function rE(t,e,r,i){function s(o,...n){let a=e(o);return typeof a>"u"&&i&&(a=r()),t(a,...n)}return s.unwrapped=t,s}function iE(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function sE({type:t,reducerName:e,createNotation:r},i,s){let o,n;if("reducer"in i){if(r&&!nE(i))throw new Error(cr(17));o=i.reducer,n=i.prepare}else o=i;s.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,n?jr(t,n):jr(t))}function oE(t){return t._reducerDefinitionType==="asyncThunk"}function nE(t){return t._reducerDefinitionType==="reducerWithPrepare"}function aE({type:t,reducerName:e},r,i,s){if(!s)throw new Error(cr(18));let{payloadCreator:o,fulfilled:n,pending:a,rejected:u,settled:d,options:p}=r,h=s(t,o,p);i.exposeAction(e,h),n&&i.addCase(h.fulfilled,n),a&&i.addCase(h.pending,a),u&&i.addCase(h.rejected,u),d&&i.addMatcher(h.settled,d),i.exposeCaseReducer(e,{fulfilled:n||En,pending:a||En,rejected:u||En,settled:d||En})}function En(){}function cr(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var PS,MS,yh,FS,BS,fh,US,VS,zS,qS,WS,GS,QS,kl,mh,XS,gh,YS,xh,R0,Sh,Eh,Ch,Ah,T0,k0,L0,I0,wh,Ll,lE,$0,cE,Oh=l(()=>{ml();lh();ph();ml();PS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Qs:Qs.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;MS=t=>t&&typeof t.match=="function";yh=class to extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,to.prototype)}static get[Symbol.species](){return to}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new to(...e[0].concat(this)):new to(...e.concat(this))}};FS=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:o=!0}=e??{},n=new yh;return r&&(NS(r)?n.push(uh):n.push(dh(r.extraArgument))),n},BS="RTK_autoBatch",fh=t=>e=>{setTimeout(e,t)},US=(t,e)=>r=>{let i=!1,s,o,n=()=>{i||(i=!0,cancelAnimationFrame(s),clearTimeout(o),r())};s=t(n),o=setTimeout(n,e)},VS=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),s=!0,o=!1,n=!1,a=new Set,u=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?US(window.requestAnimationFrame,100):fh(10):t.type==="callback"?t.queueNotification:fh(t.timeout),d=()=>{n=!1,o&&(o=!1,a.forEach(p=>p()))};return Object.assign({},i,{subscribe(p){let h=()=>s&&p(),m=i.subscribe(h);return a.add(p),()=>{m(),a.delete(p)}},dispatch(p){try{return s=!p?.meta?.[BS],o=!s,o&&(n||(n=!0,u(d))),i.dispatch(p)}finally{s=!0}}})},zS=t=>function(r){let{autoBatch:i=!0}=r??{},s=new yh(t);return i&&s.push(VS(typeof i=="object"?i:void 0)),s};qS=(t,e)=>MS(t)?t.match(e):t(e);WS="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",GS=(t=21)=>{let e="",r=t;for(;r--;)e+=WS[Math.random()*64|0];return e},QS=["name","message","stack","code"],kl=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},mh=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},XS=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of QS)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},gh="External signal was aborted",YS=(()=>{function t(e,r,i){let s=jr(e+"/fulfilled",(u,d,p,h)=>({payload:u,meta:{...h||{},arg:p,requestId:d,requestStatus:"fulfilled"}})),o=jr(e+"/pending",(u,d,p)=>({payload:void 0,meta:{...p||{},arg:d,requestId:u,requestStatus:"pending"}})),n=jr(e+"/rejected",(u,d,p,h,m)=>({payload:h,error:(i&&i.serializeError||XS)(u||"Rejected"),meta:{...m||{},arg:p,requestId:d,rejectedWithValue:h!==void 0,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function a(u,{signal:d}={}){return(p,h,m)=>{let x=i?.idGenerator?i.idGenerator(u):GS(),C=new AbortController,k,E;function P(A){E=A,C.abort()}d&&(d.aborted?P(gh):d.addEventListener("abort",()=>P(gh),{once:!0}));let G=(async function(){let A;try{let _=i?.condition?.(u,{getState:h,extra:m});if(JS(_)&&(_=await _),_===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(C.signal.aborted)throw{name:"AbortError",message:E||"Aborted"};let ee=new Promise((K,Re)=>{k=()=>{Re({name:"AbortError",message:E||"Aborted"})},C.signal.addEventListener("abort",k,{once:!0})});p(o(x,u,i?.getPendingMeta?.({requestId:x,arg:u},{getState:h,extra:m}))),A=await Promise.race([ee,Promise.resolve(r(u,{dispatch:p,getState:h,extra:m,requestId:x,signal:C.signal,abort:P,rejectWithValue:((K,Re)=>new kl(K,Re)),fulfillWithValue:((K,Re)=>new mh(K,Re))})).then(K=>{if(K instanceof kl)throw K;return K instanceof mh?s(K.payload,x,u,K.meta):s(K,x,u)})])}catch(_){A=_ instanceof kl?n(null,x,u,_.payload,_.meta):n(_,x,u)}finally{k&&C.signal.removeEventListener("abort",k)}return i&&!i.dispatchConditionRejection&&n.match(A)&&A.meta.condition||p(A),A})();return Object.assign(G,{abort:P,requestId:x,arg:u,unwrap(){return G.then(ZS)}})}}return Object.assign(a,{pending:o,rejected:n,fulfilled:s,settled:KS(n,s),typePrefix:e})}return t.withTypes=()=>t,t})();xh=Symbol.for("rtk-slice-createasyncthunk"),R0={[xh]:YS};Sh=tE();Eh="listener",Ch="completed",Ah="cancelled",T0=`task-${Ah}`,k0=`task-${Ch}`,L0=`${Eh}-${Ah}`,I0=`${Eh}-${Ch}`,{assign:wh}=Object,Ll="listenerMiddleware",lE=wh(jr(`${Ll}/add`),{withTypes:()=>lE}),$0=jr(`${Ll}/removeAll`),cE=wh(jr(`${Ll}/remove`),{withTypes:()=>cE})});var uE,Cn,_h=l(()=>{"use strict";vi();uE=Qo(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,s){this.eventBus.addEventListener(r,i,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,s){this.eventBus.removeEventListener(r,i,s)}}}),Cn=class extends uE(Object){}});var Rh,Th=l(()=>{"use strict";Oh();tn();dl();_h();vi();window.ftReduxStores||(window.ftReduxStores={});Rh=class t extends Cn{static get(e){var r;let i=typeof e=="string"?e:e.name,s=typeof e=="string"?void 0:e,o=window.ftReduxStores[i];if(en(o))return o;if(s==null)return;let n=Sh({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=bh({reducer:(u,d)=>{if(d.type==="CLEAR_FT_REDUX_STORE"){let p=Ks(n.getInitialState());for(let h of d.keeping)p[h]=(u??p)[h];return p}else if(typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...d.overwrites};return n.reducer(u,d)}});return window.ftReduxStores[s.name]=new t(n,a,s.eventBus,s.deprecatedKeys)}constructor(e,r,i,s){super(),this.reduxSlice=e,this.reduxStore=r,this.deprecatedKeys=s,this.isFtReduxStore=!0,this.commands=new Xo,this.injectInto=(n,a)=>this.reduxSlice.injectInto(n,a),this.selectSlice=n=>this.reduxSlice.selectSlice(n);let o=n=>n!=null?JSON.parse(JSON.stringify(n)):n;this.actions=new Proxy(this.reduxSlice.actions,{get:(n,a,u)=>{let d=a,p=n[d];return p?(...h)=>{let m=p(...h.map(o));return this.reduxStore.dispatch(m),m}:h=>{let m=d,x=this.getState()[m];Ji(x,h)||this.setState({[m]:o(h)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}}});var kh=l(()=>{"use strict";vi()});var Lh=l(()=>{"use strict"});var Ih=l(()=>{"use strict";Rp();dl();Up();Th();tn();kh();Lh()});var An,$h=l(()=>{"use strict";An=class{static format(e,r,i,s,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,s,!!o)):this.getIntlDateTime(e,r,i,s,!!o)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,s,o){let n=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(n),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(n);return o?u:s?`${a} ${u}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}}});var wn,dE,ur,ro,pE,S,qe=l(()=>{"use strict";wn=c(f()),dE="ft-app-info",ur=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ur.eventName="authentication-change";ro=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ro.eventName="ui-locale-changed";pE={session:(t,e)=>{(0,wn.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>S.dispatchEvent(new ur(e.payload)),0))}},S=wn.FtReduxStore.get({name:dE,reducers:pE,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}})});var Il,Dh,On,cA,Ph=l(()=>{"use strict";Il=c(F());Ih();$h();qe();Dh=c(f()),On=function(t,e,r,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(s<3?n(o):s>3?n(e,r,o):n(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o},cA=(0,Dh.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(S)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var s,o;return((o=(s=this.metadataDescriptors.find(a=>a.key===i))===null||s===void 0?void 0:s.date)!==null&&o!==void 0?o:!1)?a=>An.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return On([(0,Il.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),On([(0,Il.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),On([ul({store:S.name,selector:r=>{var i,s;return(s=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&s!==void 0?s:[]}})],e.prototype,"metadataDescriptors",void 0),On([ul({store:S.name})],e.prototype,"uiLocale",void 0),e})});var $l=l(()=>{});var Mh,Nh,Fh,qr,Bh,Uh,Vh,Ci,zh,Hh,jh,qh,Kh,Wh,Gh,Qh,Xh,_n,Yh,Zh,ss,Jh,Rn,ef,tf,dr,os,rf,he,Lt,sf,Dl=l(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Mh||(Mh={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Nh||(Nh={}));(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"})(Fh||(Fh={}));(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"})(qr||(qr={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Bh||(Bh={}));(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Uh||(Uh={}));(function(t){t.PUBLISHED="PUBLISHED",t.AI="AI"})(Vh||(Vh={}));(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"})(Ci||(Ci={}));(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(zh||(zh={}));(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Hh||(Hh={}));(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",t.DOC_DIFF="DOC_DIFF"})(jh||(jh={}));(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"})(qh||(qh={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Kh||(Kh={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Wh||(Wh={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Gh||(Gh={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Qh||(Qh={}));(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"})(Xh||(Xh={}));(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(_n||(_n={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(Yh||(Yh={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Zh||(Zh={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(ss||(ss={}));(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Jh||(Jh={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Rn||(Rn={}));(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"})(ef||(ef={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(tf||(tf={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(dr||(dr={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(os||(os={}));(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(rf||(rf={}));(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"})(he||(he={}));(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Lt||(Lt={}));(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(sf||(sf={}))});var of,nf,af,lf,cf,uf,df,pf,hf,ff,mf,gf,yf=l(()=>{(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(of||(of={}));(function(t){t.VALID="VALID",t.INVALID="INVALID"})(nf||(nf={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(af||(af={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(lf||(lf={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(cf||(cf={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(uf||(uf={}));(function(t){t.CHAT="CHAT",t.COMPLETION="COMPLETION",t.RAG="RAG",t.AGENT="AGENT"})(df||(df={}));(function(t){t.TEXT="TEXT",t.HTML="HTML"})(pf||(pf={}));(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(hf||(hf={}));(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(ff||(ff={}));(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"})(mf||(mf={}));(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(gf||(gf={}))});var bf=l(()=>{Dl();yf()});function vf(t,e){return t===e||(hE[t]??[]).some(r=>vf(r,e))}function io(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(i=>vf(i,e))}function xf(t,...e){return t==null?!1:e.some(r=>io(t,r))}var hE,Sf=l(()=>{Dl();hE={[he.PERSONAL_BOOK_SHARE_USER]:[he.PERSONAL_BOOK_USER],[he.HTML_EXPORT_USER]:[he.PERSONAL_BOOK_USER],[he.PDF_EXPORT_USER]:[he.PERSONAL_BOOK_USER],[he.KHUB_ADMIN]:[he.CONTENT_PUBLISHER],[he.ADMIN]:[he.KHUB_ADMIN,he.USERS_ADMIN,he.PORTAL_ADMIN,he.BEHAVIOR_DATA_USER],[he.GENERATIVE_AI_EXPORT_USER]:[he.GENERATIVE_AI_USER]}});var Ef=l(()=>{});var Kr=l(()=>{$l();bf();Sf();Ef();$l()});var Ai,Pl=l(()=>{"use strict";qe();Ai=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=S.getState(),s=e??i;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let s=S.subscribe(()=>{i=t.get(e),i&&(s(),r(i))})}})}}});var ns,Ml=l(()=>{"use strict";Pl();ns=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ai.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ai.await()}}});var Nl,Ke,Wr=l(()=>{"use strict";Nl=c(f());Ml();Ke=class extends ns{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(o,n)=>typeof n!="object"||n==null||Array.isArray(n)?n:Object.fromEntries(Object.entries(n).sort(([a],[u])=>a.localeCompare(u)));let s=this.constructor;s.commonCache=(i=s.commonCache)!==null&&i!==void 0?i:new Nl.CacheRegistry,this.cache=e?s.commonCache:new Nl.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}}});var Tn,Fl=l(()=>{"use strict";qe();Kr();Wr();Tn=class extends Ke{async listMySearches(){let{session:e}=S.getState();return io(e,he.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}}});var kn,Bl=l(()=>{"use strict";qe();Wr();kn=class extends Ke{async listMyBookmarks(){let e=S.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}}});var Ln,Cf=l(()=>{"use strict";qe();Wr();Ln=class extends Ke{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=S.getState().session;return!!e?.sessionAuthenticated}}});var In,Af=l(()=>{"use strict";Wr();qe();In=class extends Ke{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=S.getState().session;return!!e?.sessionAuthenticated}}});var $n,fE,mE,_f,Ul,Vl,wf,Of,Ye,zl,gE,Hl=l(()=>{"use strict";Kr();$n=c(f());Fl();Bl();qe();Cf();Af();fE="ft-user-assets",mE={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(Lt).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:s}=e.payload;Vl(t,r,[...Ul(t,r),s]),wf(t,r,1,i),Of(t,s)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;Vl(t,r,Ul(t,r).map(s=>s.id===i.id?i:s)),Of(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:s}=e.payload;Vl(t,r,Ul(t,r).filter(o=>o.id!==s)),wf(t,r,-1,i)}},_f={[Lt.SEARCHES]:"savedSearches",[Lt.BOOKMARKS]:"bookmarks",[Lt.BOOKS]:void 0,[Lt.COLLECTIONS]:void 0},Ul=(t,e)=>{var r;let i=_f[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},Vl=(t,e,r)=>{let i=_f[e];i&&(t[i]=r)},wf=(t,e,r,i)=>{let s=t.assetCounts.allAsset[e];if(s!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,s+r),e===Lt.BOOKMARKS&&i)){let o=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Of=(t,e)=>{let r=t.assetLabels.map(s=>s.title),i=e.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));t.assetLabels.push(...i)},Ye=$n.FtReduxStore.get({name:fE,reducers:mE,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Lt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),zl=class{constructor(e=new Ln,r=new In){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=S.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new kn,this.savedSearchesService=new Tn,S.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=S.getState();(0,$n.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(),Ye.actions.clearAssetCount(),Ye.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ye.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ye.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ye.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Ye.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Ye.getState().assetCounts.allAsset[e]!==r.count&&Ye.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Ye.getState().assetCounts.bookmarkByMap[e]!==r.count&&Ye.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Ye.getState().assetCounts.bookmarkByMap).length!==0;e===Lt.BOOKMARKS&&r&&Ye.actions.clearBookmarkCountByMap(),Ye.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;Ye.actions.bookmarks(r)}}},gE=new zl;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=gE)});var Rf=l(()=>{"use strict";Kr();Hl()});var jl,Tf=l(()=>{"use strict";qe();jl=class{addCommand(e,r=!1){S.commands.add(e,r)}consumeCommand(e){return S.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new jl});var It,kf,as,yE,Dn,ls,Pn,Lf=l(()=>{"use strict";qe();It=c(f());Wr();as=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},yE=Symbol("clearAfterUnitTest"),Dn=class extends(0,It.withEventBus)(Ke){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[kf]=()=>{this.defaultMessages={},this.cache=new It.CacheRegistry,this.listeners={}},this.currentUiLocale=S.getState().uiLocale,S.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=S.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let s={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,It.deepEqual)(this.defaultMessages[e],s)||(this.defaultMessages[e]=s,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var s;let o=e.toLowerCase(),n=this.resolveContext(o);return new It.ParametrizedLabelResolver((s=this.defaultMessages[o])!==null&&s!==void 0?s:{},n).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(s){!(s instanceof It.CanceledPromiseError)&&r&&console.error(s)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var s;return(s=this.listeners[e])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new as({loadedContexts:e})),this.dispatchEvent(new as({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new as({loadedContexts:[e]})),this.dispatchEvent(new as({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,It.delay)(0).then(()=>i()).catch(()=>null)))}};kf=yE;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Dn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Dn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});ls=window.FluidTopicsI18nService,Pn=window.FluidTopicsCustomI18nService});var If,ql,$f=l(()=>{"use strict";If=c(f()),ql=class{highlightHtml(e,r,i){(0,If.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new ql});var Df,Kl,Pf=l(()=>{"use strict";Df=c(f());qe();Kl=class{isDate(e){var r,i,s,o;return(o=(i=((s=(r=S.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===e))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1}format(e,r){var i,s,o,n;if(e==null)return"";try{return Df.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:S.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(n=r?.onlyTime)!==null&&n!==void 0?n:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Kl});var Mf,_r,Wl=l(()=>{"use strict";Mf=c(f());qe();_r=class{static get(e,r,{baseUrl:i,localesConfiguration:s,availableContentLocales:o}=S.getState()){var n;if(r==="all"&&s?.allLanguagesAllowed)r=void 0;else if(!r||o.length>0&&!o.some(a=>a.lang===r)){let a=s?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(n=o[0])===null||n===void 0?void 0:n.lang}return new Mf.SearchPlaceConverter(i,e??20,s?.allLanguagesAllowed,r,o)}}});var Mn,Nf=l(()=>{"use strict";Wr();Mn=class extends Ke{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([i,s])=>Array.isArray(s)?[i,s.map(o=>typeof o=="object"&&o!=null&&!Array.isArray(o)?this.sortEventArrays(o):o).sort((o,n)=>typeof o=="object"&&o!==null&&"key"in o?o.key.localeCompare(n.key):typeof o=="string"&&typeof n=="string"?o.localeCompare(n):String(o).localeCompare(String(n)))]:typeof s=="object"&&s!==null?[i,this.sortEventArrays(s)]:[i,s]);return Object.fromEntries(r)}sendEvents(e,r){let i="anything not undefined";return document.dispatchEvent(new CustomEvent("ft:analytics:userevents",{detail:e})),this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>i).catch(s=>(console.info(r),console.debug(s),i)),1e3)}}});var Gl,Ff=l(()=>{"use strict";Wl();Gl=class{urlToSearchRequest(e){return _r.get().parse(e)}searchRequestToUrl(e){return _r.get().serialize(e)}};window.FluidTopicsUrlService=new Gl});var wi,Oi,Bf=l(()=>{"use strict";wi=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};wi.eventName="before-location-change";Oi=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Oi.eventName="change"});var Ql,Uf,Vf=l(()=>{"use strict";Ql=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))}},Uf=new Ql});var Rr,Nn,zf=l(()=>{"use strict";Rr=c(f());Bf();Vf();Nn=class t extends Rr.WithEventBus{static build(){return new t(window.history,Uf,()=>window.location,!1)}constructor(e,r,i,s){var o,n;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(n=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&n!==void 0?n:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Rr.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Oi(this.currentItem())),0)}installProxies(){let e=r=>(i,s,[o,n,a])=>{let u=new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),d=new wi(u);this.dispatchEvent(d);let p=r(),h={...p===this.currentIndex?this.currentState:void 0,...o,index:p,href:d.detail.nextLocation.href};i.apply(s,[h,n,h.href]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(e){this.addEventListener(wi.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(wi.eventName,e)}addHistoryChangeListener(e){this.addEventListener(Oi.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Oi.eventName,e)}currentItem(){return(0,Rr.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,Rr.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Rr.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Rr.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let s=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(s=o),o++;return s}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let s=r??this.currentState.majorStateId,o=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=s}}});var Hf=l(()=>{"use strict";zf();window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Nn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)})});var jf=l(()=>{"use strict";qe()});var Fn=l(()=>{"use strict";Bl();Pl();Tf();Lf();Wr();$f();Fl();Pf();Wl();Nf();Ff();Hf();jf()});var qf,Kf,Xl=l(()=>{"use strict";qf=c(y()),Kf=qf.css`
271
271
  `});var Wf=l(()=>{"use strict"});function Gf(t,e){let{authenticationRequired:r,session:i}=S.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var Qf=l(()=>{"use strict";qe()});var Bn,Xf=l(()=>{"use strict";Ml();Bn=class extends ns{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}}});var pr,Yl,_i,Zl=l(()=>{"use strict";pr=c(f());qe();Qf();Fn();Kr();Xf();Yl=class t extends pr.FtStateManager{static build(e){return new t(S,e)}constructor(e,r){super(),this.store=e,this.cache=new pr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Bn,this.knownContexts=new pr.AbstractRegistry,this.knownCustomComponents=new pr.AbstractRegistry,this.cleanSessionDebouncer=new pr.Debouncer,this.reloadConfiguration=()=>{var i;(i=this.cache)===null||i===void 0||i.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new pr.Debouncer(500),this.apiProvider=r??(()=>Ai.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}addListeners(){this.store.addEventListener(ur.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(ur.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",()=>Gf(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}setStickyFilters(e){this.store.actions.stickyFilters(e)}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new ro(i)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setNoCustomCode(e){this.store.actions.noCustomCode(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}userHasAnyRole(...e){return xf(S.getState().session,...e)}},_i=Yl.build()});var Ri,so=l(()=>{Ri=class extends Event{constructor(e,r,i,s){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=i,this.subscribe=s??!1}}});var Yf=l(()=>{});var Jl=l(()=>{so();});var Zf=l(()=>{});var ec=l(()=>{so();Zf();});var oo,Jf=l(()=>{so();oo=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:i}=r;for(let{elementRef:s,callbackRef:o}of i){let n=s.deref(),a=o.deref();n===void 0||a===void 0||n.dispatchEvent(new Ri(e.context,n,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],i=e.callback,s=this.pendingContextRequests.get(e.context);s===void 0&&this.pendingContextRequests.set(e.context,s={callbacks:new WeakMap,requests:[]});let o=s.callbacks.get(r);o===void 0&&s.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}}});var em=l(()=>{ec();});var tm=l(()=>{Jl();});var rm=l(()=>{so();Yf();Jl();ec();Jf();em();tm()});var im,Ze,Ti,Te,ue,tc=l(()=>{"use strict";im=c(y()),Ze=c(F()),Ti=c(f());Xl();Fn();Zl();rm();Te=function(t,e,r,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(s<3?n(o):s>3?n(e,r,o):n(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o},ue=class extends Ti.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=_i,this.contextRoot=new oo}render(){return im.html`
272
272
  <slot></slot>
273
273
  `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>ls.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};ue.elementDefinitions={};ue.styles=Kf;Te([(0,Ze.property)()],ue.prototype,"baseUrl",void 0);Te([(0,Ze.property)()],ue.prototype,"tenantId",void 0);Te([(0,Ze.property)()],ue.prototype,"apiIntegrationIdentifier",void 0);Te([(0,Ze.property)()],ue.prototype,"apiIntegrationAppVersion",void 0);Te([(0,Ze.property)()],ue.prototype,"uiLocale",void 0);Te([(0,Ti.jsonProperty)(null)],ue.prototype,"availableUiLocales",void 0);Te([(0,Ti.jsonProperty)(null)],ue.prototype,"metadataConfiguration",void 0);Te([(0,Ze.property)({type:Boolean})],ue.prototype,"editorMode",void 0);Te([(0,Ze.property)({type:Boolean})],ue.prototype,"noCustom",void 0);Te([(0,Ze.property)({type:Boolean})],ue.prototype,"openExternalDocumentInNewTab",void 0);Te([(0,Ze.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ue.prototype,"noCustomComponent",void 0);Te([(0,Ze.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ue.prototype,"noCustomCode",void 0);Te([(0,Ze.property)({type:Boolean})],ue.prototype,"withManualResources",void 0);Te([(0,Ze.property)({type:Boolean})],ue.prototype,"navigatorOnline",void 0);Te([(0,Ze.property)({type:Boolean})],ue.prototype,"forcedOffline",void 0);Te([(0,Ze.property)({type:Boolean})],ue.prototype,"authenticationRequired",void 0);Te([(0,Ti.jsonProperty)([])],ue.prototype,"messageContexts",void 0);Te([(0,Ti.jsonProperty)(void 0)],ue.prototype,"session",void 0)});var sm,om=l(()=>{"use strict";tc();sm={"ft-app-context":ue}});var nm,am=l(()=>{"use strict";nm=c(f());om();(0,nm.customElements)(sm)});var Gt=l(()=>{"use strict";Ph();qe();Hl();Rf();Fn();Xl();Wf();tc();Zl();am()});var rc,cs,Un=l(()=>{"use strict";rc=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,i]=e.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},cs=new rc});var us,lm,xE,ao,cm,um,Vn,no,ut,zn,Hn,lo=l(()=>{"use strict";us=c(f());Gt();lm=c(F());Un();xE=function(t,e,r,i){var s=arguments.length,o=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(s<3?n(o):s>3?n(e,r,o):n(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o},ao=Symbol("i18nAttributes"),cm=Symbol("i18nListAttributes"),um=Symbol("i18nProperties"),Vn=Symbol("i18nContexts"),no=Symbol("i18nUnsubs"),ut=(0,us.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?Pn:ls}i18n(o){let{context:n,key:a,message:u}=o,{custom:d,args:p,argsProvider:h}=o;if(n&&a){this.hasI18nContext(n)||this.addI18nContext(n,void 0,d);let m=p??(h?h(this):[]);return this.getI18nService(d).resolveMessage(n,a,...m)}return u}async awaitI18n(o){let{context:n,custom:a}=o;return n&&await this.getI18nService(a).prepareContext(n),this.i18n(o)}customI18n(o,n){if(cs.isI18nKey(o)){let[a,u]=o.split(".");return this.i18n({custom:!0,context:a,key:u,...n})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((n,a,u)=>o.has(a)||typeof n.argsProvider=="function"),this.updateI18nProperties(n=>typeof n.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((n,a,u)=>{var d;return((d=u?.context)===null||d===void 0?void 0:d.toLowerCase())===o}),this.updateI18nProperties(n=>n.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var n,a;let u=this,d=(p,h,m)=>m?.context&&m.key&&o(p,h,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...p})}:m;(n=this[ao])===null||n===void 0||n.forEach((p,h)=>u[h]=d(p,h,u[h])),(a=this[cm])===null||a===void 0||a.forEach((p,h)=>{var m;return u[h]=(m=u[h])===null||m===void 0?void 0:m.map(x=>d(p,h,x))})}updateI18nProperties(o){var n;(n=this[um])===null||n===void 0||n.forEach((a,u)=>{o(a,u)&&(this[u]=this.i18n(a))})}addI18nMessages(o,n,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,n,a)}addI18nContext(o,n,a){let u=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[Vn].set(u,{isCustomContext:a}),this[no].has(u)||this[no].set(u,this.getI18nService(a).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(a).prepareContext(u,n)}hasI18nContext(o){return this[Vn].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Vn].forEach((o,n)=>this.addI18nContext(n,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[no].forEach(o=>o()),this[no].clear()}}return e=Vn,r=no,xE([(0,lm.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),zn=class extends ut(us.FtLitElement){},Hn=class extends ut(us.FtLitElementRedux){}});var ic,SE,dm=l(()=>{"use strict";Un();ic=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(i=>typeof i=="string"?cs.fromAttribute(i):i):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},SE=new ic});var pm,ds,jn=l(()=>{"use strict";lo();pm=c(f());Un();dm();ds=(t,e)=>(r,i)=>{var s;r.constructor.createProperty(i,{type:Object,hasChanged:pm.hasChanged,converter:cs,...e}),r[ao]=(s=r[ao])!==null&&s!==void 0?s:new Map,r[ao].set(i,t??{})}});var $t,hm=l(()=>{"use strict";Gt();$t=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Pn:ls}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(i,s)=>{let o=s;return n=>({context:this.name,key:o,custom:this.custom,args:typeof n=="function"?void 0:n,argsProvider:typeof n=="function"?n:void 0})}}),this.messages=new Proxy({},{get:(i,s)=>(...o)=>this.service.resolveMessage(this.name,s,...o)}),this.rawMessages=new Proxy({},{get:(i,s)=>this.service.resolveRawMessage(this.name,s)}),this.keys=new Proxy({},{get:(i,s)=>()=>s}),this.attributes=new Proxy({},{get:(i,s)=>()=>({context:this.name,key:s,message:this.service.resolveRawMessage(this.name,s)})})}}});var fm=l(()=>{"use strict";lo()});var mm,gm,sc=l(()=>{"use strict";mm=c(y()),gm=mm.css`