@fluid-topics/ft-reader-breadcrumbs 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.
@@ -368,7 +368,7 @@ Also for action icons.`,a.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
368
368
  position: relative;
369
369
  word-break: break-word;
370
370
  }
371
- `;var Ta=["top","right","bottom","left"],Ra=["start","end"],En=Ta.reduce((e,t)=>e.concat(t,t+"-"+Ra[0],t+"-"+Ra[1]),[]),hr=Math.min,tt=Math.max,mr=Math.round;var Be=e=>({x:e,y:e}),yd={left:"right",right:"left",bottom:"top",top:"bottom"};function La(e,t,o){return tt(e,hr(t,o))}function jr(e,t){return typeof e=="function"?e(t):e}function yr(e){return e.split("-")[0]}function rt(e){return e.split("-")[1]}function On(e){return e==="x"?"y":"x"}function An(e){return e==="y"?"height":"width"}function Zr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function wn(e){return On(Zr(e))}function ka(e,t,o){o===void 0&&(o=!1);let n=rt(e),i=wn(e),s=An(i),c=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=Cn(c)),[c,Cn(c)]}function Ia(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Cn(e){let t=yr(e);return yd[t]+e.slice(t.length)}function gd(e){var t,o,n,i;return{top:(t=e.top)!=null?t:0,right:(o=e.right)!=null?o:0,bottom:(n=e.bottom)!=null?n:0,left:(i=e.left)!=null?i:0}}function Na(e){return typeof e!="number"?gd(e):{top:e,right:e,bottom:e,left:e}}function Ct(e){let{x:t,y:o,width:n,height:i}=e;return{width:n,height:i,top:o,left:t,right:t+n,bottom:o+i,x:t,y:o}}function Pa(e,t,o){let{reference:n,floating:i}=e,s=Zr(t),c=wn(t),d=An(c),u=yr(t),p=s==="y",f=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,m=n[d]/2-i[d]/2,x;switch(u){case"top":x={x:f,y:n.y-i.height};break;case"bottom":x={x:f,y:n.y+n.height};break;case"right":x={x:n.x+n.width,y:h};break;case"left":x={x:n.x-i.width,y:h};break;default:x={x:n.x,y:n.y}}let C=rt(t);return C&&(x[c]+=m*(C==="end"?1:-1)*(o&&p?-1:1)),x}async function Da(e,t){var o;t===void 0&&(t={});let{x:n,y:i,platform:s,rects:c,elements:d,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:x=0}=jr(t,e),C=Na(x),S=d[m?h==="floating"?"reference":"floating":h],R=Ct(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(S)))==null||o?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(d.floating)),boundary:p,rootBoundary:f,strategy:u})),I=h==="floating"?{x:n,y:i,width:c.floating.width,height:c.floating.height}:c.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d.floating)),A=await(s.isElement==null?void 0:s.isElement(E))&&await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1},D=Ct(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:I,offsetParent:E,strategy:u}):I);return{top:(R.top-D.top+C.top)/A.y,bottom:(D.bottom-R.bottom+C.bottom)/A.y,left:(R.left-D.left+C.left)/A.x,right:(D.right-R.right+C.right)/A.x}}var bd=50,Ma=async(e,t,o)=>{let{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:c}=o,d=c.detectOverflow?c:{...c,detectOverflow:Da},u=await(c.isRTL==null?void 0:c.isRTL(t)),p=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=Pa(p,n,u),m=n,x=0,C={};for(let w=0;w<s.length;w++){let S=s[w];if(!S)continue;let{name:R,fn:I}=S,{x:E,y:A,data:D,reset:k}=await I({x:f,y:h,initialPlacement:n,placement:m,strategy:i,middlewareData:C,rects:p,platform:d,elements:{reference:e,floating:t}});f=E??f,h=A??h,C[R]={...C[R],...D},k&&x<bd&&(x++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(p=k.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:f,y:h}=Pa(p,m,u)),w=-1)}return{x:f,y:h,placement:m,strategy:i,middlewareData:C}};function xd(e,t,o){return(e?[...o.filter(i=>rt(i)===e),...o.filter(i=>rt(i)!==e)]:o.filter(i=>yr(i)===i)).filter(i=>e?rt(i)===e||(t?Ia(i)!==i:!1):!0)}var Ua=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,i;let{rects:s,middlewareData:c,placement:d,platform:u,elements:p}=t,{crossAxis:f=!1,alignment:h,allowedPlacements:m=En,autoAlignment:x=!0,...C}=jr(e,t),w=h!==void 0||m===En?xd(h||null,x,m):m,S=((o=c.autoPlacement)==null?void 0:o.index)||0,R=w[S];if(R==null)return{};if(d!==R)return{reset:{placement:w[0]}};let I=await u.detectOverflow(t,C),E=ka(R,s,await(u.isRTL==null?void 0:u.isRTL(p.floating))),A=[I[yr(R)],I[E[0]],I[E[1]]],D=[...((n=c.autoPlacement)==null?void 0:n.overflows)||[],{placement:R,overflows:A}],k=w[S+1];if(k)return{data:{index:S+1,overflows:D},reset:{placement:k}};let V=D.map(xe=>{let sr=rt(xe.placement);return[xe.placement,sr&&f?xe.overflows.slice(0,2).reduce((ed,td)=>ed+td,0):xe.overflows[0],xe.overflows]}).sort((xe,sr)=>xe[1]-sr[1]),$r=((i=V.filter(xe=>xe[2].slice(0,rt(xe[0])?2:3).every(sr=>sr<=0))[0])==null?void 0:i[0])||V[0][0];return $r!==d?{data:{index:S+1,overflows:D},reset:{placement:$r}}:{}}}};var Ba=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:i,platform:s}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:u={fn:I=>{let{x:E,y:A}=I;return{x:E,y:A}}},...p}=jr(e,t),f={x:o,y:n},h=await s.detectOverflow(t,p),m=Zr(i),x=On(m),C=f[x],w=f[m],S=(I,E)=>La(E+h[I==="y"?"top":"left"],E,E-h[I==="y"?"bottom":"right"]);c&&(C=S(x,C)),d&&(w=S(m,w));let R=u.fn({...t,[x]:C,[m]:w});return{...R,data:{x:R.x-o,y:R.y-n,enabled:{[x]:c,[m]:d}}}}}};function Yr(){return typeof window<"u"}function Ot(e){return $a(e)?(e.nodeName||"").toLowerCase():"#document"}function ue(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function je(e){var t;return(t=($a(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $a(e){return Yr()?e instanceof Node||e instanceof ue(e).Node:!1}function Re(e){return Yr()?e instanceof Element||e instanceof ue(e).Element:!1}function Ze(e){return Yr()?e instanceof HTMLElement||e instanceof ue(e).HTMLElement:!1}function Fa(e){return!Yr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ue(e).ShadowRoot}function gr(e){let{overflow:t,overflowX:o,overflowY:n,display:i}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&i!=="inline"&&i!=="contents"}function Ha(e){return/^(table|td|th)$/.test(Ot(e))}function br(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var vd=/transform|translate|scale|rotate|perspective|filter/,Sd=/paint|layout|strict|content/,Et=e=>!!e&&e!=="none",_n;function Ht(e){let t=Re(e)?Te(e):e;return Et(t.transform)||Et(t.translate)||Et(t.scale)||Et(t.rotate)||Et(t.perspective)||!Xr()&&(Et(t.backdropFilter)||Et(t.filter))||vd.test(t.willChange||"")||Sd.test(t.contain||"")}function za(e){let t=ot(e);for(;Ze(t)&&!zt(t);){if(Ht(t))return t;if(br(t))return null;t=ot(t)}return null}function Xr(){return _n==null&&(_n=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_n}function zt(e){return/^(html|body|#document)$/.test(Ot(e))}function Te(e){return ue(e).getComputedStyle(e)}function xr(e){return Re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ot(e){if(Ot(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Fa(e)&&e.host||je(e);return Fa(t)?t.host:t}function Ga(e){let t=ot(e);return zt(t)?(e.ownerDocument||e).body:Ze(t)&&gr(t)?t:Ga(t)}function qr(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let i=Ga(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),c=ue(i);if(s){let d=Jr(c);return t.concat(c,c.visualViewport||[],gr(i)?i:[],d&&o?qr(d):[])}else return t.concat(i,qr(i,[],o))}function Jr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ka(e){let t=Te(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=Ze(e),s=i?e.offsetWidth:o,c=i?e.offsetHeight:n,d=mr(o)!==s||mr(n)!==c;return d&&(o=s,n=c),{width:o,height:n,$:d}}function ja(e){return Re(e)?e:e.contextElement}function Gt(e){let t=ja(e);if(!Ze(t))return Be(1);let o=t.getBoundingClientRect(),{width:n,height:i,$:s}=Ka(t),c=(s?mr(o.width):o.width)/n,d=(s?mr(o.height):o.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}var Cd=Be(0);function Za(e){let t=ue(e);return!Xr()||!t.visualViewport?Cd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ed(e,t,o){return t===void 0&&(t=!1),!!o&&t&&o===ue(e)}function vr(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let i=e.getBoundingClientRect(),s=ja(e),c=Be(1);t&&(n?Re(n)&&(c=Gt(n)):c=Gt(e));let d=Ed(s,o,n)?Za(s):Be(0),u=(i.left+d.x)/c.x,p=(i.top+d.y)/c.y,f=i.width/c.x,h=i.height/c.y;if(s&&n){let m=ue(s),x=Re(n)?ue(n):n,C=m,w=Jr(C);for(;w&&x!==C;){let S=Gt(w),R=w.getBoundingClientRect(),I=Te(w),E=R.left+(w.clientLeft+parseFloat(I.paddingLeft))*S.x,A=R.top+(w.clientTop+parseFloat(I.paddingTop))*S.y;u*=S.x,p*=S.y,f*=S.x,h*=S.y,u+=E,p+=A,C=ue(w),w=Jr(C)}}return Ct({width:f,height:h,x:u,y:p})}function Qr(e,t){let o=xr(e).scrollLeft;return t?t.left+o:vr(je(e)).left+o}function qa(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-Qr(e,o),i=o.top+t.scrollTop;return{x:n,y:i}}function Od(e){let{elements:t,rect:o,offsetParent:n,strategy:i}=e,s=i==="fixed",c=je(n),d=t?br(t.floating):!1;if(n===c||d&&s)return o;let u={scrollLeft:0,scrollTop:0},p=Be(1),f=Be(0),h=Ze(n);if((h||!s)&&((Ot(n)!=="body"||gr(c))&&(u=xr(n)),h)){let x=vr(n);p=Gt(n),f.x=x.x+n.clientLeft,f.y=x.y+n.clientTop}let m=c&&!h&&!s?qa(c,u):Be(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-u.scrollLeft*p.x+f.x+m.x,y:o.y*p.y-u.scrollTop*p.y+f.y+m.y}}function Ad(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function wd(e){let t=xr(e),o=e.ownerDocument.body,n=tt(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=tt(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-t.scrollLeft+Qr(e),c=-t.scrollTop;return Te(o).direction==="rtl"&&(s+=tt(e.clientWidth,o.clientWidth)-n),{width:n,height:i,x:s,y:c}}var _d=25;function Rd(e,t,o){o===void 0&&(o="viewport");let n=o==="layoutViewport",i=ue(e),s=je(e),c=i.visualViewport,d=s.clientWidth,u=s.clientHeight,p=0,f=0;if(c){let m=!Xr()||t==="fixed";n?m||(p=-c.offsetLeft,f=-c.offsetTop):(d=c.width,u=c.height,m&&(p=c.offsetLeft,f=c.offsetTop))}if(Qr(s)<=0){let m=s.ownerDocument,x=m.body,C=getComputedStyle(x),w=m.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,S=Math.abs(s.clientWidth-x.clientWidth-w),R=getComputedStyle(s).scrollbarGutter==="stable both-edges"?S/2:S;R<=_d&&(d-=R)}return{width:d,height:u,x:p,y:f}}function Td(e,t){let o=vr(e,!0,t==="fixed"),n=o.top+e.clientTop,i=o.left+e.clientLeft,s=Gt(e),c=e.clientWidth*s.x,d=e.clientHeight*s.y,u=i*s.x,p=n*s.y;return{width:c,height:d,x:u,y:p}}function Wa(e,t,o){let n;if(t==="viewport"||t==="layoutViewport")n=Rd(e,o,t);else if(t==="document")n=wd(je(e));else if(Re(t))n=Td(t,o);else{let i=Za(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ct(n)}function Ld(e,t){let o=t.get(e);if(o)return o;let n=qr(e,[],!1).filter(d=>Re(d)&&Ot(d)!=="body"),i=null,s=Te(e).position==="fixed",c=s?ot(e):e;for(;Re(c)&&!zt(c);){let d=Te(c),u=Ht(c),p=i?i.position:s?"fixed":"";!u&&(p==="fixed"||p==="absolute"&&d.position==="static")?n=n.filter(h=>h!==c):i=d,c=ot(c)}return t.set(e,n),n}function kd(e){let{element:t,boundary:o,rootBoundary:n,strategy:i}=e,c=[...o==="clippingAncestors"?br(t)?[]:Ld(t,this._c):[].concat(o),n],d=Wa(t,c[0],i),u=d.top,p=d.right,f=d.bottom,h=d.left;for(let m=1;m<c.length;m++){let x=Wa(t,c[m],i);u=tt(x.top,u),p=hr(x.right,p),f=hr(x.bottom,f),h=tt(x.left,h)}return{width:p-h,height:f-u,x:h,y:u}}function Id(e){let{width:t,height:o}=Ka(e);return{width:t,height:o}}function Nd(e,t,o){let n=Ze(t),i=je(t),s=o==="fixed",c=vr(e,!0,s,t),d={scrollLeft:0,scrollTop:0},u=Be(0);if((n||!s)&&((Ot(t)!=="body"||gr(i))&&(d=xr(t)),n)){let m=vr(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}!n&&i&&(u.x=Qr(i));let p=i&&!n&&!s?qa(i,d):Be(0),f=c.left+d.scrollLeft-u.x-p.x,h=c.top+d.scrollTop-u.y-p.y;return{x:f,y:h,width:c.width,height:c.height}}function Rn(e){return Te(e).position==="static"}function Va(e,t){if(!Ze(e)||Te(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return je(e)===o&&(o=o.ownerDocument.body),o}function Ya(e,t){let o=ue(e);if(br(e))return o;if(!Ze(e)){let i=ot(e);for(;i&&!zt(i);){if(Re(i)&&!Rn(i))return i;i=ot(i)}return o}let n=Va(e,t);for(;n&&Ha(n)&&Rn(n);)n=Va(n,t);return n&&zt(n)&&Rn(n)&&!Ht(n)?o:n||za(e)||o}var Pd=async function(e){let t=this.getOffsetParent||Ya,o=this.getDimensions,n=await o(e.floating);return{reference:Nd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Dd(e){return Te(e).direction==="rtl"}var eo={convertOffsetParentRelativeRectToViewportRelativeRect:Od,getDocumentElement:je,getClippingRect:kd,getOffsetParent:Ya,getElementRects:Pd,getClientRects:Ad,getDimensions:Id,getScale:Gt,isElement:Re,isRTL:Dd};var Xa=Ua,Ja=Ba;var Qa=(e,t,o)=>{let n=new Map,i=o??{},s={...eo,...i.platform,_c:n};return Ma(e,t,{...i,platform:s})};function es(e){return Md(e)}function Tn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Md(e){for(let t=e;t;t=Tn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Tn(e);t;t=Tn(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||Ht(o)||t.tagName==="BODY"))return t}return null}async function to(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},Qa(e,t,{strategy:n.strategy,platform:{...eo,getOffsetParent:i=>eo.getOffsetParent(i,es)},middleware:[Ja({crossAxis:!0}),Xa({allowedPlacements:[n.placement]})]})}var Qt=y(O());var Xn=y(q());var ts=y(q(),1);var Ln=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},Ud=e=>({fromAttribute:t=>{if(t==null)return Sr(e);try{return JSON.parse(t)}catch{return Sr(e)}},toAttribute:t=>JSON.stringify(t)});function rs(e,t){return(0,ts.property)({type:Object,converter:Ud(e),hasChanged:Cr,...t??{}})}function Bd(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Wt(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Wt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=c=>Object.keys(c).filter(d=>c[d]!=null),s=i(e);if(o=s.length,o!==i(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=o;n--!==0;){let c=s[n];if(!Wt(e[c],t[c]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Wt(e,t){try{return Bd(e,t)}catch{return!1}}function Cr(e,t){return!Wt(e,t)}function Sr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function ro(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let i=t(n);return i[e]=!0,i}}var os=y(q(),1);var kn=e=>{let t=e??{};return(o,n)=>{var i;let s={hasChanged:Cr,attribute:!1,...t};(0,os.property)(s)(o,n);let c=o.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(d=>d[n]),store:t.store})}};var oo=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var At=y(q(),1);var no=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let c of n)try{await c()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ao=y(N(),1);var io=class extends ao.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return(0,ao.adoptStyles)(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){Ln(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function ns(e,t,...o){var n;let i=e.querySelector(t);for(let s of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var Kt=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},cs,is=Symbol("constructorPrototype"),as=Symbol("constructorName"),ls=Symbol("exportpartsDebouncer"),ss=Symbol("dynamicDependenciesLoaded"),Vt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Vt.eventName="exportparts-updated";var Fe=class extends io{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[cs]=new no(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[ls].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[as]=this.constructor.name,this[is]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[as]&&Object.setPrototypeOf(this,this[is])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[ss]||(o[ss]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Vt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Vt.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Vt)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];o=ns(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var o,n,i,s,c,d;let u=m=>m!=null&&m.trim().length>0,p=t.filter(u).map(m=>m.trim());if(p.length===0){this.exportparts=void 0;return}let f=new Set;for(let m of(s=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&s!==void 0?s:[]){let x=(c=(n=m.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&c!==void 0?c:[],C=(d=(i=m.getAttribute("exportparts"))===null||i===void 0?void 0:i.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[],w=[...x,...C].filter(u).map(S=>S.trim());for(let S of w)f.add(S)}if(f.size===0){this.exportparts=void 0;return}let h=[...f.values()].flatMap(m=>p.map(x=>`${m}:${x}--${m}`));this.exportparts=[...this.part,...h].join(", ")}};cs=ls;Kt([(0,At.property)()],Fe.prototype,"exportpartsPrefix",void 0);Kt([rs([])],Fe.prototype,"exportpartsPrefixes",void 0);Kt([(0,At.property)({reflect:!0})],Fe.prototype,"exportparts",void 0);Kt([(0,At.property)()],Fe.prototype,"customStylesheet",void 0);Kt([(0,At.property)()],Fe.prototype,"elementToFocus",void 0);Kt([(0,At.state)()],Fe.prototype,"useAdoptedStyleSheets",void 0);function so(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Er=Symbol("internalReduxEventsUnsubscribers"),nt=Symbol("internalStoresUnsubscribers"),wt=Symbol("internalStores"),Fd=ro(Symbol("withRedux"),function(e){var t,o,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(c){super.willUpdate(c),[...this.reduxConstructor.reduxReactiveProperties].some(d=>c.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[wt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[wt].values()][0]}getStore(c){return c==null?this.getUnnamedStore():this[wt].get(c)}addStore(c,d){var u;d=(u=d??c.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[wt].set(d,c),this.subscribeToStore(d,c),this.updateFromStores()}removeStore(c){let d=typeof c=="string"?c:c.name;this.unsubscribeFromStore(d),this[wt].delete(d)}setupStores(){this.unsubscribeFromStores(),this[wt].forEach((c,d)=>this.subscribeToStore(d,c)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((c,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(c.store);p&&(c.store?this[nt].has(c.store):this[nt].size>0)&&(this[d]=c.selector(p.getState(),this))}})}subscribeToStore(c,d){var u,p;this[nt].set(c,d.subscribe(()=>this.updateFromStores())),this[Er].set(c,[]),so(d)&&(!((u=d.deprecatedKeys)===null||u===void 0)&&u.length&&this.reduxConstructor.reduxProperties.forEach((f,h)=>{this.getStore(f.store)===d&&d.deprecatedKeys.includes(h)&&console.warn("Element",this,"is subscribed to deprecated key",h,"in store",d.name)}),d.eventBus&&((p=this.reduxConstructor.reduxEventListeners)===null||p===void 0||p.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||d.name===f.store)){let m=x=>this[h](x);d.addEventListener(f.eventName,m),this[Er].get(c).push(()=>d.removeEventListener(f.eventName,m))}}))),this.onStoreAvailable(c)}unsubscribeFromStores(){this[nt].forEach((c,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(c){var d;this[nt].has(c)&&this[nt].get(c)(),this[nt].delete(c),(d=this[Er].get(c))===null||d===void 0||d.forEach(u=>u()),this[Er].delete(c)}onStoreAvailable(c){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=nt,o=wt,n=Er,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),ds=class extends Fd(Fe){};function Q(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $d=typeof Symbol=="function"&&Symbol.observable||"@@observable",us=$d,In=()=>Math.random().toString(36).substring(7).split("").join("."),Hd={INIT:`@@redux/INIT${In()}`,REPLACE:`@@redux/REPLACE${In()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${In()}`},co=Hd;function lo(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Nn(e,t,o){if(typeof e!="function")throw new Error(Q(2));if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Q(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Q(1));return o(Nn)(e,t)}let n=e,i=t,s=new Map,c=s,d=0,u=!1;function p(){c===s&&(c=new Map,s.forEach((S,R)=>{c.set(R,S)}))}function f(){if(u)throw new Error(Q(3));return i}function h(S){if(typeof S!="function")throw new Error(Q(4));if(u)throw new Error(Q(5));let R=!0;p();let I=d++;return c.set(I,S),function(){if(R){if(u)throw new Error(Q(6));R=!1,p(),c.delete(I),s=null}}}function m(S){if(!lo(S))throw new Error(Q(7));if(typeof S.type>"u")throw new Error(Q(8));if(typeof S.type!="string")throw new Error(Q(17));if(u)throw new Error(Q(9));try{u=!0,i=n(i,S)}finally{u=!1}return(s=c).forEach(I=>{I()}),S}function x(S){if(typeof S!="function")throw new Error(Q(10));n=S,m({type:co.REPLACE})}function C(){let S=h;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(Q(11));function I(){let A=R;A.next&&A.next(f())}return I(),{unsubscribe:S(I)}},[us](){return this}}}return m({type:co.INIT}),{dispatch:m,subscribe:h,getState:f,replaceReducer:x,[us]:C}}function zd(e){Object.keys(e).forEach(t=>{let o=e[t];if(typeof o(void 0,{type:co.INIT})>"u")throw new Error(Q(12));if(typeof o(void 0,{type:co.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Q(13))})}function Pn(e){let t=Object.keys(e),o={};for(let c=0;c<t.length;c++){let d=t[c];typeof e[d]=="function"&&(o[d]=e[d])}let n=Object.keys(o),i,s;try{zd(o)}catch(c){s=c}return function(d={},u){if(s)throw s;let p=!1,f={};for(let h=0;h<n.length;h++){let m=n[h],x=o[m],C=d[m],w=x(C,u);if(typeof w>"u"){let S=u&&u.type;throw new Error(Q(14))}f[m]=w,p=p||w!==C}return p=p||n.length!==Object.keys(d).length,p?f:d}}function Or(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,o)=>(...n)=>t(o(...n)))}function ps(...e){return t=>(o,n)=>{let i=t(o,n),s=()=>{throw new Error(Q(15))},c={getState:i.getState,dispatch:(u,...p)=>s(u,...p)},d=e.map(u=>u(c));return s=Or(...d)(i.dispatch),{...i,dispatch:s}}}function fs(e){return lo(e)&&"type"in e&&typeof e.type=="string"}var Cs=Symbol.for("immer-nothing"),hs=Symbol.for("immer-draftable"),re=Symbol.for("immer-state");function Le(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var he=Object,Zt=he.getPrototypeOf,ho="constructor",vo="prototype",Bn="configurable",mo="enumerable",po="writable",Ar="value",$e=e=>!!e&&!!e[re];function me(e){return e?Es(e)||Co(e)||!!e[hs]||!!e[ho]?.[hs]||Eo(e)||Tr(e):!1}var Gd=he[vo][ho].toString(),ms=new WeakMap;function Es(e){if(!e||!Kn(e))return!1;let t=Zt(e);if(t===null||t===he[vo])return!0;let o=he.hasOwnProperty.call(t,ho)&&t[ho];if(o===Object)return!0;if(!jt(o))return!1;let n=ms.get(o);return n===void 0&&(n=Function.toString.call(o),ms.set(o,n)),n===Gd}function So(e,t,o=!0){Rr(e)===0?(o?Reflect.ownKeys(e):he.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Rr(e){let t=e[re];return t?t.type_:Co(e)?1:Eo(e)?2:Tr(e)?3:0}var Dn=(e,t,o=Rr(e))=>o===2?e.has(t):he[vo].hasOwnProperty.call(e,t),Fn=(e,t,o=Rr(e))=>o===2?e.get(t):e[t],yo=(e,t,o,n=Rr(e))=>{n===2?e.set(t,o):n===3?e.add(o):e[t]=o};function Wd(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Co=Array.isArray,Eo=e=>e instanceof Map,Tr=e=>e instanceof Set,Kn=e=>typeof e=="object",jt=e=>typeof e=="function",Mn=e=>typeof e=="boolean";function Vd(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var qe=e=>e.copy_||e.base_;var jn=e=>e.modified_?e.copy_:e.base_;function $n(e,t){if(Eo(e))return new Map(e);if(Tr(e))return new Set(e);if(Co(e))return Array[vo].slice.call(e);let o=Es(e);if(t===!0||t==="class_only"&&!o){let n=he.getOwnPropertyDescriptors(e);delete n[re];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){let c=i[s],d=n[c];d[po]===!1&&(d[po]=!0,d[Bn]=!0),(d.get||d.set)&&(n[c]={[Bn]:!0,[po]:!0,[mo]:d[mo],[Ar]:e[c]})}return he.create(Zt(e),n)}else{let n=Zt(e);if(n!==null&&o)return{...e};let i=he.create(n);return he.assign(i,e)}}function Oo(e,t=!1){return Ao(e)||$e(e)||!me(e)||(Rr(e)>1&&he.defineProperties(e,{set:uo,add:uo,clear:uo,delete:uo}),he.freeze(e),t&&So(e,(o,n)=>{Oo(n,!0)},!1)),e}function Kd(){Le(2)}var uo={[Ar]:Kd};function Ao(e){return e===null||!Kn(e)?!0:he.isFrozen(e)}var go="MapSet",Hn="Patches",ys="ArrayMethods",Os={};function _t(e){let t=Os[e];return t||Le(0,e),t}var gs=e=>!!Os[e];var wr,As=()=>wr,jd=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:gs(go)?_t(go):void 0,arrayMethodsPlugin_:gs(ys)?_t(ys):void 0});function bs(e,t){t&&(e.patchPlugin_=_t(Hn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zn(e){Gn(e),e.drafts_.forEach(Zd),e.drafts_=null}function Gn(e){e===wr&&(wr=e.parent_)}var xs=e=>wr=jd(wr,e);function Zd(e){let t=e[re];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function vs(e,t){t.unfinalizedDrafts_=t.drafts_.length;let o=t.drafts_[0];if(e!==void 0&&e!==o){o[re].modified_&&(zn(t),Le(4)),me(e)&&(e=Ss(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(o[re].base_,e,t)}else e=Ss(t,o);return qd(t,e,!0),zn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Cs?e:void 0}function Ss(e,t){if(Ao(t))return t;let o=t[re];if(!o)return bo(t,e.handledSet_,e);if(!wo(o,e))return t;if(!o.modified_)return o.base_;if(!o.finalized_){let{callbacks_:n}=o;if(n)for(;n.length>0;)n.pop()(e);Rs(o,e)}return o.copy_}function qd(e,t,o=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Oo(t,o)}function ws(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var wo=(e,t)=>e.scope_===t,Yd=[];function _s(e,t,o,n){let i=qe(e),s=e.type_;if(n!==void 0&&Fn(i,n,s)===t){yo(i,n,o,s);return}if(!e.draftLocations_){let d=e.draftLocations_=new Map;So(i,(u,p)=>{if($e(p)){let f=d.get(p)||[];f.push(u),d.set(p,f)}})}let c=e.draftLocations_.get(t)??Yd;for(let d of c)yo(i,d,o,s)}function Xd(e,t,o){e.callbacks_.push(function(i){let s=t;if(!s||!wo(s,i))return;i.mapSetPlugin_?.fixSetContents(s);let c=jn(s);_s(e,s.draft_??s,c,o),Rs(s,i)})}function Rs(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let i=n.getPath(e);i&&n.generatePatches_(e,i,t)}ws(e)}}function Jd(e,t,o){let{scope_:n}=e;if($e(o)){let i=o[re];wo(i,n)&&i.callbacks_.push(function(){fo(e);let c=jn(i);_s(e,o,c,t)})}else me(o)&&e.callbacks_.push(function(){let s=qe(e);e.type_===3?s.has(o)&&bo(o,n.handledSet_,n):Fn(s,t,e.type_)===o&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&bo(Fn(e.copy_,t,e.type_),n.handledSet_,n)})}function bo(e,t,o){return!o.immer_.autoFreeze_&&o.unfinalizedDrafts_<1||$e(e)||t.has(e)||!me(e)||Ao(e)||(t.add(e),So(e,(n,i)=>{if($e(i)){let s=i[re];if(wo(s,o)){let c=jn(s);yo(e,n,c,e.type_),ws(s)}}else me(i)&&bo(i,t,o)})),e}function Qd(e,t){let o=Co(e),n={type_:o?1:0,scope_:t?t.scope_:As(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,s=xo;o&&(i=[n],s=_r);let{revoke:c,proxy:d}=Proxy.revocable(i,s);return n.draft_=d,n.revoke_=c,[d,n]}var xo={get(e,t){if(t===re)return e;let o=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&o?.isArrayOperationMethod(t))return o.createMethodInterceptor(e,t);let i=qe(e);if(!Dn(i,t,e.type_))return tu(e,i,t);let s=i[t];if(e.finalized_||!me(s)||n&&e.operationMethod&&o?.isMutatingArrayMethod(e.operationMethod)&&Vd(t))return s;if(s===Un(e.base_,t)||eu(e,t,s)){fo(e);let c=e.type_===1?+t:t,d=Vn(e.scope_,s,e,c);return e.copy_[c]=d}return s},has(e,t){return t in qe(e)},ownKeys(e){return Reflect.ownKeys(qe(e))},set(e,t,o){let n=Ts(qe(e),t);if(n?.set)return n.set.call(e.draft_,o),!0;if(!e.modified_){let i=Un(qe(e),t),s=i?.[re];if(s&&s.base_===o)return e.copy_[t]=o,e.assigned_.delete(t),!0;if(Wd(o,i)&&(o!==void 0||Dn(e.base_,t,e.type_)))return!0;fo(e),Wn(e)}return e.copy_[t]===o&&(o!==void 0||Dn(e.copy_,t,e.type_))||Number.isNaN(o)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=o,e.assigned_.set(t,!0),Jd(e,t,o)),!0},deleteProperty(e,t){return fo(e),Un(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Wn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let o=qe(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{[po]:!0,[Bn]:e.type_!==1||t!=="length",[mo]:n[mo],[Ar]:o[t]}},defineProperty(){Le(11)},getPrototypeOf(e){return Zt(e.base_)},setPrototypeOf(){Le(12)}},_r={};for(let e in xo){let t=xo[e];_r[e]=function(){let o=arguments;return o[0]=o[0][0],t.apply(this,o)}}_r.deleteProperty=function(e,t){return _r.set.call(this,e,t,void 0)};_r.set=function(e,t,o){return xo.set.call(this,e[0],t,o,e[0])};function Un(e,t){let o=e[re];return(o?qe(o):e)[t]}function eu(e,t,o){return e.type_!==1||!e.allIndicesReassigned_||!me(o)||o[re]?!1:e.baseRefs_.has(o)}function tu(e,t,o){let n=Ts(t,o);return n?Ar in n?n[Ar]:n.get?.call(e.draft_):void 0}function Ts(e,t){if(!(t in e))return;let o=Zt(e);for(;o;){let n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Zt(o)}}function Wn(e){e.modified_||(e.modified_=!0,e.parent_&&Wn(e.parent_))}function fo(e){e.copy_||(e.assigned_=new Map,e.copy_=$n(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ru=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,o,n)=>{if(jt(t)&&!jt(o)){let s=o;o=t;let c=this;return function(u=s,...p){return c.produce(u,f=>o.call(this,f,...p))}}jt(o)||Le(6),n!==void 0&&!jt(n)&&Le(7);let i;if(me(t)){let s=xs(this),c=Vn(s,t,void 0),d=!0;try{i=o(c),d=!1}finally{d?zn(s):Gn(s)}return bs(s,n),vs(i,s)}else if(!t||!Kn(t)){if(i=o(t),i===void 0&&(i=t),i===Cs&&(i=void 0),this.autoFreeze_&&Oo(i,!0),n){let s=[],c=[];_t(Hn).generateReplacementPatches_(t,i,{patches_:s,inversePatches_:c}),n(s,c)}return i}else Le(1,t)},this.produceWithPatches=(t,o)=>{if(jt(t))return(c,...d)=>this.produceWithPatches(c,u=>t(u,...d));let n,i;return[this.produce(t,o,(c,d)=>{n=c,i=d}),n,i]},Mn(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Mn(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Mn(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){me(e)||Le(8),$e(e)&&(e=Ls(e));let t=xs(this),o=Vn(t,e,void 0);return o[re].isManual_=!0,Gn(t),o}finishDraft(e,t){let o=e&&e[re];(!o||!o.isManual_)&&Le(9);let{scope_:n}=o;return bs(n,t),vs(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let o;for(o=t.length-1;o>=0;o--){let i=t[o];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}o>-1&&(t=t.slice(o+1));let n=_t(Hn).applyPatches_;return $e(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Vn(e,t,o,n){let[i,s]=Eo(t)?_t(go).proxyMap_(t,o):Tr(t)?_t(go).proxySet_(t,o):Qd(t,o);return(o?.scope_??As()).drafts_.push(i),s.callbacks_=o?.callbacks_??[],s.key_=n,o&&n!==void 0?Xd(o,s,n):s.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:p}=u;s.modified_&&p&&p.generatePatches_(s,[],u)}),i}function Ls(e){return $e(e)||Le(10,e),ks(e)}function ks(e){if(!me(e)||Ao(e))return e;let t=e[re],o,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,o=$n(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else o=$n(e,!0);let i=o;return Tr(o)&&(o=new Set),So(i,(s,c)=>{yo(o,s,ks(c))},n),t&&(t.finalized_=!1),o}var ou=globalThis.Iterator,Sb=typeof ou?.from=="function";var nu=new ru,Zn=nu.produce;function Is(e){return({dispatch:o,getState:n})=>i=>s=>typeof s=="function"?s(o,n,e):i(s)}var Ns=Is(),Ps=Is;var iu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Or:Or.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var au=e=>e&&typeof e.match=="function";function it(e,t){function o(...n){if(t){let i=t(...n);if(!i)throw new Error(He(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return o.toString=()=>`${e}`,o.type=e,o.match=n=>fs(n)&&n.type===e,o}var Fs=class Lr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Lr.prototype)}static get[Symbol.species](){return Lr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Lr(...t[0].concat(this)):new Lr(...t.concat(this))}};function Ds(e){return me(e)?Zn(e,()=>{}):e}function _o(e,t,o){return e.has(t)?e.get(t):e.set(t,o(t)).get(t)}function su(e){return typeof e=="boolean"}var cu=()=>function(t){let{thunk:o=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{},c=new Fs;return o&&(su(o)?c.push(Ns):c.push(Ps(o.extraArgument))),c},lu="RTK_autoBatch";var Ms=e=>t=>{setTimeout(t,e)},du=(e,t)=>o=>{let n=!1,i,s,c=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(s),o())};i=e(c),s=setTimeout(c,t)},uu=(e={type:"raf"})=>t=>(...o)=>{let n=t(...o),i=!0,s=!1,c=!1,d=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?du(window.requestAnimationFrame,100):Ms(10):e.type==="callback"?e.queueNotification:Ms(e.timeout),p=()=>{c=!1,s&&(s=!1,d.forEach(f=>f()))};return Object.assign({},n,{subscribe(f){let h=()=>i&&f(),m=n.subscribe(h);return d.add(f),()=>{m(),d.delete(f)}},dispatch(f){try{return i=!f?.meta?.[lu],s=!i,s&&(c||(c=!0,u(p))),n.dispatch(f)}finally{i=!0}}})},pu=e=>function(o){let{autoBatch:n=!0}=o??{},i=new Fs(e);return n&&i.push(uu(typeof n=="object"?n:void 0)),i};function $s(e){let t=cu(),{reducer:o=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:s=!0,preloadedState:c=void 0,enhancers:d=void 0}=e||{},u;if(typeof o=="function")u=o;else if(lo(o))u=Pn(o);else throw new Error(He(1));let p;typeof n=="function"?p=n(t):p=t();let f=Or;i&&(f=iu({trace:!1,...typeof i=="object"&&i}));let h=ps(...p),m=pu(h),x=typeof d=="function"?d(m):m(),C=f(...x);return Nn(u,c,C)}function Hs(e){let t={},o=[],n,i={addCase(s,c){let d=typeof s=="string"?s:s.type;if(!d)throw new Error(He(28));if(d in t)throw new Error(He(29));return t[d]=c,i},addAsyncThunk(s,c){return c.pending&&(t[s.pending.type]=c.pending),c.rejected&&(t[s.rejected.type]=c.rejected),c.fulfilled&&(t[s.fulfilled.type]=c.fulfilled),c.settled&&o.push({matcher:s.settled,reducer:c.settled}),i},addMatcher(s,c){return o.push({matcher:s,reducer:c}),i},addDefaultCase(s){return n=s,i}};return e(i),[t,o,n]}function fu(e){return typeof e=="function"}function hu(e,t){let[o,n,i]=Hs(t),s;if(fu(e))s=()=>Ds(e());else{let d=Ds(e);s=()=>d}function c(d=s(),u){let p=[o[u.type],...n.filter(({matcher:f})=>f(u)).map(({reducer:f})=>f)];return p.filter(f=>!!f).length===0&&(p=[i]),p.reduce((f,h)=>{if(h)if($e(f)){let m=h(f,u);return m===void 0?f:m}else{if(me(f))return Zn(f,m=>h(m,u));{let m=h(f,u);if(m===void 0){if(f===null)return f;throw new Error(He(9))}return m}}return f},d)}return c.getInitialState=s,c}var mu=(e,t)=>au(e)?e.match(t):e(t);function yu(...e){return t=>e.some(o=>mu(o,t))}var gu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",bu=(e=21)=>{let t="",o=e;for(;o--;)t+=gu[Math.random()*64|0];return t},xu=["name","message","stack","code"],qn=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Us=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},vu=e=>{if(typeof e=="object"&&e!==null){let t={};for(let o of xu)typeof e[o]=="string"&&(t[o]=e[o]);return t}return{message:String(e)}},Bs="External signal was aborted",Su=(()=>{function e(t,o,n){let i=it(t+"/fulfilled",(u,p,f,h)=>({payload:u,meta:{...h||{},arg:f,requestId:p,requestStatus:"fulfilled"}})),s=it(t+"/pending",(u,p,f)=>({payload:void 0,meta:{...f||{},arg:p,requestId:u,requestStatus:"pending"}})),c=it(t+"/rejected",(u,p,f,h,m)=>({payload:h,error:(n&&n.serializeError||vu)(u||"Rejected"),meta:{...m||{},arg:f,requestId:p,rejectedWithValue:h!==void 0,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function d(u,{signal:p}={}){return(f,h,m)=>{let x=n?.idGenerator?n.idGenerator(u):bu(),C=new AbortController,w,S;function R(E){S=E,C.abort()}p&&(p.aborted?R(Bs):p.addEventListener("abort",()=>R(Bs),{once:!0}));let I=(async function(){let E;try{let A=n?.condition?.(u,{getState:h,extra:m});if(Eu(A)&&(A=await A),A===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(C.signal.aborted)throw{name:"AbortError",message:S||"Aborted"};let D=new Promise((k,V)=>{w=()=>{V({name:"AbortError",message:S||"Aborted"})},C.signal.addEventListener("abort",w,{once:!0})});f(s(x,u,n?.getPendingMeta?.({requestId:x,arg:u},{getState:h,extra:m}))),E=await Promise.race([D,Promise.resolve(o(u,{dispatch:f,getState:h,extra:m,requestId:x,signal:C.signal,abort:R,rejectWithValue:((k,V)=>new qn(k,V)),fulfillWithValue:((k,V)=>new Us(k,V))})).then(k=>{if(k instanceof qn)throw k;return k instanceof Us?i(k.payload,x,u,k.meta):i(k,x,u)})])}catch(A){E=A instanceof qn?c(null,x,u,A.payload,A.meta):c(A,x,u)}finally{w&&C.signal.removeEventListener("abort",w)}return n&&!n.dispatchConditionRejection&&c.match(E)&&E.meta.condition||f(E),E})();return Object.assign(I,{abort:R,requestId:x,arg:u,unwrap(){return I.then(Cu)}})}}return Object.assign(d,{pending:s,rejected:c,fulfilled:i,settled:yu(c,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Cu(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Eu(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var zs=Symbol.for("rtk-slice-createasyncthunk"),Tb={[zs]:Su};function Ou(e,t){return`${e}/${t}`}function Au({creators:e}={}){let t=e?.asyncThunk?.[zs];return function(n){let{name:i,reducerPath:s=i}=n;if(!i)throw new Error(He(11));typeof process<"u";let c=(typeof n.reducers=="function"?n.reducers(_u()):n.reducers)||{},d=Object.keys(c),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(E,A){let D=typeof E=="string"?E:E.type;if(!D)throw new Error(He(12));if(D in u.sliceCaseReducersByType)throw new Error(He(13));return u.sliceCaseReducersByType[D]=A,p},addMatcher(E,A){return u.sliceMatchers.push({matcher:E,reducer:A}),p},exposeAction(E,A){return u.actionCreators[E]=A,p},exposeCaseReducer(E,A){return u.sliceCaseReducersByName[E]=A,p}};d.forEach(E=>{let A=c[E],D={reducerName:E,type:Ou(i,E),createNotation:typeof n.reducers=="function"};Tu(A)?ku(D,A,p,t):Ru(D,A,p)});function f(){let[E={},A=[],D=void 0]=typeof n.extraReducers=="function"?Hs(n.extraReducers):[n.extraReducers],k={...E,...u.sliceCaseReducersByType};return hu(n.initialState,V=>{for(let ee in k)V.addCase(ee,k[ee]);for(let ee of u.sliceMatchers)V.addMatcher(ee.matcher,ee.reducer);for(let ee of A)V.addMatcher(ee.matcher,ee.reducer);D&&V.addDefaultCase(D)})}let h=E=>E,m=new Map,x=new WeakMap,C;function w(E,A){return C||(C=f()),C(E,A)}function S(){return C||(C=f()),C.getInitialState()}function R(E,A=!1){function D(V){let ee=V[E];return typeof ee>"u"&&A&&(ee=_o(x,D,S)),ee}function k(V=h){return _o(_o(m,A,()=>new WeakMap),V,()=>{let ee={};for(let[$r,xe]of Object.entries(n.selectors??{}))ee[$r]=wu(xe,V,()=>_o(x,V,S),A);return ee})}return{reducerPath:E,getSelectors:k,get selectors(){return k(D)},selectSlice:D}}let I={name:i,reducer:w,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...R(s),injectInto(E,{reducerPath:A,...D}={}){let k=A??s;return E.inject({reducerPath:k,reducer:w},D),{...I,...R(k,!0)}}};return I}}function wu(e,t,o,n){function i(s,...c){let d=t(s);return typeof d>"u"&&n&&(d=o()),e(d,...c)}return i.unwrapped=e,i}var Gs=Au();function _u(){function e(t,o){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...o}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...o){return t(...o)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,o){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:o}},asyncThunk:e}}function Ru({type:e,reducerName:t,createNotation:o},n,i){let s,c;if("reducer"in n){if(o&&!Lu(n))throw new Error(He(17));s=n.reducer,c=n.prepare}else s=n;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,c?it(e,c):it(e))}function Tu(e){return e._reducerDefinitionType==="asyncThunk"}function Lu(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ku({type:e,reducerName:t},o,n,i){if(!i)throw new Error(He(18));let{payloadCreator:s,fulfilled:c,pending:d,rejected:u,settled:p,options:f}=o,h=i(e,s,f);n.exposeAction(t,h),c&&n.addCase(h.fulfilled,c),d&&n.addCase(h.pending,d),u&&n.addCase(h.rejected,u),p&&n.addMatcher(h.settled,p),n.exposeCaseReducer(t,{fulfilled:c||Ro,pending:d||Ro,rejected:u||Ro,settled:p||Ro})}function Ro(){}var Ws="listener",Vs="completed",Ks="cancelled",Lb=`task-${Ks}`,kb=`task-${Vs}`,Ib=`${Ws}-${Ks}`,Nb=`${Ws}-${Vs}`;var{assign:js}=Object;var Yn="listenerMiddleware";var Iu=js(it(`${Yn}/add`),{withTypes:()=>Iu}),Pb=it(`${Yn}/removeAll`),Nu=js(it(`${Yn}/remove`),{withTypes:()=>Nu});function He(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Pu=ro(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),To=class extends Pu(Object){};window.ftReduxStores||(window.ftReduxStores={});var Zs=class e extends To{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(so(s))return s;if(i==null)return;let c=Gs({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=$s({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let f=Sr(c.getInitialState());for(let h of p.keeping)f[h]=(u??f)[h];return f}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return c.reducer(u,p)}});return window.ftReduxStores[i.name]=new e(c,d,i.eventBus,i.deprecatedKeys)}constructor(t,o,n,i){super(),this.reduxSlice=t,this.reduxStore=o,this.deprecatedKeys=i,this.isFtReduxStore=!0,this.commands=new oo,this.injectInto=(c,d)=>this.reduxSlice.injectInto(c,d),this.selectSlice=c=>this.reduxSlice.selectSlice(c);let s=c=>c!=null?JSON.parse(JSON.stringify(c)):c;this.actions=new Proxy(this.reduxSlice.actions,{get:(c,d,u)=>{let p=d,f=c[p];return f?(...h)=>{let m=f(...h.map(s));return this.reduxStore.dispatch(m),m}:h=>{let m=p,x=this.getState()[m];Wt(x,h)||this.setState({[m]:s(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Lo=class{static format(t,o,n,i,s){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,o,n,i,!!s)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,i,s){let c=typeof t=="string"?new Date(t):t,d=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(c),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(c);return s?u:i?`${d} ${u}`:d}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var ko=y(O()),Du="ft-app-info",Rt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Rt.eventName="authentication-change";var kr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};kr.eventName="ui-locale-changed";var Mu={session:(e,t)=>{(0,ko.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>T.dispatchEvent(new Rt(t.payload)),0))}},T=ko.FtReduxStore.get({name:Du,reducers:Mu,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 qs=y(O()),Io=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},dx=(0,qs.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(T)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(d=>d.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?d=>Lo.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Io([(0,Xn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Io([(0,Xn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Io([kn({store:T.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Io([kn({store:T.name})],t.prototype,"uiLocale",void 0),t});var Ys;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Ys||(Ys={}));var Xs;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Xs||(Xs={}));var Js;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Js||(Js={}));var Qs;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Qs||(Qs={}));var ec;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(ec||(ec={}));var tc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(tc||(tc={}));var rc;(function(e){e.PUBLISHED="PUBLISHED",e.AI="AI"})(rc||(rc={}));var oc;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(oc||(oc={}));var nc;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(nc||(nc={}));var ic;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(ic||(ic={}));var ac;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER",e.DOC_DIFF="DOC_DIFF"})(ac||(ac={}));var sc;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(sc||(sc={}));var cc;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(cc||(cc={}));var lc;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(lc||(lc={}));var dc;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(dc||(dc={}));var uc;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(uc||(uc={}));var pc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(pc||(pc={}));var fc;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(fc||(fc={}));var hc;(function(e){e.ASC="ASC",e.DESC="DESC"})(hc||(hc={}));var mc;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(mc||(mc={}));var yc;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(yc||(yc={}));var gc;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(gc||(gc={}));var bc;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(bc||(bc={}));var xc;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(xc||(xc={}));var vc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(vc||(vc={}));var Sc;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Sc||(Sc={}));var Cc;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Cc||(Cc={}));var Ec;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ec||(Ec={}));var G;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(G||(G={}));var Se;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Se||(Se={}));var Oc;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Oc||(Oc={}));var Ac;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Ac||(Ac={}));var wc;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(wc||(wc={}));var _c;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(_c||(_c={}));var Rc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Rc||(Rc={}));var Tc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Tc||(Tc={}));var Lc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Lc||(Lc={}));var kc;(function(e){e.CHAT="CHAT",e.COMPLETION="COMPLETION",e.RAG="RAG",e.AGENT="AGENT"})(kc||(kc={}));var Ic;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Ic||(Ic={}));var Nc;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Nc||(Nc={}));var Pc;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Pc||(Pc={}));var Dc;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Dc||(Dc={}));var Mc;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Mc||(Mc={}));var Uu={[G.PERSONAL_BOOK_SHARE_USER]:[G.PERSONAL_BOOK_USER],[G.HTML_EXPORT_USER]:[G.PERSONAL_BOOK_USER],[G.PDF_EXPORT_USER]:[G.PERSONAL_BOOK_USER],[G.KHUB_ADMIN]:[G.CONTENT_PUBLISHER],[G.ADMIN]:[G.KHUB_ADMIN,G.USERS_ADMIN,G.PORTAL_ADMIN,G.BEHAVIOR_DATA_USER],[G.GENERATIVE_AI_EXPORT_USER]:[G.GENERATIVE_AI_USER]};function Uc(e,t){return e===t||(Uu[e]??[]).some(o=>Uc(o,t))}function Jn(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>Uc(n,t))}function Bc(e,...t){return e==null?!1:t.some(o=>Jn(e,o))}var Uo=y(O());var Qn=y(O());var Tt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=T.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let i=T.subscribe(()=>{n=e.get(t),n&&(i(),o(n))})}})}};var qt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Tt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Tt.await()}};var ye=class extends qt{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(s,c)=>typeof c!="object"||c==null||Array.isArray(c)?c:Object.fromEntries(Object.entries(c).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Qn.CacheRegistry,this.cache=t?i.commonCache:new Qn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var No=class extends ye{async listMySearches(){let{session:t}=T.getState();return Jn(t,G.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Po=class extends ye{async listMyBookmarks(){let t=T.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Do=class extends ye{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=T.getState().session;return!!t?.sessionAuthenticated}};var Mo=class extends ye{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=T.getState().session;return!!t?.sessionAuthenticated}};var Bu="ft-user-assets",Fu={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(Se).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:i}=t.payload;ti(e,o,[...ei(e,o),i]),Fc(e,o,1,n),$c(e,i)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;ti(e,o,ei(e,o).map(i=>i.id===n.id?n:i)),$c(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:i}=t.payload;ti(e,o,ei(e,o).filter(s=>s.id!==i)),Fc(e,o,-1,n)}},Hc={[Se.SEARCHES]:"savedSearches",[Se.BOOKMARKS]:"bookmarks",[Se.BOOKS]:void 0,[Se.COLLECTIONS]:void 0},ei=(e,t)=>{var o;let n=Hc[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},ti=(e,t,o)=>{let n=Hc[t];n&&(e[n]=o)},Fc=(e,t,o,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+o),t===Se.BOOKMARKS&&n)){let s=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,s+o)}},$c=(e,t)=>{let o=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},ie=Uo.FtReduxStore.get({name:Bu,reducers:Fu,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Se).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ri=class{constructor(t=new Do,o=new Mo){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Po,this.savedSearchesService=new No,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=T.getState();(0,Uo.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ie.actions.clearAssetCount(),ie.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ie.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ie.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ie.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ie.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&ie.getState().assetCounts.allAsset[t]!==o.count&&ie.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&ie.getState().assetCounts.bookmarkByMap[t]!==o.count&&ie.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(ie.getState().assetCounts.bookmarkByMap).length!==0;t===Se.BOOKMARKS&&o&&ie.actions.clearBookmarkCountByMap(),ie.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ie.actions.bookmarks(o)}}},$u=new ri;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=$u);var oi=class{addCommand(t,o=!1){T.commands.add(t,o)}consumeCommand(t){return T.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new oi;var Ce=y(O());var zc,Yt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Hu=Symbol("clearAfterUnitTest"),Bo=class extends(0,Ce.withEventBus)(ye){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[zc]=()=>{this.defaultMessages={},this.cache=new Ce.CacheRegistry,this.listeners={}},this.currentUiLocale=T.getState().uiLocale,T.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=T.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Ce.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let s=t.toLowerCase(),c=this.resolveContext(s);return new Ce.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},c).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof Ce.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Yt({loadedContexts:t})),this.dispatchEvent(new Yt({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new Yt({loadedContexts:[t]})),this.dispatchEvent(new Yt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ce.delay)(0).then(()=>n()).catch(()=>null)))}};zc=Hu;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Bo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Bo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Xt=window.FluidTopicsI18nService,Fo=window.FluidTopicsCustomI18nService;var Gc=y(O()),ni=class{highlightHtml(t,o,n){(0,Gc.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new ni;var Wc=y(O());var ii=class{isDate(t){var o,n,i,s;return(s=(n=((i=(o=T.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]).find(d=>d.key===t))===null||n===void 0?void 0:n.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s,c;if(t==null)return"";try{return Wc.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:T.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1,(c=o?.onlyTime)!==null&&c!==void 0?c:!1)}catch(d){throw console.error(`Date ${JSON.stringify(t)} is not valid`,d),d}}};window.FluidTopicsDateService=new ii;var Vc=y(O());var Ir=class{static get(t,o,{baseUrl:n,localesConfiguration:i,availableContentLocales:s}=T.getState()){var c;if(!o||s.length>0&&!s.some(d=>d.lang===o)){let d=i?.defaultLocales.defaultContentLocale;o=d?`${d.lang}-${d.region}`:(c=s[0])===null||c===void 0?void 0:c.lang}return new Vc.SearchPlaceConverter(n,t??20,i?.allLanguagesAllowed,o,s)}};var ai=class{urlToSearchRequest(t){return Ir.get().parse(t)}searchRequestToUrl(t){return Ir.get().serialize(t)}};window.FluidTopicsUrlService=new ai;var Ye=y(O());var Lt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Lt.eventName="before-location-change";var kt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};kt.eventName="change";var si=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},Kc=new si;var $o=class e extends Ye.WithEventBus{static build(){return new e(window.history,Kc,()=>window.location,!1)}constructor(t,o,n,i){var s,c;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(c=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&c!==void 0?c:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ye.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new kt(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[s,c,d])=>{let u=new URL(typeof d=="string"?d:(d??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),p=new Lt(u);this.dispatchEvent(p);let f=o(),h={...f===this.currentIndex?this.currentState:void 0,...s,index:f,href:p.detail.nextLocation.href};n.apply(i,[h,c,h.href]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(Lt.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Lt.eventName,t)}addHistoryChangeListener(t){this.addEventListener(kt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(kt.eventName,t)}currentItem(){return(0,Ye.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Ye.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ye.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Ye.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=$o.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var jc=y(N());var Zc=jc.css`
371
+ `;var Ta=["top","right","bottom","left"],Ra=["start","end"],En=Ta.reduce((e,t)=>e.concat(t,t+"-"+Ra[0],t+"-"+Ra[1]),[]),hr=Math.min,tt=Math.max,mr=Math.round;var Be=e=>({x:e,y:e}),yd={left:"right",right:"left",bottom:"top",top:"bottom"};function La(e,t,o){return tt(e,hr(t,o))}function jr(e,t){return typeof e=="function"?e(t):e}function yr(e){return e.split("-")[0]}function rt(e){return e.split("-")[1]}function On(e){return e==="x"?"y":"x"}function An(e){return e==="y"?"height":"width"}function Zr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function wn(e){return On(Zr(e))}function ka(e,t,o){o===void 0&&(o=!1);let n=rt(e),i=wn(e),s=An(i),c=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=Cn(c)),[c,Cn(c)]}function Ia(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Cn(e){let t=yr(e);return yd[t]+e.slice(t.length)}function gd(e){var t,o,n,i;return{top:(t=e.top)!=null?t:0,right:(o=e.right)!=null?o:0,bottom:(n=e.bottom)!=null?n:0,left:(i=e.left)!=null?i:0}}function Na(e){return typeof e!="number"?gd(e):{top:e,right:e,bottom:e,left:e}}function Ct(e){let{x:t,y:o,width:n,height:i}=e;return{width:n,height:i,top:o,left:t,right:t+n,bottom:o+i,x:t,y:o}}function Pa(e,t,o){let{reference:n,floating:i}=e,s=Zr(t),c=wn(t),d=An(c),u=yr(t),p=s==="y",f=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,m=n[d]/2-i[d]/2,x;switch(u){case"top":x={x:f,y:n.y-i.height};break;case"bottom":x={x:f,y:n.y+n.height};break;case"right":x={x:n.x+n.width,y:h};break;case"left":x={x:n.x-i.width,y:h};break;default:x={x:n.x,y:n.y}}let C=rt(t);return C&&(x[c]+=m*(C==="end"?1:-1)*(o&&p?-1:1)),x}async function Da(e,t){var o;t===void 0&&(t={});let{x:n,y:i,platform:s,rects:c,elements:d,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:m=!1,padding:x=0}=jr(t,e),C=Na(x),S=d[m?h==="floating"?"reference":"floating":h],R=Ct(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(S)))==null||o?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(d.floating)),boundary:p,rootBoundary:f,strategy:u})),I=h==="floating"?{x:n,y:i,width:c.floating.width,height:c.floating.height}:c.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d.floating)),A=await(s.isElement==null?void 0:s.isElement(E))&&await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1},D=Ct(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:I,offsetParent:E,strategy:u}):I);return{top:(R.top-D.top+C.top)/A.y,bottom:(D.bottom-R.bottom+C.bottom)/A.y,left:(R.left-D.left+C.left)/A.x,right:(D.right-R.right+C.right)/A.x}}var bd=50,Ma=async(e,t,o)=>{let{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:c}=o,d=c.detectOverflow?c:{...c,detectOverflow:Da},u=await(c.isRTL==null?void 0:c.isRTL(t)),p=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=Pa(p,n,u),m=n,x=0,C={};for(let w=0;w<s.length;w++){let S=s[w];if(!S)continue;let{name:R,fn:I}=S,{x:E,y:A,data:D,reset:k}=await I({x:f,y:h,initialPlacement:n,placement:m,strategy:i,middlewareData:C,rects:p,platform:d,elements:{reference:e,floating:t}});f=E??f,h=A??h,C[R]={...C[R],...D},k&&x<bd&&(x++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(p=k.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:f,y:h}=Pa(p,m,u)),w=-1)}return{x:f,y:h,placement:m,strategy:i,middlewareData:C}};function xd(e,t,o){return(e?[...o.filter(i=>rt(i)===e),...o.filter(i=>rt(i)!==e)]:o.filter(i=>yr(i)===i)).filter(i=>e?rt(i)===e||(t?Ia(i)!==i:!1):!0)}var Ua=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,i;let{rects:s,middlewareData:c,placement:d,platform:u,elements:p}=t,{crossAxis:f=!1,alignment:h,allowedPlacements:m=En,autoAlignment:x=!0,...C}=jr(e,t),w=h!==void 0||m===En?xd(h||null,x,m):m,S=((o=c.autoPlacement)==null?void 0:o.index)||0,R=w[S];if(R==null)return{};if(d!==R)return{reset:{placement:w[0]}};let I=await u.detectOverflow(t,C),E=ka(R,s,await(u.isRTL==null?void 0:u.isRTL(p.floating))),A=[I[yr(R)],I[E[0]],I[E[1]]],D=[...((n=c.autoPlacement)==null?void 0:n.overflows)||[],{placement:R,overflows:A}],k=w[S+1];if(k)return{data:{index:S+1,overflows:D},reset:{placement:k}};let V=D.map(xe=>{let sr=rt(xe.placement);return[xe.placement,sr&&f?xe.overflows.slice(0,2).reduce((ed,td)=>ed+td,0):xe.overflows[0],xe.overflows]}).sort((xe,sr)=>xe[1]-sr[1]),$r=((i=V.filter(xe=>xe[2].slice(0,rt(xe[0])?2:3).every(sr=>sr<=0))[0])==null?void 0:i[0])||V[0][0];return $r!==d?{data:{index:S+1,overflows:D},reset:{placement:$r}}:{}}}};var Ba=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:i,platform:s}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:u={fn:I=>{let{x:E,y:A}=I;return{x:E,y:A}}},...p}=jr(e,t),f={x:o,y:n},h=await s.detectOverflow(t,p),m=Zr(i),x=On(m),C=f[x],w=f[m],S=(I,E)=>La(E+h[I==="y"?"top":"left"],E,E-h[I==="y"?"bottom":"right"]);c&&(C=S(x,C)),d&&(w=S(m,w));let R=u.fn({...t,[x]:C,[m]:w});return{...R,data:{x:R.x-o,y:R.y-n,enabled:{[x]:c,[m]:d}}}}}};function Yr(){return typeof window<"u"}function Ot(e){return $a(e)?(e.nodeName||"").toLowerCase():"#document"}function ue(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function je(e){var t;return(t=($a(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $a(e){return Yr()?e instanceof Node||e instanceof ue(e).Node:!1}function Re(e){return Yr()?e instanceof Element||e instanceof ue(e).Element:!1}function Ze(e){return Yr()?e instanceof HTMLElement||e instanceof ue(e).HTMLElement:!1}function Fa(e){return!Yr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ue(e).ShadowRoot}function gr(e){let{overflow:t,overflowX:o,overflowY:n,display:i}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&i!=="inline"&&i!=="contents"}function Ha(e){return/^(table|td|th)$/.test(Ot(e))}function br(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var vd=/transform|translate|scale|rotate|perspective|filter/,Sd=/paint|layout|strict|content/,Et=e=>!!e&&e!=="none",_n;function Ht(e){let t=Re(e)?Te(e):e;return Et(t.transform)||Et(t.translate)||Et(t.scale)||Et(t.rotate)||Et(t.perspective)||!Xr()&&(Et(t.backdropFilter)||Et(t.filter))||vd.test(t.willChange||"")||Sd.test(t.contain||"")}function za(e){let t=ot(e);for(;Ze(t)&&!zt(t);){if(Ht(t))return t;if(br(t))return null;t=ot(t)}return null}function Xr(){return _n==null&&(_n=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_n}function zt(e){return/^(html|body|#document)$/.test(Ot(e))}function Te(e){return ue(e).getComputedStyle(e)}function xr(e){return Re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ot(e){if(Ot(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Fa(e)&&e.host||je(e);return Fa(t)?t.host:t}function Ga(e){let t=ot(e);return zt(t)?(e.ownerDocument||e).body:Ze(t)&&gr(t)?t:Ga(t)}function qr(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let i=Ga(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),c=ue(i);if(s){let d=Jr(c);return t.concat(c,c.visualViewport||[],gr(i)?i:[],d&&o?qr(d):[])}else return t.concat(i,qr(i,[],o))}function Jr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ka(e){let t=Te(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=Ze(e),s=i?e.offsetWidth:o,c=i?e.offsetHeight:n,d=mr(o)!==s||mr(n)!==c;return d&&(o=s,n=c),{width:o,height:n,$:d}}function ja(e){return Re(e)?e:e.contextElement}function Gt(e){let t=ja(e);if(!Ze(t))return Be(1);let o=t.getBoundingClientRect(),{width:n,height:i,$:s}=Ka(t),c=(s?mr(o.width):o.width)/n,d=(s?mr(o.height):o.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}var Cd=Be(0);function Za(e){let t=ue(e);return!Xr()||!t.visualViewport?Cd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ed(e,t,o){return t===void 0&&(t=!1),!!o&&t&&o===ue(e)}function vr(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let i=e.getBoundingClientRect(),s=ja(e),c=Be(1);t&&(n?Re(n)&&(c=Gt(n)):c=Gt(e));let d=Ed(s,o,n)?Za(s):Be(0),u=(i.left+d.x)/c.x,p=(i.top+d.y)/c.y,f=i.width/c.x,h=i.height/c.y;if(s&&n){let m=ue(s),x=Re(n)?ue(n):n,C=m,w=Jr(C);for(;w&&x!==C;){let S=Gt(w),R=w.getBoundingClientRect(),I=Te(w),E=R.left+(w.clientLeft+parseFloat(I.paddingLeft))*S.x,A=R.top+(w.clientTop+parseFloat(I.paddingTop))*S.y;u*=S.x,p*=S.y,f*=S.x,h*=S.y,u+=E,p+=A,C=ue(w),w=Jr(C)}}return Ct({width:f,height:h,x:u,y:p})}function Qr(e,t){let o=xr(e).scrollLeft;return t?t.left+o:vr(je(e)).left+o}function qa(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-Qr(e,o),i=o.top+t.scrollTop;return{x:n,y:i}}function Od(e){let{elements:t,rect:o,offsetParent:n,strategy:i}=e,s=i==="fixed",c=je(n),d=t?br(t.floating):!1;if(n===c||d&&s)return o;let u={scrollLeft:0,scrollTop:0},p=Be(1),f=Be(0),h=Ze(n);if((h||!s)&&((Ot(n)!=="body"||gr(c))&&(u=xr(n)),h)){let x=vr(n);p=Gt(n),f.x=x.x+n.clientLeft,f.y=x.y+n.clientTop}let m=c&&!h&&!s?qa(c,u):Be(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-u.scrollLeft*p.x+f.x+m.x,y:o.y*p.y-u.scrollTop*p.y+f.y+m.y}}function Ad(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function wd(e){let t=xr(e),o=e.ownerDocument.body,n=tt(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=tt(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-t.scrollLeft+Qr(e),c=-t.scrollTop;return Te(o).direction==="rtl"&&(s+=tt(e.clientWidth,o.clientWidth)-n),{width:n,height:i,x:s,y:c}}var _d=25;function Rd(e,t,o){o===void 0&&(o="viewport");let n=o==="layoutViewport",i=ue(e),s=je(e),c=i.visualViewport,d=s.clientWidth,u=s.clientHeight,p=0,f=0;if(c){let m=!Xr()||t==="fixed";n?m||(p=-c.offsetLeft,f=-c.offsetTop):(d=c.width,u=c.height,m&&(p=c.offsetLeft,f=c.offsetTop))}if(Qr(s)<=0){let m=s.ownerDocument,x=m.body,C=getComputedStyle(x),w=m.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,S=Math.abs(s.clientWidth-x.clientWidth-w),R=getComputedStyle(s).scrollbarGutter==="stable both-edges"?S/2:S;R<=_d&&(d-=R)}return{width:d,height:u,x:p,y:f}}function Td(e,t){let o=vr(e,!0,t==="fixed"),n=o.top+e.clientTop,i=o.left+e.clientLeft,s=Gt(e),c=e.clientWidth*s.x,d=e.clientHeight*s.y,u=i*s.x,p=n*s.y;return{width:c,height:d,x:u,y:p}}function Wa(e,t,o){let n;if(t==="viewport"||t==="layoutViewport")n=Rd(e,o,t);else if(t==="document")n=wd(je(e));else if(Re(t))n=Td(t,o);else{let i=Za(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ct(n)}function Ld(e,t){let o=t.get(e);if(o)return o;let n=qr(e,[],!1).filter(d=>Re(d)&&Ot(d)!=="body"),i=null,s=Te(e).position==="fixed",c=s?ot(e):e;for(;Re(c)&&!zt(c);){let d=Te(c),u=Ht(c),p=i?i.position:s?"fixed":"";!u&&(p==="fixed"||p==="absolute"&&d.position==="static")?n=n.filter(h=>h!==c):i=d,c=ot(c)}return t.set(e,n),n}function kd(e){let{element:t,boundary:o,rootBoundary:n,strategy:i}=e,c=[...o==="clippingAncestors"?br(t)?[]:Ld(t,this._c):[].concat(o),n],d=Wa(t,c[0],i),u=d.top,p=d.right,f=d.bottom,h=d.left;for(let m=1;m<c.length;m++){let x=Wa(t,c[m],i);u=tt(x.top,u),p=hr(x.right,p),f=hr(x.bottom,f),h=tt(x.left,h)}return{width:p-h,height:f-u,x:h,y:u}}function Id(e){let{width:t,height:o}=Ka(e);return{width:t,height:o}}function Nd(e,t,o){let n=Ze(t),i=je(t),s=o==="fixed",c=vr(e,!0,s,t),d={scrollLeft:0,scrollTop:0},u=Be(0);if((n||!s)&&((Ot(t)!=="body"||gr(i))&&(d=xr(t)),n)){let m=vr(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}!n&&i&&(u.x=Qr(i));let p=i&&!n&&!s?qa(i,d):Be(0),f=c.left+d.scrollLeft-u.x-p.x,h=c.top+d.scrollTop-u.y-p.y;return{x:f,y:h,width:c.width,height:c.height}}function Rn(e){return Te(e).position==="static"}function Va(e,t){if(!Ze(e)||Te(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return je(e)===o&&(o=o.ownerDocument.body),o}function Ya(e,t){let o=ue(e);if(br(e))return o;if(!Ze(e)){let i=ot(e);for(;i&&!zt(i);){if(Re(i)&&!Rn(i))return i;i=ot(i)}return o}let n=Va(e,t);for(;n&&Ha(n)&&Rn(n);)n=Va(n,t);return n&&zt(n)&&Rn(n)&&!Ht(n)?o:n||za(e)||o}var Pd=async function(e){let t=this.getOffsetParent||Ya,o=this.getDimensions,n=await o(e.floating);return{reference:Nd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Dd(e){return Te(e).direction==="rtl"}var eo={convertOffsetParentRelativeRectToViewportRelativeRect:Od,getDocumentElement:je,getClippingRect:kd,getOffsetParent:Ya,getElementRects:Pd,getClientRects:Ad,getDimensions:Id,getScale:Gt,isElement:Re,isRTL:Dd};var Xa=Ua,Ja=Ba;var Qa=(e,t,o)=>{let n=new Map,i=o??{},s={...eo,...i.platform,_c:n};return Ma(e,t,{...i,platform:s})};function es(e){return Md(e)}function Tn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Md(e){for(let t=e;t;t=Tn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Tn(e);t;t=Tn(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||Ht(o)||t.tagName==="BODY"))return t}return null}async function to(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},Qa(e,t,{strategy:n.strategy,platform:{...eo,getOffsetParent:i=>eo.getOffsetParent(i,es)},middleware:[Ja({crossAxis:!0}),Xa({allowedPlacements:[n.placement]})]})}var Qt=y(O());var Xn=y(q());var ts=y(q(),1);var Ln=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},Ud=e=>({fromAttribute:t=>{if(t==null)return Sr(e);try{return JSON.parse(t)}catch{return Sr(e)}},toAttribute:t=>JSON.stringify(t)});function rs(e,t){return(0,ts.property)({type:Object,converter:Ud(e),hasChanged:Cr,...t??{}})}function Bd(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Wt(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Wt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=c=>Object.keys(c).filter(d=>c[d]!=null),s=i(e);if(o=s.length,o!==i(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=o;n--!==0;){let c=s[n];if(!Wt(e[c],t[c]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Wt(e,t){try{return Bd(e,t)}catch{return!1}}function Cr(e,t){return!Wt(e,t)}function Sr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function ro(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let i=t(n);return i[e]=!0,i}}var os=y(q(),1);var kn=e=>{let t=e??{};return(o,n)=>{var i;let s={hasChanged:Cr,attribute:!1,...t};(0,os.property)(s)(o,n);let c=o.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(d=>d[n]),store:t.store})}};var oo=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var At=y(q(),1);var no=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let c of n)try{await c()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ao=y(N(),1);var io=class extends ao.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return(0,ao.adoptStyles)(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){Ln(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function ns(e,t,...o){var n;let i=e.querySelector(t);for(let s of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var Kt=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},cs,is=Symbol("constructorPrototype"),as=Symbol("constructorName"),ls=Symbol("exportpartsDebouncer"),ss=Symbol("dynamicDependenciesLoaded"),Vt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Vt.eventName="exportparts-updated";var Fe=class extends io{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[cs]=new no(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[ls].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[as]=this.constructor.name,this[is]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[as]&&Object.setPrototypeOf(this,this[is])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[ss]||(o[ss]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Vt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Vt.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Vt)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];o=ns(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var o,n,i,s,c,d;let u=m=>m!=null&&m.trim().length>0,p=t.filter(u).map(m=>m.trim());if(p.length===0){this.exportparts=void 0;return}let f=new Set;for(let m of(s=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&s!==void 0?s:[]){let x=(c=(n=m.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&c!==void 0?c:[],C=(d=(i=m.getAttribute("exportparts"))===null||i===void 0?void 0:i.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[],w=[...x,...C].filter(u).map(S=>S.trim());for(let S of w)f.add(S)}if(f.size===0){this.exportparts=void 0;return}let h=[...f.values()].flatMap(m=>p.map(x=>`${m}:${x}--${m}`));this.exportparts=[...this.part,...h].join(", ")}};cs=ls;Kt([(0,At.property)()],Fe.prototype,"exportpartsPrefix",void 0);Kt([rs([])],Fe.prototype,"exportpartsPrefixes",void 0);Kt([(0,At.property)({reflect:!0})],Fe.prototype,"exportparts",void 0);Kt([(0,At.property)()],Fe.prototype,"customStylesheet",void 0);Kt([(0,At.property)()],Fe.prototype,"elementToFocus",void 0);Kt([(0,At.state)()],Fe.prototype,"useAdoptedStyleSheets",void 0);function so(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Er=Symbol("internalReduxEventsUnsubscribers"),nt=Symbol("internalStoresUnsubscribers"),wt=Symbol("internalStores"),Fd=ro(Symbol("withRedux"),function(e){var t,o,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(c){super.willUpdate(c),[...this.reduxConstructor.reduxReactiveProperties].some(d=>c.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[wt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[wt].values()][0]}getStore(c){return c==null?this.getUnnamedStore():this[wt].get(c)}addStore(c,d){var u;d=(u=d??c.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[wt].set(d,c),this.subscribeToStore(d,c),this.updateFromStores()}removeStore(c){let d=typeof c=="string"?c:c.name;this.unsubscribeFromStore(d),this[wt].delete(d)}setupStores(){this.unsubscribeFromStores(),this[wt].forEach((c,d)=>this.subscribeToStore(d,c)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((c,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(c.store);p&&(c.store?this[nt].has(c.store):this[nt].size>0)&&(this[d]=c.selector(p.getState(),this))}})}subscribeToStore(c,d){var u,p;this[nt].set(c,d.subscribe(()=>this.updateFromStores())),this[Er].set(c,[]),so(d)&&(!((u=d.deprecatedKeys)===null||u===void 0)&&u.length&&this.reduxConstructor.reduxProperties.forEach((f,h)=>{this.getStore(f.store)===d&&d.deprecatedKeys.includes(h)&&console.warn("Element",this,"is subscribed to deprecated key",h,"in store",d.name)}),d.eventBus&&((p=this.reduxConstructor.reduxEventListeners)===null||p===void 0||p.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||d.name===f.store)){let m=x=>this[h](x);d.addEventListener(f.eventName,m),this[Er].get(c).push(()=>d.removeEventListener(f.eventName,m))}}))),this.onStoreAvailable(c)}unsubscribeFromStores(){this[nt].forEach((c,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(c){var d;this[nt].has(c)&&this[nt].get(c)(),this[nt].delete(c),(d=this[Er].get(c))===null||d===void 0||d.forEach(u=>u()),this[Er].delete(c)}onStoreAvailable(c){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=nt,o=wt,n=Er,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),ds=class extends Fd(Fe){};function Q(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $d=typeof Symbol=="function"&&Symbol.observable||"@@observable",us=$d,In=()=>Math.random().toString(36).substring(7).split("").join("."),Hd={INIT:`@@redux/INIT${In()}`,REPLACE:`@@redux/REPLACE${In()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${In()}`},co=Hd;function lo(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Nn(e,t,o){if(typeof e!="function")throw new Error(Q(2));if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Q(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Q(1));return o(Nn)(e,t)}let n=e,i=t,s=new Map,c=s,d=0,u=!1;function p(){c===s&&(c=new Map,s.forEach((S,R)=>{c.set(R,S)}))}function f(){if(u)throw new Error(Q(3));return i}function h(S){if(typeof S!="function")throw new Error(Q(4));if(u)throw new Error(Q(5));let R=!0;p();let I=d++;return c.set(I,S),function(){if(R){if(u)throw new Error(Q(6));R=!1,p(),c.delete(I),s=null}}}function m(S){if(!lo(S))throw new Error(Q(7));if(typeof S.type>"u")throw new Error(Q(8));if(typeof S.type!="string")throw new Error(Q(17));if(u)throw new Error(Q(9));try{u=!0,i=n(i,S)}finally{u=!1}return(s=c).forEach(I=>{I()}),S}function x(S){if(typeof S!="function")throw new Error(Q(10));n=S,m({type:co.REPLACE})}function C(){let S=h;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(Q(11));function I(){let A=R;A.next&&A.next(f())}return I(),{unsubscribe:S(I)}},[us](){return this}}}return m({type:co.INIT}),{dispatch:m,subscribe:h,getState:f,replaceReducer:x,[us]:C}}function zd(e){Object.keys(e).forEach(t=>{let o=e[t];if(typeof o(void 0,{type:co.INIT})>"u")throw new Error(Q(12));if(typeof o(void 0,{type:co.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Q(13))})}function Pn(e){let t=Object.keys(e),o={};for(let c=0;c<t.length;c++){let d=t[c];typeof e[d]=="function"&&(o[d]=e[d])}let n=Object.keys(o),i,s;try{zd(o)}catch(c){s=c}return function(d={},u){if(s)throw s;let p=!1,f={};for(let h=0;h<n.length;h++){let m=n[h],x=o[m],C=d[m],w=x(C,u);if(typeof w>"u"){let S=u&&u.type;throw new Error(Q(14))}f[m]=w,p=p||w!==C}return p=p||n.length!==Object.keys(d).length,p?f:d}}function Or(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,o)=>(...n)=>t(o(...n)))}function ps(...e){return t=>(o,n)=>{let i=t(o,n),s=()=>{throw new Error(Q(15))},c={getState:i.getState,dispatch:(u,...p)=>s(u,...p)},d=e.map(u=>u(c));return s=Or(...d)(i.dispatch),{...i,dispatch:s}}}function fs(e){return lo(e)&&"type"in e&&typeof e.type=="string"}var Cs=Symbol.for("immer-nothing"),hs=Symbol.for("immer-draftable"),re=Symbol.for("immer-state");function Le(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var he=Object,Zt=he.getPrototypeOf,ho="constructor",vo="prototype",Bn="configurable",mo="enumerable",po="writable",Ar="value",$e=e=>!!e&&!!e[re];function me(e){return e?Es(e)||Co(e)||!!e[hs]||!!e[ho]?.[hs]||Eo(e)||Tr(e):!1}var Gd=he[vo][ho].toString(),ms=new WeakMap;function Es(e){if(!e||!Kn(e))return!1;let t=Zt(e);if(t===null||t===he[vo])return!0;let o=he.hasOwnProperty.call(t,ho)&&t[ho];if(o===Object)return!0;if(!jt(o))return!1;let n=ms.get(o);return n===void 0&&(n=Function.toString.call(o),ms.set(o,n)),n===Gd}function So(e,t,o=!0){Rr(e)===0?(o?Reflect.ownKeys(e):he.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Rr(e){let t=e[re];return t?t.type_:Co(e)?1:Eo(e)?2:Tr(e)?3:0}var Dn=(e,t,o=Rr(e))=>o===2?e.has(t):he[vo].hasOwnProperty.call(e,t),Fn=(e,t,o=Rr(e))=>o===2?e.get(t):e[t],yo=(e,t,o,n=Rr(e))=>{n===2?e.set(t,o):n===3?e.add(o):e[t]=o};function Wd(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Co=Array.isArray,Eo=e=>e instanceof Map,Tr=e=>e instanceof Set,Kn=e=>typeof e=="object",jt=e=>typeof e=="function",Mn=e=>typeof e=="boolean";function Vd(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var qe=e=>e.copy_||e.base_;var jn=e=>e.modified_?e.copy_:e.base_;function $n(e,t){if(Eo(e))return new Map(e);if(Tr(e))return new Set(e);if(Co(e))return Array[vo].slice.call(e);let o=Es(e);if(t===!0||t==="class_only"&&!o){let n=he.getOwnPropertyDescriptors(e);delete n[re];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){let c=i[s],d=n[c];d[po]===!1&&(d[po]=!0,d[Bn]=!0),(d.get||d.set)&&(n[c]={[Bn]:!0,[po]:!0,[mo]:d[mo],[Ar]:e[c]})}return he.create(Zt(e),n)}else{let n=Zt(e);if(n!==null&&o)return{...e};let i=he.create(n);return he.assign(i,e)}}function Oo(e,t=!1){return Ao(e)||$e(e)||!me(e)||(Rr(e)>1&&he.defineProperties(e,{set:uo,add:uo,clear:uo,delete:uo}),he.freeze(e),t&&So(e,(o,n)=>{Oo(n,!0)},!1)),e}function Kd(){Le(2)}var uo={[Ar]:Kd};function Ao(e){return e===null||!Kn(e)?!0:he.isFrozen(e)}var go="MapSet",Hn="Patches",ys="ArrayMethods",Os={};function _t(e){let t=Os[e];return t||Le(0,e),t}var gs=e=>!!Os[e];var wr,As=()=>wr,jd=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:gs(go)?_t(go):void 0,arrayMethodsPlugin_:gs(ys)?_t(ys):void 0});function bs(e,t){t&&(e.patchPlugin_=_t(Hn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zn(e){Gn(e),e.drafts_.forEach(Zd),e.drafts_=null}function Gn(e){e===wr&&(wr=e.parent_)}var xs=e=>wr=jd(wr,e);function Zd(e){let t=e[re];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function vs(e,t){t.unfinalizedDrafts_=t.drafts_.length;let o=t.drafts_[0];if(e!==void 0&&e!==o){o[re].modified_&&(zn(t),Le(4)),me(e)&&(e=Ss(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(o[re].base_,e,t)}else e=Ss(t,o);return qd(t,e,!0),zn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Cs?e:void 0}function Ss(e,t){if(Ao(t))return t;let o=t[re];if(!o)return bo(t,e.handledSet_,e);if(!wo(o,e))return t;if(!o.modified_)return o.base_;if(!o.finalized_){let{callbacks_:n}=o;if(n)for(;n.length>0;)n.pop()(e);Rs(o,e)}return o.copy_}function qd(e,t,o=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Oo(t,o)}function ws(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var wo=(e,t)=>e.scope_===t,Yd=[];function _s(e,t,o,n){let i=qe(e),s=e.type_;if(n!==void 0&&Fn(i,n,s)===t){yo(i,n,o,s);return}if(!e.draftLocations_){let d=e.draftLocations_=new Map;So(i,(u,p)=>{if($e(p)){let f=d.get(p)||[];f.push(u),d.set(p,f)}})}let c=e.draftLocations_.get(t)??Yd;for(let d of c)yo(i,d,o,s)}function Xd(e,t,o){e.callbacks_.push(function(i){let s=t;if(!s||!wo(s,i))return;i.mapSetPlugin_?.fixSetContents(s);let c=jn(s);_s(e,s.draft_??s,c,o),Rs(s,i)})}function Rs(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let i=n.getPath(e);i&&n.generatePatches_(e,i,t)}ws(e)}}function Jd(e,t,o){let{scope_:n}=e;if($e(o)){let i=o[re];wo(i,n)&&i.callbacks_.push(function(){fo(e);let c=jn(i);_s(e,o,c,t)})}else me(o)&&e.callbacks_.push(function(){let s=qe(e);e.type_===3?s.has(o)&&bo(o,n.handledSet_,n):Fn(s,t,e.type_)===o&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&bo(Fn(e.copy_,t,e.type_),n.handledSet_,n)})}function bo(e,t,o){return!o.immer_.autoFreeze_&&o.unfinalizedDrafts_<1||$e(e)||t.has(e)||!me(e)||Ao(e)||(t.add(e),So(e,(n,i)=>{if($e(i)){let s=i[re];if(wo(s,o)){let c=jn(s);yo(e,n,c,e.type_),ws(s)}}else me(i)&&bo(i,t,o)})),e}function Qd(e,t){let o=Co(e),n={type_:o?1:0,scope_:t?t.scope_:As(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,s=xo;o&&(i=[n],s=_r);let{revoke:c,proxy:d}=Proxy.revocable(i,s);return n.draft_=d,n.revoke_=c,[d,n]}var xo={get(e,t){if(t===re)return e;let o=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&o?.isArrayOperationMethod(t))return o.createMethodInterceptor(e,t);let i=qe(e);if(!Dn(i,t,e.type_))return tu(e,i,t);let s=i[t];if(e.finalized_||!me(s)||n&&e.operationMethod&&o?.isMutatingArrayMethod(e.operationMethod)&&Vd(t))return s;if(s===Un(e.base_,t)||eu(e,t,s)){fo(e);let c=e.type_===1?+t:t,d=Vn(e.scope_,s,e,c);return e.copy_[c]=d}return s},has(e,t){return t in qe(e)},ownKeys(e){return Reflect.ownKeys(qe(e))},set(e,t,o){let n=Ts(qe(e),t);if(n?.set)return n.set.call(e.draft_,o),!0;if(!e.modified_){let i=Un(qe(e),t),s=i?.[re];if(s&&s.base_===o)return e.copy_[t]=o,e.assigned_.delete(t),!0;if(Wd(o,i)&&(o!==void 0||Dn(e.base_,t,e.type_)))return!0;fo(e),Wn(e)}return e.copy_[t]===o&&(o!==void 0||Dn(e.copy_,t,e.type_))||Number.isNaN(o)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=o,e.assigned_.set(t,!0),Jd(e,t,o)),!0},deleteProperty(e,t){return fo(e),Un(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Wn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let o=qe(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{[po]:!0,[Bn]:e.type_!==1||t!=="length",[mo]:n[mo],[Ar]:o[t]}},defineProperty(){Le(11)},getPrototypeOf(e){return Zt(e.base_)},setPrototypeOf(){Le(12)}},_r={};for(let e in xo){let t=xo[e];_r[e]=function(){let o=arguments;return o[0]=o[0][0],t.apply(this,o)}}_r.deleteProperty=function(e,t){return _r.set.call(this,e,t,void 0)};_r.set=function(e,t,o){return xo.set.call(this,e[0],t,o,e[0])};function Un(e,t){let o=e[re];return(o?qe(o):e)[t]}function eu(e,t,o){return e.type_!==1||!e.allIndicesReassigned_||!me(o)||o[re]?!1:e.baseRefs_.has(o)}function tu(e,t,o){let n=Ts(t,o);return n?Ar in n?n[Ar]:n.get?.call(e.draft_):void 0}function Ts(e,t){if(!(t in e))return;let o=Zt(e);for(;o;){let n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Zt(o)}}function Wn(e){e.modified_||(e.modified_=!0,e.parent_&&Wn(e.parent_))}function fo(e){e.copy_||(e.assigned_=new Map,e.copy_=$n(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ru=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,o,n)=>{if(jt(t)&&!jt(o)){let s=o;o=t;let c=this;return function(u=s,...p){return c.produce(u,f=>o.call(this,f,...p))}}jt(o)||Le(6),n!==void 0&&!jt(n)&&Le(7);let i;if(me(t)){let s=xs(this),c=Vn(s,t,void 0),d=!0;try{i=o(c),d=!1}finally{d?zn(s):Gn(s)}return bs(s,n),vs(i,s)}else if(!t||!Kn(t)){if(i=o(t),i===void 0&&(i=t),i===Cs&&(i=void 0),this.autoFreeze_&&Oo(i,!0),n){let s=[],c=[];_t(Hn).generateReplacementPatches_(t,i,{patches_:s,inversePatches_:c}),n(s,c)}return i}else Le(1,t)},this.produceWithPatches=(t,o)=>{if(jt(t))return(c,...d)=>this.produceWithPatches(c,u=>t(u,...d));let n,i;return[this.produce(t,o,(c,d)=>{n=c,i=d}),n,i]},Mn(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Mn(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Mn(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){me(e)||Le(8),$e(e)&&(e=Ls(e));let t=xs(this),o=Vn(t,e,void 0);return o[re].isManual_=!0,Gn(t),o}finishDraft(e,t){let o=e&&e[re];(!o||!o.isManual_)&&Le(9);let{scope_:n}=o;return bs(n,t),vs(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let o;for(o=t.length-1;o>=0;o--){let i=t[o];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}o>-1&&(t=t.slice(o+1));let n=_t(Hn).applyPatches_;return $e(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Vn(e,t,o,n){let[i,s]=Eo(t)?_t(go).proxyMap_(t,o):Tr(t)?_t(go).proxySet_(t,o):Qd(t,o);return(o?.scope_??As()).drafts_.push(i),s.callbacks_=o?.callbacks_??[],s.key_=n,o&&n!==void 0?Xd(o,s,n):s.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:p}=u;s.modified_&&p&&p.generatePatches_(s,[],u)}),i}function Ls(e){return $e(e)||Le(10,e),ks(e)}function ks(e){if(!me(e)||Ao(e))return e;let t=e[re],o,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,o=$n(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else o=$n(e,!0);let i=o;return Tr(o)&&(o=new Set),So(i,(s,c)=>{yo(o,s,ks(c))},n),t&&(t.finalized_=!1),o}var ou=globalThis.Iterator,Sb=typeof ou?.from=="function";var nu=new ru,Zn=nu.produce;function Is(e){return({dispatch:o,getState:n})=>i=>s=>typeof s=="function"?s(o,n,e):i(s)}var Ns=Is(),Ps=Is;var iu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Or:Or.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var au=e=>e&&typeof e.match=="function";function it(e,t){function o(...n){if(t){let i=t(...n);if(!i)throw new Error(He(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return o.toString=()=>`${e}`,o.type=e,o.match=n=>fs(n)&&n.type===e,o}var Fs=class Lr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Lr.prototype)}static get[Symbol.species](){return Lr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Lr(...t[0].concat(this)):new Lr(...t.concat(this))}};function Ds(e){return me(e)?Zn(e,()=>{}):e}function _o(e,t,o){return e.has(t)?e.get(t):e.set(t,o(t)).get(t)}function su(e){return typeof e=="boolean"}var cu=()=>function(t){let{thunk:o=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{},c=new Fs;return o&&(su(o)?c.push(Ns):c.push(Ps(o.extraArgument))),c},lu="RTK_autoBatch";var Ms=e=>t=>{setTimeout(t,e)},du=(e,t)=>o=>{let n=!1,i,s,c=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(s),o())};i=e(c),s=setTimeout(c,t)},uu=(e={type:"raf"})=>t=>(...o)=>{let n=t(...o),i=!0,s=!1,c=!1,d=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?du(window.requestAnimationFrame,100):Ms(10):e.type==="callback"?e.queueNotification:Ms(e.timeout),p=()=>{c=!1,s&&(s=!1,d.forEach(f=>f()))};return Object.assign({},n,{subscribe(f){let h=()=>i&&f(),m=n.subscribe(h);return d.add(f),()=>{m(),d.delete(f)}},dispatch(f){try{return i=!f?.meta?.[lu],s=!i,s&&(c||(c=!0,u(p))),n.dispatch(f)}finally{i=!0}}})},pu=e=>function(o){let{autoBatch:n=!0}=o??{},i=new Fs(e);return n&&i.push(uu(typeof n=="object"?n:void 0)),i};function $s(e){let t=cu(),{reducer:o=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:s=!0,preloadedState:c=void 0,enhancers:d=void 0}=e||{},u;if(typeof o=="function")u=o;else if(lo(o))u=Pn(o);else throw new Error(He(1));let p;typeof n=="function"?p=n(t):p=t();let f=Or;i&&(f=iu({trace:!1,...typeof i=="object"&&i}));let h=ps(...p),m=pu(h),x=typeof d=="function"?d(m):m(),C=f(...x);return Nn(u,c,C)}function Hs(e){let t={},o=[],n,i={addCase(s,c){let d=typeof s=="string"?s:s.type;if(!d)throw new Error(He(28));if(d in t)throw new Error(He(29));return t[d]=c,i},addAsyncThunk(s,c){return c.pending&&(t[s.pending.type]=c.pending),c.rejected&&(t[s.rejected.type]=c.rejected),c.fulfilled&&(t[s.fulfilled.type]=c.fulfilled),c.settled&&o.push({matcher:s.settled,reducer:c.settled}),i},addMatcher(s,c){return o.push({matcher:s,reducer:c}),i},addDefaultCase(s){return n=s,i}};return e(i),[t,o,n]}function fu(e){return typeof e=="function"}function hu(e,t){let[o,n,i]=Hs(t),s;if(fu(e))s=()=>Ds(e());else{let d=Ds(e);s=()=>d}function c(d=s(),u){let p=[o[u.type],...n.filter(({matcher:f})=>f(u)).map(({reducer:f})=>f)];return p.filter(f=>!!f).length===0&&(p=[i]),p.reduce((f,h)=>{if(h)if($e(f)){let m=h(f,u);return m===void 0?f:m}else{if(me(f))return Zn(f,m=>h(m,u));{let m=h(f,u);if(m===void 0){if(f===null)return f;throw new Error(He(9))}return m}}return f},d)}return c.getInitialState=s,c}var mu=(e,t)=>au(e)?e.match(t):e(t);function yu(...e){return t=>e.some(o=>mu(o,t))}var gu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",bu=(e=21)=>{let t="",o=e;for(;o--;)t+=gu[Math.random()*64|0];return t},xu=["name","message","stack","code"],qn=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Us=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},vu=e=>{if(typeof e=="object"&&e!==null){let t={};for(let o of xu)typeof e[o]=="string"&&(t[o]=e[o]);return t}return{message:String(e)}},Bs="External signal was aborted",Su=(()=>{function e(t,o,n){let i=it(t+"/fulfilled",(u,p,f,h)=>({payload:u,meta:{...h||{},arg:f,requestId:p,requestStatus:"fulfilled"}})),s=it(t+"/pending",(u,p,f)=>({payload:void 0,meta:{...f||{},arg:p,requestId:u,requestStatus:"pending"}})),c=it(t+"/rejected",(u,p,f,h,m)=>({payload:h,error:(n&&n.serializeError||vu)(u||"Rejected"),meta:{...m||{},arg:f,requestId:p,rejectedWithValue:h!==void 0,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function d(u,{signal:p}={}){return(f,h,m)=>{let x=n?.idGenerator?n.idGenerator(u):bu(),C=new AbortController,w,S;function R(E){S=E,C.abort()}p&&(p.aborted?R(Bs):p.addEventListener("abort",()=>R(Bs),{once:!0}));let I=(async function(){let E;try{let A=n?.condition?.(u,{getState:h,extra:m});if(Eu(A)&&(A=await A),A===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(C.signal.aborted)throw{name:"AbortError",message:S||"Aborted"};let D=new Promise((k,V)=>{w=()=>{V({name:"AbortError",message:S||"Aborted"})},C.signal.addEventListener("abort",w,{once:!0})});f(s(x,u,n?.getPendingMeta?.({requestId:x,arg:u},{getState:h,extra:m}))),E=await Promise.race([D,Promise.resolve(o(u,{dispatch:f,getState:h,extra:m,requestId:x,signal:C.signal,abort:R,rejectWithValue:((k,V)=>new qn(k,V)),fulfillWithValue:((k,V)=>new Us(k,V))})).then(k=>{if(k instanceof qn)throw k;return k instanceof Us?i(k.payload,x,u,k.meta):i(k,x,u)})])}catch(A){E=A instanceof qn?c(null,x,u,A.payload,A.meta):c(A,x,u)}finally{w&&C.signal.removeEventListener("abort",w)}return n&&!n.dispatchConditionRejection&&c.match(E)&&E.meta.condition||f(E),E})();return Object.assign(I,{abort:R,requestId:x,arg:u,unwrap(){return I.then(Cu)}})}}return Object.assign(d,{pending:s,rejected:c,fulfilled:i,settled:yu(c,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Cu(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Eu(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var zs=Symbol.for("rtk-slice-createasyncthunk"),Tb={[zs]:Su};function Ou(e,t){return`${e}/${t}`}function Au({creators:e}={}){let t=e?.asyncThunk?.[zs];return function(n){let{name:i,reducerPath:s=i}=n;if(!i)throw new Error(He(11));typeof process<"u";let c=(typeof n.reducers=="function"?n.reducers(_u()):n.reducers)||{},d=Object.keys(c),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(E,A){let D=typeof E=="string"?E:E.type;if(!D)throw new Error(He(12));if(D in u.sliceCaseReducersByType)throw new Error(He(13));return u.sliceCaseReducersByType[D]=A,p},addMatcher(E,A){return u.sliceMatchers.push({matcher:E,reducer:A}),p},exposeAction(E,A){return u.actionCreators[E]=A,p},exposeCaseReducer(E,A){return u.sliceCaseReducersByName[E]=A,p}};d.forEach(E=>{let A=c[E],D={reducerName:E,type:Ou(i,E),createNotation:typeof n.reducers=="function"};Tu(A)?ku(D,A,p,t):Ru(D,A,p)});function f(){let[E={},A=[],D=void 0]=typeof n.extraReducers=="function"?Hs(n.extraReducers):[n.extraReducers],k={...E,...u.sliceCaseReducersByType};return hu(n.initialState,V=>{for(let ee in k)V.addCase(ee,k[ee]);for(let ee of u.sliceMatchers)V.addMatcher(ee.matcher,ee.reducer);for(let ee of A)V.addMatcher(ee.matcher,ee.reducer);D&&V.addDefaultCase(D)})}let h=E=>E,m=new Map,x=new WeakMap,C;function w(E,A){return C||(C=f()),C(E,A)}function S(){return C||(C=f()),C.getInitialState()}function R(E,A=!1){function D(V){let ee=V[E];return typeof ee>"u"&&A&&(ee=_o(x,D,S)),ee}function k(V=h){return _o(_o(m,A,()=>new WeakMap),V,()=>{let ee={};for(let[$r,xe]of Object.entries(n.selectors??{}))ee[$r]=wu(xe,V,()=>_o(x,V,S),A);return ee})}return{reducerPath:E,getSelectors:k,get selectors(){return k(D)},selectSlice:D}}let I={name:i,reducer:w,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...R(s),injectInto(E,{reducerPath:A,...D}={}){let k=A??s;return E.inject({reducerPath:k,reducer:w},D),{...I,...R(k,!0)}}};return I}}function wu(e,t,o,n){function i(s,...c){let d=t(s);return typeof d>"u"&&n&&(d=o()),e(d,...c)}return i.unwrapped=e,i}var Gs=Au();function _u(){function e(t,o){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...o}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...o){return t(...o)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,o){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:o}},asyncThunk:e}}function Ru({type:e,reducerName:t,createNotation:o},n,i){let s,c;if("reducer"in n){if(o&&!Lu(n))throw new Error(He(17));s=n.reducer,c=n.prepare}else s=n;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,c?it(e,c):it(e))}function Tu(e){return e._reducerDefinitionType==="asyncThunk"}function Lu(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ku({type:e,reducerName:t},o,n,i){if(!i)throw new Error(He(18));let{payloadCreator:s,fulfilled:c,pending:d,rejected:u,settled:p,options:f}=o,h=i(e,s,f);n.exposeAction(t,h),c&&n.addCase(h.fulfilled,c),d&&n.addCase(h.pending,d),u&&n.addCase(h.rejected,u),p&&n.addMatcher(h.settled,p),n.exposeCaseReducer(t,{fulfilled:c||Ro,pending:d||Ro,rejected:u||Ro,settled:p||Ro})}function Ro(){}var Ws="listener",Vs="completed",Ks="cancelled",Lb=`task-${Ks}`,kb=`task-${Vs}`,Ib=`${Ws}-${Ks}`,Nb=`${Ws}-${Vs}`;var{assign:js}=Object;var Yn="listenerMiddleware";var Iu=js(it(`${Yn}/add`),{withTypes:()=>Iu}),Pb=it(`${Yn}/removeAll`),Nu=js(it(`${Yn}/remove`),{withTypes:()=>Nu});function He(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Pu=ro(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),To=class extends Pu(Object){};window.ftReduxStores||(window.ftReduxStores={});var Zs=class e extends To{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(so(s))return s;if(i==null)return;let c=Gs({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=$s({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let f=Sr(c.getInitialState());for(let h of p.keeping)f[h]=(u??f)[h];return f}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return c.reducer(u,p)}});return window.ftReduxStores[i.name]=new e(c,d,i.eventBus,i.deprecatedKeys)}constructor(t,o,n,i){super(),this.reduxSlice=t,this.reduxStore=o,this.deprecatedKeys=i,this.isFtReduxStore=!0,this.commands=new oo,this.injectInto=(c,d)=>this.reduxSlice.injectInto(c,d),this.selectSlice=c=>this.reduxSlice.selectSlice(c);let s=c=>c!=null?JSON.parse(JSON.stringify(c)):c;this.actions=new Proxy(this.reduxSlice.actions,{get:(c,d,u)=>{let p=d,f=c[p];return f?(...h)=>{let m=f(...h.map(s));return this.reduxStore.dispatch(m),m}:h=>{let m=p,x=this.getState()[m];Wt(x,h)||this.setState({[m]:s(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Lo=class{static format(t,o,n,i,s){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,o,n,i,!!s)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,i,s){let c=typeof t=="string"?new Date(t):t,d=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(c),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(c);return s?u:i?`${d} ${u}`:d}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var ko=y(O()),Du="ft-app-info",Rt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Rt.eventName="authentication-change";var kr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};kr.eventName="ui-locale-changed";var Mu={session:(e,t)=>{(0,ko.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>T.dispatchEvent(new Rt(t.payload)),0))}},T=ko.FtReduxStore.get({name:Du,reducers:Mu,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 qs=y(O()),Io=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},dx=(0,qs.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(T)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(d=>d.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?d=>Lo.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Io([(0,Xn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Io([(0,Xn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Io([kn({store:T.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Io([kn({store:T.name})],t.prototype,"uiLocale",void 0),t});var Ys;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Ys||(Ys={}));var Xs;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Xs||(Xs={}));var Js;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Js||(Js={}));var Qs;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Qs||(Qs={}));var ec;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(ec||(ec={}));var tc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(tc||(tc={}));var rc;(function(e){e.PUBLISHED="PUBLISHED",e.AI="AI"})(rc||(rc={}));var oc;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(oc||(oc={}));var nc;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(nc||(nc={}));var ic;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(ic||(ic={}));var ac;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER",e.DOC_DIFF="DOC_DIFF"})(ac||(ac={}));var sc;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(sc||(sc={}));var cc;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(cc||(cc={}));var lc;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(lc||(lc={}));var dc;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(dc||(dc={}));var uc;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(uc||(uc={}));var pc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(pc||(pc={}));var fc;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(fc||(fc={}));var hc;(function(e){e.ASC="ASC",e.DESC="DESC"})(hc||(hc={}));var mc;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(mc||(mc={}));var yc;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(yc||(yc={}));var gc;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(gc||(gc={}));var bc;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(bc||(bc={}));var xc;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(xc||(xc={}));var vc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(vc||(vc={}));var Sc;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Sc||(Sc={}));var Cc;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Cc||(Cc={}));var Ec;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ec||(Ec={}));var G;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(G||(G={}));var Se;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Se||(Se={}));var Oc;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Oc||(Oc={}));var Ac;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Ac||(Ac={}));var wc;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(wc||(wc={}));var _c;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(_c||(_c={}));var Rc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Rc||(Rc={}));var Tc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Tc||(Tc={}));var Lc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Lc||(Lc={}));var kc;(function(e){e.CHAT="CHAT",e.COMPLETION="COMPLETION",e.RAG="RAG",e.AGENT="AGENT"})(kc||(kc={}));var Ic;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Ic||(Ic={}));var Nc;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Nc||(Nc={}));var Pc;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Pc||(Pc={}));var Dc;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Dc||(Dc={}));var Mc;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Mc||(Mc={}));var Uu={[G.PERSONAL_BOOK_SHARE_USER]:[G.PERSONAL_BOOK_USER],[G.HTML_EXPORT_USER]:[G.PERSONAL_BOOK_USER],[G.PDF_EXPORT_USER]:[G.PERSONAL_BOOK_USER],[G.KHUB_ADMIN]:[G.CONTENT_PUBLISHER],[G.ADMIN]:[G.KHUB_ADMIN,G.USERS_ADMIN,G.PORTAL_ADMIN,G.BEHAVIOR_DATA_USER],[G.GENERATIVE_AI_EXPORT_USER]:[G.GENERATIVE_AI_USER]};function Uc(e,t){return e===t||(Uu[e]??[]).some(o=>Uc(o,t))}function Jn(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>Uc(n,t))}function Bc(e,...t){return e==null?!1:t.some(o=>Jn(e,o))}var Uo=y(O());var Qn=y(O());var Tt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=T.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let i=T.subscribe(()=>{n=e.get(t),n&&(i(),o(n))})}})}};var qt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Tt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Tt.await()}};var ye=class extends qt{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(s,c)=>typeof c!="object"||c==null||Array.isArray(c)?c:Object.fromEntries(Object.entries(c).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Qn.CacheRegistry,this.cache=t?i.commonCache:new Qn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var No=class extends ye{async listMySearches(){let{session:t}=T.getState();return Jn(t,G.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Po=class extends ye{async listMyBookmarks(){let t=T.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Do=class extends ye{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=T.getState().session;return!!t?.sessionAuthenticated}};var Mo=class extends ye{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=T.getState().session;return!!t?.sessionAuthenticated}};var Bu="ft-user-assets",Fu={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(Se).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:i}=t.payload;ti(e,o,[...ei(e,o),i]),Fc(e,o,1,n),$c(e,i)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;ti(e,o,ei(e,o).map(i=>i.id===n.id?n:i)),$c(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:i}=t.payload;ti(e,o,ei(e,o).filter(s=>s.id!==i)),Fc(e,o,-1,n)}},Hc={[Se.SEARCHES]:"savedSearches",[Se.BOOKMARKS]:"bookmarks",[Se.BOOKS]:void 0,[Se.COLLECTIONS]:void 0},ei=(e,t)=>{var o;let n=Hc[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},ti=(e,t,o)=>{let n=Hc[t];n&&(e[n]=o)},Fc=(e,t,o,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+o),t===Se.BOOKMARKS&&n)){let s=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,s+o)}},$c=(e,t)=>{let o=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},ie=Uo.FtReduxStore.get({name:Bu,reducers:Fu,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Se).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ri=class{constructor(t=new Do,o=new Mo){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Po,this.savedSearchesService=new No,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=T.getState();(0,Uo.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ie.actions.clearAssetCount(),ie.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ie.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ie.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ie.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ie.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&ie.getState().assetCounts.allAsset[t]!==o.count&&ie.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&ie.getState().assetCounts.bookmarkByMap[t]!==o.count&&ie.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(ie.getState().assetCounts.bookmarkByMap).length!==0;t===Se.BOOKMARKS&&o&&ie.actions.clearBookmarkCountByMap(),ie.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ie.actions.bookmarks(o)}}},$u=new ri;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=$u);var oi=class{addCommand(t,o=!1){T.commands.add(t,o)}consumeCommand(t){return T.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new oi;var Ce=y(O());var zc,Yt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Hu=Symbol("clearAfterUnitTest"),Bo=class extends(0,Ce.withEventBus)(ye){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[zc]=()=>{this.defaultMessages={},this.cache=new Ce.CacheRegistry,this.listeners={}},this.currentUiLocale=T.getState().uiLocale,T.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=T.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Ce.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let s=t.toLowerCase(),c=this.resolveContext(s);return new Ce.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},c).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof Ce.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Yt({loadedContexts:t})),this.dispatchEvent(new Yt({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new Yt({loadedContexts:[t]})),this.dispatchEvent(new Yt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ce.delay)(0).then(()=>n()).catch(()=>null)))}};zc=Hu;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Bo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Bo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Xt=window.FluidTopicsI18nService,Fo=window.FluidTopicsCustomI18nService;var Gc=y(O()),ni=class{highlightHtml(t,o,n){(0,Gc.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new ni;var Wc=y(O());var ii=class{isDate(t){var o,n,i,s;return(s=(n=((i=(o=T.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]).find(d=>d.key===t))===null||n===void 0?void 0:n.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s,c;if(t==null)return"";try{return Wc.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:T.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1,(c=o?.onlyTime)!==null&&c!==void 0?c:!1)}catch(d){throw console.error(`Date ${JSON.stringify(t)} is not valid`,d),d}}};window.FluidTopicsDateService=new ii;var Vc=y(O());var Ir=class{static get(t,o,{baseUrl:n,localesConfiguration:i,availableContentLocales:s}=T.getState()){var c;if(o==="all"&&i?.allLanguagesAllowed)o=void 0;else if(!o||s.length>0&&!s.some(d=>d.lang===o)){let d=i?.defaultLocales.defaultContentLocale;o=d?`${d.lang}-${d.region}`:(c=s[0])===null||c===void 0?void 0:c.lang}return new Vc.SearchPlaceConverter(n,t??20,i?.allLanguagesAllowed,o,s)}};var ai=class{urlToSearchRequest(t){return Ir.get().parse(t)}searchRequestToUrl(t){return Ir.get().serialize(t)}};window.FluidTopicsUrlService=new ai;var Ye=y(O());var Lt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Lt.eventName="before-location-change";var kt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};kt.eventName="change";var si=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},Kc=new si;var $o=class e extends Ye.WithEventBus{static build(){return new e(window.history,Kc,()=>window.location,!1)}constructor(t,o,n,i){var s,c;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(c=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&c!==void 0?c:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ye.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new kt(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[s,c,d])=>{let u=new URL(typeof d=="string"?d:(d??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),p=new Lt(u);this.dispatchEvent(p);let f=o(),h={...f===this.currentIndex?this.currentState:void 0,...s,index:f,href:p.detail.nextLocation.href};n.apply(i,[h,c,h.href]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(Lt.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Lt.eventName,t)}addHistoryChangeListener(t){this.addEventListener(kt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(kt.eventName,t)}currentItem(){return(0,Ye.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Ye.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ye.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Ye.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=$o.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var jc=y(N());var Zc=jc.css`
372
372
  `;var Xc=y(N()),ae=y(q()),Nt=y(O());var ze=y(O());function qc(e,t){let{authenticationRequired:o,session:n}=T.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Ho=class extends qt{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var ci=class e extends ze.FtStateManager{static build(t){return new e(T,t)}constructor(t,o){super(),this.store=t,this.cache=new ze.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Ho,this.knownContexts=new ze.AbstractRegistry,this.knownCustomComponents=new ze.AbstractRegistry,this.cleanSessionDebouncer=new ze.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new ze.Debouncer(500),this.apiProvider=o??(()=>Tt.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Rt.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Rt.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},o.idleTimeoutInMillis),o});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let o=await this.cache.get("availableContentLocales",()=>qc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=o.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,o){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:o}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new kr(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}userHasAnyRole(...t){return Bc(T.getState().session,...t)}},Yc=ci.build();var It=class extends Event{constructor(t,o,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=o,this.callback=n,this.subscribe=i??!1}};var Nr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let o=this.pendingContextRequests.get(t.context);if(o===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=o;for(let{elementRef:i,callbackRef:s}of n){let c=i.deref(),d=s.deref();c===void 0||d===void 0||c.dispatchEvent(new It(t.context,c,d,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let o=t.contextTarget??t.composedPath()[0],n=t.callback,i=this.pendingContextRequests.get(t.context);i===void 0&&this.pendingContextRequests.set(t.context,i={callbacks:new WeakMap,requests:[]});let s=i.callbacks.get(o);s===void 0&&i.callbacks.set(o,s=new WeakSet),s.has(n)||(s.add(n),i.requests.push({elementRef:new WeakRef(o),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var Y=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},B=class extends Nt.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=Yc,this.contextRoot=new Nr}render(){return Xc.html`
373
373
  <slot></slot>
374
374
  `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var o;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Xt.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((o=this.stateManager)===null||o===void 0||o.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};B.elementDefinitions={};B.styles=Zc;Y([(0,ae.property)()],B.prototype,"baseUrl",void 0);Y([(0,ae.property)()],B.prototype,"tenantId",void 0);Y([(0,ae.property)()],B.prototype,"apiIntegrationIdentifier",void 0);Y([(0,ae.property)()],B.prototype,"apiIntegrationAppVersion",void 0);Y([(0,ae.property)()],B.prototype,"uiLocale",void 0);Y([(0,Nt.jsonProperty)(null)],B.prototype,"availableUiLocales",void 0);Y([(0,Nt.jsonProperty)(null)],B.prototype,"metadataConfiguration",void 0);Y([(0,ae.property)({type:Boolean})],B.prototype,"editorMode",void 0);Y([(0,ae.property)({type:Boolean})],B.prototype,"noCustom",void 0);Y([(0,ae.property)({type:Boolean})],B.prototype,"openExternalDocumentInNewTab",void 0);Y([(0,ae.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],B.prototype,"noCustomComponent",void 0);Y([(0,ae.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],B.prototype,"noCustomCode",void 0);Y([(0,ae.property)({type:Boolean})],B.prototype,"withManualResources",void 0);Y([(0,ae.property)({type:Boolean})],B.prototype,"navigatorOnline",void 0);Y([(0,ae.property)({type:Boolean})],B.prototype,"forcedOffline",void 0);Y([(0,ae.property)({type:Boolean})],B.prototype,"authenticationRequired",void 0);Y([(0,Nt.jsonProperty)([])],B.prototype,"messageContexts",void 0);Y([(0,Nt.jsonProperty)(void 0)],B.prototype,"session",void 0);var Qc=y(O());var Jc={"ft-app-context":B};(0,Qc.customElements)(Jc);var el=y(q());var li=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[o,n]=t.split(".");return{context:o,key:n,custom:o!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Jt=new li;var Wu=function(e,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Dr=Symbol("i18nAttributes"),tl=Symbol("i18nListAttributes"),rl=Symbol("i18nProperties"),zo=Symbol("i18nContexts"),Pr=Symbol("i18nUnsubs"),Vo=(0,Qt.applyMixinOnce)(Symbol("withI18n"),function(e){var t,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?Fo:Xt}i18n(s){let{context:c,key:d,message:u}=s,{custom:p,args:f,argsProvider:h}=s;if(c&&d){this.hasI18nContext(c)||this.addI18nContext(c,void 0,p);let m=f??(h?h(this):[]);return this.getI18nService(p).resolveMessage(c,d,...m)}return u}async awaitI18n(s){let{context:c,custom:d}=s;return c&&await this.getI18nService(d).prepareContext(c),this.i18n(s)}customI18n(s,c){if(Jt.isI18nKey(s)){let[d,u]=s.split(".");return this.i18n({custom:!0,context:d,key:u,...c})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((c,d,u)=>s.has(d)||typeof c.argsProvider=="function"),this.updateI18nProperties(c=>typeof c.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((c,d,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===s}),this.updateI18nProperties(c=>c.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var c,d;let u=this,p=(f,h,m)=>m?.context&&m.key&&s(f,h,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...f})}:m;(c=this[Dr])===null||c===void 0||c.forEach((f,h)=>u[h]=p(f,h,u[h])),(d=this[tl])===null||d===void 0||d.forEach((f,h)=>{var m;return u[h]=(m=u[h])===null||m===void 0?void 0:m.map(x=>p(f,h,x))})}updateI18nProperties(s){var c;(c=this[rl])===null||c===void 0||c.forEach((d,u)=>{s(d,u)&&(this[u]=this.i18n(d))})}addI18nMessages(s,c,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,c,d)}addI18nContext(s,c,d){let u=(typeof s=="string"?s:s.name).toLowerCase();d=typeof s=="string"?d:s.custom,this[zo].set(u,{isCustomContext:d}),this[Pr].has(u)||this[Pr].set(u,this.getI18nService(d).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(d).prepareContext(u,c)}hasI18nContext(s){return this[zo].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[zo].forEach((s,c)=>this.addI18nContext(c,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Pr].forEach(s=>s()),this[Pr].clear()}}return t=zo,o=Pr,Wu([(0,el.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Go=class extends Vo(Qt.FtLitElement){},Wo=class extends Vo(Qt.FtLitElementRedux){};var ol=y(O());var di=class{fromAttribute(t){if(!t)return[];try{let o=JSON.parse(t);return Array.isArray(o)?o.map(n=>typeof n=="string"?Jt.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Vu=new di;var nl=(e,t)=>(o,n)=>{var i;o.constructor.createProperty(n,{type:Object,hasChanged:ol.hasChanged,converter:Jt,...t}),o[Dr]=(i=o[Dr])!==null&&i!==void 0?i:new Map,o[Dr].set(n,e??{})};var Ko=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?Fo:Xt}constructor(t,o=!1){this.name=t,this.custom=o,this.properties=new Proxy({},{get:(n,i)=>{let s=i;return c=>({context:this.name,key:s,custom:this.custom,args:typeof c=="function"?void 0:c,argsProvider:typeof c=="function"?c:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...s)=>this.service.resolveMessage(this.name,i,...s)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var il=y(N());var al=il.css`