@fluid-topics/ft-search-facet 2.1.5 → 2.1.7

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.
@@ -581,7 +581,7 @@
581
581
  position: relative;
582
582
  word-break: break-word;
583
583
  }
584
- `;var zs=["top","right","bottom","left"],Vs=["start","end"],_n=zs.reduce((t,e)=>t.concat(e,e+"-"+Vs[0],e+"-"+Vs[1]),[]),Kr=Math.min,At=Math.max,Gr=Math.round;var We=t=>({x:t,y:t}),ku={left:"right",right:"left",bottom:"top",top:"bottom"};function Ln(t,e,r){return At(t,Kr(e,r))}function bi(t,e){return typeof t=="function"?t(e):t}function yr(t){return t.split("-")[0]}function Et(t){return t.split("-")[1]}function Pn(t){return t==="x"?"y":"x"}function kn(t){return t==="y"?"height":"width"}function xi(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Nn(t){return Pn(xi(t))}function qs(t,e,r){r===void 0&&(r=!1);let i=Et(t),n=Nn(t),o=kn(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Rn(s)),[s,Rn(s)]}function Ws(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Rn(t){let e=yr(t);return ku[e]+t.slice(e.length)}function Nu(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ks(t){return typeof t!="number"?Nu(t):{top:t,right:t,bottom:t,left:t}}function jt(t){let{x:e,y:r,width:i,height:n}=t;return{width:i,height:n,top:r,left:e,right:e+i,bottom:r+n,x:e,y:r}}function Gs(t,e,r){let{reference:i,floating:n}=t,o=xi(e),s=Nn(e),a=kn(s),l=yr(e),c=o==="y",u=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:u,y:i.y-n.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:d};break;case"left":h={x:i.x-n.width,y:d};break;default:h={x:i.x,y:i.y}}switch(Et(e)){case"start":h[s]-=p*(r&&c?-1:1);break;case"end":h[s]+=p*(r&&c?-1:1);break}return h}async function Ys(t,e){var r;e===void 0&&(e={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=bi(e,t),m=Ks(h),S=a[p?d==="floating"?"reference":"floating":d],A=jt(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(S)))==null||r?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),E=d==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),w=await(o.isElement==null?void 0:o.isElement(O))?await(o.getScale==null?void 0:o.getScale(O))||{x:1,y:1}:{x:1,y:1},Q=jt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:O,strategy:l}):E);return{top:(A.top-Q.top+m.top)/w.y,bottom:(Q.bottom-A.bottom+m.bottom)/w.y,left:(A.left-Q.left+m.left)/w.x,right:(Q.right-A.right+m.right)/w.x}}var Du=50,Xs=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Ys},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:d}=Gs(c,i,l),p=i,h=0,m={};for(let v=0;v<o.length;v++){let S=o[v];if(!S)continue;let{name:A,fn:E}=S,{x:O,y:w,data:Q,reset:K}=await E({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:e}});u=O??u,d=w??d,m[A]={...m[A],...Q},K&&h<Du&&(h++,typeof K=="object"&&(K.placement&&(p=K.placement),K.rects&&(c=K.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:n}):K.rects),{x:u,y:d}=Gs(c,p,l)),v=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:m}};function Iu(t,e,r){return(t?[...r.filter(n=>Et(n)===t),...r.filter(n=>Et(n)!==t)]:r.filter(n=>yr(n)===n)).filter(n=>t?Et(n)===t||(e?Ws(n)!==n:!1):!0)}var Qs=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:p=_n,autoAlignment:h=!0,...m}=bi(t,e),v=d!==void 0||p===_n?Iu(d||null,h,p):p,S=await l.detectOverflow(e,m),A=((r=s.autoPlacement)==null?void 0:r.index)||0,E=v[A];if(E==null)return{};let O=qs(E,o,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==E)return{reset:{placement:v[0]}};let w=[S[yr(E)],S[O[0]],S[O[1]]],Q=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:E,overflows:w}],K=v[A+1];if(K)return{data:{index:A+1,overflows:Q},reset:{placement:K}};let yt=Q.map(we=>{let Ne=Et(we.placement);return[we.placement,Ne&&u?we.overflows.slice(0,2).reduce((Te,Mt)=>Te+Mt,0):we.overflows[0],we.overflows]}).sort((we,Ne)=>we[1]-Ne[1]),bt=((n=yt.filter(we=>we[2].slice(0,Et(we[0])?2:3).every(Ne=>Ne<=0))[0])==null?void 0:n[0])||yt[0][0];return bt!==a?{data:{index:A+1,overflows:Q},reset:{placement:bt}}:{}}}};var Js=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:n,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:A=>{let{x:E,y:O}=A;return{x:E,y:O}}},...c}=bi(t,e),u={x:r,y:i},d=await o.detectOverflow(e,c),p=xi(yr(n)),h=Pn(p),m=u[h],v=u[p];if(s){let A=h==="y"?"top":"left",E=h==="y"?"bottom":"right",O=m+d[A],w=m-d[E];m=Ln(O,m,w)}if(a){let A=p==="y"?"top":"left",E=p==="y"?"bottom":"right",O=v+d[A],w=v-d[E];v=Ln(O,v,w)}let S=l.fn({...e,[h]:m,[p]:v});return{...S,data:{x:S.x-r,y:S.y-i,enabled:{[h]:s,[p]:a}}}}}};function Ai(){return typeof window<"u"}function zt(t){return ea(t)?(t.nodeName||"").toLowerCase():"#document"}function Se(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function nt(t){var e;return(e=(ea(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ea(t){return Ai()?t instanceof Node||t instanceof Se(t).Node:!1}function Me(t){return Ai()?t instanceof Element||t instanceof Se(t).Element:!1}function ot(t){return Ai()?t instanceof HTMLElement||t instanceof Se(t).HTMLElement:!1}function Zs(t){return!Ai()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Se(t).ShadowRoot}function br(t){let{overflow:e,overflowX:r,overflowY:i,display:n}=$e(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&n!=="inline"&&n!=="contents"}function ta(t){return/^(table|td|th)$/.test(zt(t))}function Yr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Mu=/transform|translate|scale|rotate|perspective|filter/,$u=/paint|layout|strict|content/,Vt=t=>!!t&&t!=="none",Dn;function xr(t){let e=Me(t)?$e(t):t;return Vt(e.transform)||Vt(e.translate)||Vt(e.scale)||Vt(e.rotate)||Vt(e.perspective)||!Ei()&&(Vt(e.backdropFilter)||Vt(e.filter))||Mu.test(e.willChange||"")||$u.test(e.contain||"")}function ra(t){let e=ft(t);for(;ot(e)&&!qt(e);){if(xr(e))return e;if(Yr(e))return null;e=ft(e)}return null}function Ei(){return Dn==null&&(Dn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dn}function qt(t){return/^(html|body|#document)$/.test(zt(t))}function $e(t){return Se(t).getComputedStyle(t)}function Xr(t){return Me(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ft(t){if(zt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Zs(t)&&t.host||nt(t);return Zs(e)?e.host:e}function ia(t){let e=ft(t);return qt(e)?t.ownerDocument?t.ownerDocument.body:t.body:ot(e)&&br(e)?e:ia(e)}function Si(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=ia(t),o=n===((i=t.ownerDocument)==null?void 0:i.body),s=Se(n);if(o){let a=Ci(s);return e.concat(s,s.visualViewport||[],br(n)?n:[],a&&r?Si(a):[])}else return e.concat(n,Si(n,[],r))}function Ci(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function aa(t){let e=$e(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=ot(t),o=n?t.offsetWidth:r,s=n?t.offsetHeight:i,a=Gr(r)!==o||Gr(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function la(t){return Me(t)?t:t.contextElement}function Sr(t){let e=la(t);if(!ot(e))return We(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:o}=aa(e),s=(o?Gr(r.width):r.width)/i,a=(o?Gr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Uu=We(0);function ca(t){let e=Se(t);return!Ei()||!e.visualViewport?Uu:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Fu(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Se(t)?!1:e}function Qr(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),o=la(t),s=We(1);e&&(i?Me(i)&&(s=Sr(i)):s=Sr(t));let a=Fu(o,r,i)?ca(o):We(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,u=n.width/s.x,d=n.height/s.y;if(o){let p=Se(o),h=i&&Me(i)?Se(i):i,m=p,v=Ci(m);for(;v&&i&&h!==m;){let S=Sr(v),A=v.getBoundingClientRect(),E=$e(v),O=A.left+(v.clientLeft+parseFloat(E.paddingLeft))*S.x,w=A.top+(v.clientTop+parseFloat(E.paddingTop))*S.y;l*=S.x,c*=S.y,u*=S.x,d*=S.y,l+=O,c+=w,m=Se(v),v=Ci(m)}}return jt({width:u,height:d,x:l,y:c})}function Oi(t,e){let r=Xr(t).scrollLeft;return e?e.left+r:Qr(nt(t)).left+r}function ua(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-Oi(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function Bu(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,o=n==="fixed",s=nt(i),a=e?Yr(e.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=We(1),u=We(0),d=ot(i);if((d||!d&&!o)&&((zt(i)!=="body"||br(s))&&(l=Xr(i)),d)){let h=Qr(i);c=Sr(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}let p=s&&!d&&!o?ua(s,l):We(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function Hu(t){return Array.from(t.getClientRects())}function ju(t){let e=nt(t),r=Xr(t),i=t.ownerDocument.body,n=At(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=At(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),s=-r.scrollLeft+Oi(t),a=-r.scrollTop;return $e(i).direction==="rtl"&&(s+=At(e.clientWidth,i.clientWidth)-n),{width:n,height:o,x:s,y:a}}var na=25;function Vu(t,e){let r=Se(t),i=nt(t),n=r.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(n){o=n.width,s=n.height;let u=Ei();(!u||u&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}let c=Oi(i);if(c<=0){let u=i.ownerDocument,d=u.body,p=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(i.clientWidth-d.clientWidth-h);m<=na&&(o-=m)}else c<=na&&(o+=c);return{width:o,height:s,x:a,y:l}}function zu(t,e){let r=Qr(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,o=ot(t)?Sr(t):We(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function oa(t,e,r){let i;if(e==="viewport")i=Vu(t,r);else if(e==="document")i=ju(nt(t));else if(Me(e))i=zu(e,r);else{let n=ca(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return jt(i)}function da(t,e){let r=ft(t);return r===e||!Me(r)||qt(r)?!1:$e(r).position==="fixed"||da(r,e)}function qu(t,e){let r=e.get(t);if(r)return r;let i=Si(t,[],!1).filter(a=>Me(a)&&zt(a)!=="body"),n=null,o=$e(t).position==="fixed",s=o?ft(t):t;for(;Me(s)&&!qt(s);){let a=$e(s),l=xr(s);!l&&a.position==="fixed"&&(n=null),(o?!l&&!n:!l&&a.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||br(s)&&!l&&da(t,s))?i=i.filter(u=>u!==s):n=a,s=ft(s)}return e.set(t,i),i}function Wu(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,s=[...r==="clippingAncestors"?Yr(e)?[]:qu(e,this._c):[].concat(r),i],a=oa(e,s[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let h=oa(e,s[p],n);l=At(h.top,l),c=Kr(h.right,c),u=Kr(h.bottom,u),d=At(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Ku(t){let{width:e,height:r}=aa(t);return{width:e,height:r}}function Gu(t,e,r){let i=ot(e),n=nt(e),o=r==="fixed",s=Qr(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=We(0);function c(){l.x=Oi(n)}if(i||!i&&!o)if((zt(e)!=="body"||br(n))&&(a=Xr(e)),i){let h=Qr(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else n&&c();o&&!i&&n&&c();let u=n&&!i&&!o?ua(n,a):We(0),d=s.left+a.scrollLeft-l.x-u.x,p=s.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:s.width,height:s.height}}function In(t){return $e(t).position==="static"}function sa(t,e){if(!ot(t)||$e(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return nt(t)===r&&(r=r.ownerDocument.body),r}function pa(t,e){let r=Se(t);if(Yr(t))return r;if(!ot(t)){let n=ft(t);for(;n&&!qt(n);){if(Me(n)&&!In(n))return n;n=ft(n)}return r}let i=sa(t,e);for(;i&&ta(i)&&In(i);)i=sa(i,e);return i&&qt(i)&&In(i)&&!xr(i)?r:i||ra(t)||r}var Yu=async function(t){let e=this.getOffsetParent||pa,r=this.getDimensions,i=await r(t.floating);return{reference:Gu(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Xu(t){return $e(t).direction==="rtl"}var wi={convertOffsetParentRelativeRectToViewportRelativeRect:Bu,getDocumentElement:nt,getClippingRect:Wu,getOffsetParent:pa,getElementRects:Yu,getClientRects:Hu,getDimensions:Ku,getScale:Sr,isElement:Me,isRTL:Xu};var fa=Qs,ha=Js;var ma=(t,e,r)=>{let i=new Map,n={platform:wi,...r},o={...n.platform,_c:i};return Xs(t,e,{...n,platform:o})};function va(t){return Qu(t)}function Mn(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Qu(t){for(let e=t;e;e=Mn(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Mn(t);e;e=Mn(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||xr(r)||e.tagName==="BODY"))return e}return null}async function ga(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},ma(t,e,{strategy:i.strategy,platform:{...wi,getOffsetParent:n=>wi.getOffsetParent(n,va)},middleware:[ha({crossAxis:!0}),fa({allowedPlacements:[i.placement]})]})}var Dr=f(x());var lo=f(B());var ya=f(B(),1);var $n=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function ba(t,e){return(0,ya.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Jr(t);try{return JSON.parse(r)}catch{return Jr(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Zr,...e??{}})}function Ju(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Ti(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Ti(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(r=o.length,r!==n(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!Ti(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Ti(t,e){try{return Ju(t,e)}catch{return!1}}function Zr(t,e){return!Ti(t,e)}function Jr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Ri(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let n=e(i);return n[t]=!0,n}}var xa=f(B(),1);var Un=t=>{let e=t??{};return(r,i)=>{var n;let o={hasChanged:Zr,attribute:!1,...e};(0,xa.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[i]),store:e.store})}};var _i=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var Wt=f(B(),1);var Li=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Aa=f(_(),1);var Pi=globalThis,Zu=Pi.ShadowRoot&&(Pi.ShadyCSS===void 0||Pi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Sa=(t,e)=>{if(Zu)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let i=document.createElement("style"),n=Pi.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}};var ki=class extends Aa.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return Sa(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){$n(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Ea(t,e,...r){var i;let n=t.querySelector(e);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var Er=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Ta,Ca=Symbol("constructorPrototype"),Oa=Symbol("constructorName"),Ra=Symbol("exportpartsDebouncer"),wa=Symbol("dynamicDependenciesLoaded"),Ar=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Ar.eventName="exportparts-updated";var st=class extends ki{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ta]=new Li(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Ra].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Oa]=this.constructor.name,this[Ca]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Oa]&&Object.setPrototypeOf(this,this[Ca])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[wa]||(r[wa]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Ar.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Ar.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Ar)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=Ea(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,i,n,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&a!==void 0?a:[],v=[...h,...m].filter(l).map(S=>S.trim());for(let S of v)u.add(S)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(h=>`${p}:${h}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};Ta=Ra;Er([(0,Wt.property)()],st.prototype,"exportpartsPrefix",void 0);Er([ba([])],st.prototype,"exportpartsPrefixes",void 0);Er([(0,Wt.property)({reflect:!0})],st.prototype,"exportparts",void 0);Er([(0,Wt.property)()],st.prototype,"customStylesheet",void 0);Er([(0,Wt.property)()],st.prototype,"elementToFocus",void 0);Er([(0,Wt.state)()],st.prototype,"useAdoptedStyleSheets",void 0);function Ni(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ei=Symbol("internalReduxEventsUnsubscribers"),Ct=Symbol("internalStoresUnsubscribers"),Kt=Symbol("internalStores"),ed=Ri(Symbol("withRedux"),function(t){var e,r,i;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Kt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Kt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Kt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Kt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Kt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Kt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[Ct].has(s.store):this[Ct].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[Ct].set(s,a.subscribe(()=>this.updateFromStores())),this[ei].set(s,[]),Ni(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[ei].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ct].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[Ct].has(s)&&this[Ct].get(s)(),this[Ct].delete(s),(a=this[ei].get(s))===null||a===void 0||a.forEach(l=>l()),this[ei].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Ct,r=Kt,i=ei,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),_a=class extends ed(st){};function Ue(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];if(0)var n,o;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ht(t){return!!t&&!!t[U]}function Ke(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===ld})(t)||Array.isArray(t)||!!t[Ma]||!!(!((e=t.constructor)===null||e===void 0)&&e[Ma])||Kn(t)||Gn(t))}function Gt(t,e,r){r===void 0&&(r=!1),wr(t)===0?(r?Object.keys:Or)(t).forEach((function(i){r&&typeof i=="symbol"||e(i,t[i],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function wr(t){var e=t[U];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Kn(t)?2:Gn(t)?3:0}function Cr(t,e){return wr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function td(t,e){return wr(t)===2?t.get(e):t[e]}function $a(t,e,r){var i=wr(t);i===2?t.set(e,r):i===3?t.add(r):t[e]=r}function Ua(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Kn(t){return sd&&t instanceof Map}function Gn(t){return ad&&t instanceof Set}function Ot(t){return t.o||t.t}function Yn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Ha(t);delete e[U];for(var r=Or(e),i=0;i<r.length;i++){var n=r[i],o=e[n];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function Xn(t,e){return e===void 0&&(e=!1),Qn(t)||ht(t)||!Ke(t)||(wr(t)>1&&(t.set=t.add=t.clear=t.delete=rd),Object.freeze(t),e&&Gt(t,(function(r,i){return Xn(i,!0)}),!0)),t}function rd(){Ue(2)}function Qn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function at(t){var e=Wn[t];return e||Ue(18,t),e}function id(t,e){Wn[t]||(Wn[t]=e)}function Vn(){return ri}function Fn(t,e){e&&(at("Patches"),t.u=[],t.s=[],t.v=e)}function Di(t){zn(t),t.p.forEach(nd),t.p=null}function zn(t){t===ri&&(ri=t.l)}function La(t){return ri={p:[],l:ri,h:t,m:!0,_:0}}function nd(t){var e=t[U];e.i===0||e.i===1?e.j():e.g=!0}function Bn(t,e){e._=e.p.length;var r=e.p[0],i=t!==void 0&&t!==r;return e.h.O||at("ES5").S(e,t,i),i?(r[U].P&&(Di(e),Ue(4)),Ke(t)&&(t=Ii(e,t),e.l||Mi(e,t)),e.u&&at("Patches").M(r[U].t,t,e.u,e.s)):t=Ii(e,r,[]),Di(e),e.u&&e.v(e.u,e.s),t!==Ba?t:void 0}function Ii(t,e,r){if(Qn(e))return e;var i=e[U];if(!i)return Gt(e,(function(a,l){return Pa(t,i,e,a,l,r)}),!0),e;if(i.A!==t)return e;if(!i.P)return Mi(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=Yn(i.k):i.o,o=n,s=!1;i.i===3&&(o=new Set(n),n.clear(),s=!0),Gt(o,(function(a,l){return Pa(t,i,n,a,l,r,s)})),Mi(t,n,!1),r&&t.u&&at("Patches").N(i,r,t.u,t.s)}return i.o}function Pa(t,e,r,i,n,o,s){if(ht(n)){var a=Ii(t,n,o&&e&&e.i!==3&&!Cr(e.R,i)?o.concat(i):void 0);if($a(r,i,a),!ht(a))return;t.m=!1}else s&&r.add(n);if(Ke(n)&&!Qn(n)){if(!t.h.D&&t._<1)return;Ii(t,n),e&&e.A.l||Mi(t,n)}}function Mi(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Xn(e,r)}function Hn(t,e){var r=t[U];return(r?Ot(r):t)[e]}function ka(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Object.getPrototypeOf(r)}}function wt(t){t.P||(t.P=!0,t.l&&wt(t.l))}function jn(t){t.o||(t.o=Yn(t.t))}function qn(t,e,r){var i=Kn(e)?at("MapSet").F(e,r):Gn(e)?at("MapSet").T(e,r):t.O?(function(n,o){var s=Array.isArray(n),a={i:s?1:0,A:o?o.A:Vn(),P:!1,I:!1,R:{},l:o,t:n,k:null,o:null,j:null,C:!1},l=a,c=ii;s&&(l=[a],c=ti);var u=Proxy.revocable(l,c),d=u.revoke,p=u.proxy;return a.k=p,a.j=d,p})(e,r):at("ES5").J(e,r);return(r?r.A:Vn()).p.push(i),i}function od(t){return ht(t)||Ue(22,t),(function e(r){if(!Ke(r))return r;var i,n=r[U],o=wr(r);if(n){if(!n.P&&(n.i<4||!at("ES5").K(n)))return n.t;n.I=!0,i=Na(r,o),n.I=!1}else i=Na(r,o);return Gt(i,(function(s,a){n&&td(n.t,s)===a||$a(i,s,e(a))})),o===3?new Set(i):i})(t)}function Na(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Yn(t)}function Fa(){function t(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[U];return ii.get(c,s)},set:function(c){var u=this[U];ii.set(u,s,c)}},l}function e(s){for(var a=s.length-1;a>=0;a--){var l=s[a][U];if(!l.P)switch(l.i){case 5:i(l)&&wt(l);break;case 4:r(l)&&wt(l)}}}function r(s){for(var a=s.t,l=s.k,c=Or(l),u=c.length-1;u>=0;u--){var d=c[u];if(d!==U){var p=a[d];if(p===void 0&&!Cr(a,d))return!0;var h=l[d],m=h&&h[U];if(m?m.t!==p:!Ua(h,p))return!0}}var v=!!a[U];return c.length!==Or(a).length+(v?0:1)}function i(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function n(s){s.g&&Ue(3,JSON.stringify(Ot(s)))}var o={};id("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(d,p){if(d){for(var h=Array(p.length),m=0;m<p.length;m++)Object.defineProperty(h,""+m,t(m,!0));return h}var v=Ha(p);delete v[U];for(var S=Or(v),A=0;A<S.length;A++){var E=S[A];v[E]=t(E,d||!!v[E].enumerable)}return Object.create(Object.getPrototypeOf(p),v)})(l,s),u={i:l?5:4,A:a?a.A:Vn(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,U,{value:u,writable:!0}),c},S:function(s,a,l){l?ht(a)&&a[U].A===s&&e(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var d=u[U];if(d){var p=d.t,h=d.k,m=d.R,v=d.i;if(v===4)Gt(h,(function(w){w!==U&&(p[w]!==void 0||Cr(p,w)?m[w]||c(h[w]):(m[w]=!0,wt(d)))})),Gt(p,(function(w){h[w]!==void 0||Cr(h,w)||(m[w]=!1,wt(d))}));else if(v===5){if(i(d)&&(wt(d),m.length=!0),h.length<p.length)for(var S=h.length;S<p.length;S++)m[S]=!1;else for(var A=p.length;A<h.length;A++)m[A]=!0;for(var E=Math.min(h.length,p.length),O=0;O<E;O++)h.hasOwnProperty(O)||(m[O]=!0),m[O]===void 0&&c(h[O])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var Da,ri,Jn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",sd=typeof Map<"u",ad=typeof Set<"u",Ia=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ba=Jn?Symbol.for("immer-nothing"):((Da={})["immer-nothing"]=!0,Da),Ma=Jn?Symbol.for("immer-draftable"):"__$immer_draftable",U=Jn?Symbol.for("immer-state"):"__$immer_state";var ld=""+Object.prototype.constructor,Or=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ha=Object.getOwnPropertyDescriptors||function(t){var e={};return Or(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Wn={},ii={get:function(t,e){if(e===U)return t;var r=Ot(t);if(!Cr(r,e))return(function(n,o,s){var a,l=ka(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(n.k):void 0})(t,r,e);var i=r[e];return t.I||!Ke(i)?i:i===Hn(t.t,e)?(jn(t),t.o[e]=qn(t.A.h,i,t)):i},has:function(t,e){return e in Ot(t)},ownKeys:function(t){return Reflect.ownKeys(Ot(t))},set:function(t,e,r){var i=ka(Ot(t),e);if(i?.set)return i.set.call(t.k,r),!0;if(!t.P){var n=Hn(Ot(t),e),o=n?.[U];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Ua(r,n)&&(r!==void 0||Cr(t.t,e)))return!0;jn(t),wt(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Hn(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,jn(t),wt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Ot(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:i.enumerable,value:r[e]}},defineProperty:function(){Ue(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ue(12)}},ti={};Gt(ii,(function(t,e){ti[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),ti.deleteProperty=function(t,e){return ti.set.call(this,t,e,void 0)},ti.set=function(t,e,r){return ii.set.call(this,t[0],e,r,t[0])};var cd=(function(){function t(r){var i=this;this.O=Ia,this.D=!0,this.produce=function(n,o,s){if(typeof n=="function"&&typeof o!="function"){var a=o;o=n;var l=i;return function(v){var S=this;v===void 0&&(v=a);for(var A=arguments.length,E=Array(A>1?A-1:0),O=1;O<A;O++)E[O-1]=arguments[O];return l.produce(v,(function(w){var Q;return(Q=o).call.apply(Q,[S,w].concat(E))}))}}var c;if(typeof o!="function"&&Ue(6),s!==void 0&&typeof s!="function"&&Ue(7),Ke(n)){var u=La(i),d=qn(i,n,void 0),p=!0;try{c=o(d),p=!1}finally{p?Di(u):zn(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(v){return Fn(u,s),Bn(v,u)}),(function(v){throw Di(u),v})):(Fn(u,s),Bn(c,u))}if(!n||typeof n!="object"){if((c=o(n))===void 0&&(c=n),c===Ba&&(c=void 0),i.D&&Xn(c,!0),s){var h=[],m=[];at("Patches").M(n,c,h,m),s(h,m)}return c}Ue(21,n)},this.produceWithPatches=function(n,o){if(typeof n=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];return i.produceWithPatches(c,(function(h){return n.apply(void 0,[h].concat(d))}))};var s,a,l=i.produce(n,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Ke(r)||Ue(8),ht(r)&&(r=od(r));var i=La(this),n=qn(this,r,void 0);return n[U].C=!0,zn(i),n},e.finishDraft=function(r,i){var n=r&&r[U],o=n.A;return Fn(o,i),Bn(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Ia&&Ue(20),this.O=r},e.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var o=i[n];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}n>-1&&(i=i.slice(n+1));var s=at("Patches").$;return ht(r)?s(r,i):this.produce(r,(function(a){return s(a,i)}))},t})(),_e=new cd,ud=_e.produce,zf=_e.produceWithPatches.bind(_e),qf=_e.setAutoFreeze.bind(_e),Wf=_e.setUseProxies.bind(_e),Kf=_e.applyPatches.bind(_e),Gf=_e.createDraft.bind(_e),Yf=_e.finishDraft.bind(_e),$i=ud;function Yt(t){"@babel/helpers - typeof";return Yt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yt(t)}function ja(t,e){if(Yt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(Yt(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Va(t){var e=ja(t,"string");return Yt(e)=="symbol"?e:e+""}function za(t,e,r){return(e=Va(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Zn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?qa(Object(r),!0).forEach(function(i){za(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qa(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function ue(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Wa=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),eo=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ui={INIT:"@@redux/INIT"+eo(),REPLACE:"@@redux/REPLACE"+eo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+eo()}};function dd(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function to(t,e,r){var i;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ue(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ue(1));return r(to)(t,e)}if(typeof t!="function")throw new Error(ue(2));var n=t,o=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(ue(3));return o}function d(v){if(typeof v!="function")throw new Error(ue(4));if(l)throw new Error(ue(5));var S=!0;return c(),a.push(v),function(){if(S){if(l)throw new Error(ue(6));S=!1,c();var E=a.indexOf(v);a.splice(E,1),s=null}}}function p(v){if(!dd(v))throw new Error(ue(7));if(typeof v.type>"u")throw new Error(ue(8));if(l)throw new Error(ue(9));try{l=!0,o=n(o,v)}finally{l=!1}for(var S=s=a,A=0;A<S.length;A++){var E=S[A];E()}return v}function h(v){if(typeof v!="function")throw new Error(ue(10));n=v,p({type:Ui.REPLACE})}function m(){var v,S=d;return v={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(ue(11));function O(){E.next&&E.next(u())}O();var w=S(O);return{unsubscribe:w}}},v[Wa]=function(){return this},v}return p({type:Ui.INIT}),i={dispatch:p,subscribe:d,getState:u,replaceReducer:h},i[Wa]=m,i}function pd(t){Object.keys(t).forEach(function(e){var r=t[e],i=r(void 0,{type:Ui.INIT});if(typeof i>"u")throw new Error(ue(12));if(typeof r(void 0,{type:Ui.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ue(13))})}function Ka(t){for(var e=Object.keys(t),r={},i=0;i<e.length;i++){var n=e[i];typeof t[n]=="function"&&(r[n]=t[n])}var o=Object.keys(r),s,a;try{pd(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var d;for(var p=!1,h={},m=0;m<o.length;m++){var v=o[m],S=r[v],A=c[v],E=S(A,u);if(typeof E>"u"){var O=u&&u.type;throw new Error(ue(14))}h[v]=E,p=p||E!==A}return p=p||o.length!==Object.keys(c).length,p?h:c}}function Tr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(i){return i}:e.length===1?e[0]:e.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function Ga(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),o=function(){throw new Error(ue(15))},s={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=e.map(function(l){return l(s)});return o=Tr.apply(void 0,a)(n.dispatch),Zn(Zn({},n),{},{dispatch:o})}}}function Ya(t){var e=function(i){var n=i.dispatch,o=i.getState;return function(s){return function(a){return typeof a=="function"?a(n,o,t):s(a)}}};return e}var Xa=Ya();Xa.withExtraArgument=Ya;var ro=Xa;var tl=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),fd=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(u){c=[6,u],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Rr=function(t,e){for(var r=0,i=e.length,n=t.length;r<i;r++,n++)t[n]=e[r];return t},hd=Object.defineProperty,md=Object.defineProperties,vd=Object.getOwnPropertyDescriptors,Qa=Object.getOwnPropertySymbols,gd=Object.prototype.hasOwnProperty,yd=Object.prototype.propertyIsEnumerable,Ja=function(t,e,r){return e in t?hd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Tt=function(t,e){for(var r in e||(e={}))gd.call(e,r)&&Ja(t,r,e[r]);if(Qa)for(var i=0,n=Qa(e);i<n.length;i++){var r=n[i];yd.call(e,r)&&Ja(t,r,e[r])}return t},io=function(t,e){return md(t,vd(e))},bd=function(t,e,r){return new Promise(function(i,n){var o=function(l){try{a(r.next(l))}catch(c){n(c)}},s=function(l){try{a(r.throw(l))}catch(c){n(c)}},a=function(l){return l.done?i(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(t,e)).next())})};var xd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tr:Tr.apply(null,arguments)},fh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Sd(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Rt(t,e){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var o=e.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return Tt(Tt({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:t,payload:i[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(i){return i.type===t},r}var Ad=(function(t){tl(e,t);function e(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Rr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Rr([void 0],r.concat(this))))},e})(Array),Ed=(function(t){tl(e,t);function e(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Rr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Rr([void 0],r.concat(this))))},e})(Array);function so(t){return Ke(t)?$i(t,function(){}):t}function Cd(t){return typeof t=="boolean"}function Od(){return function(e){return wd(e)}}function wd(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,i=t.immutableCheck,n=i===void 0?!0:i,o=t.serializableCheck,s=o===void 0?!0:o,a=t.actionCreatorCheck,l=a===void 0?!0:a,c=new Ad;if(r&&(Cd(r)?c.push(ro):c.push(ro.withExtraArgument(r.extraArgument))),0){if(n)var u;if(s)var d;if(l)var p}return c}var no=!0;function rl(t){var e=Od(),r=t||{},i=r.reducer,n=i===void 0?void 0:i,o=r.middleware,s=o===void 0?e():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,d=r.enhancers,p=d===void 0?void 0:d,h;if(typeof n=="function")h=n;else if(Sd(n))h=Ka(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(e),!no&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!no&&m.some(function(w){return typeof w!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Ga.apply(void 0,m),S=Tr;l&&(S=xd(Tt({trace:!no},typeof l=="object"&&l)));var A=new Ed(v),E=A;Array.isArray(p)?E=Rr([v],p):typeof p=="function"&&(E=p(A));var O=S.apply(void 0,E);return to(h,u,O)}function il(t){var e={},r=[],i,n={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[a]=s,n},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase:function(o){return i=o,n}};return t(n),[e,r,i]}function Td(t){return typeof t=="function"}function Rd(t,e,r,i){r===void 0&&(r=[]);var n=typeof e=="function"?il(e):[e,r,i],o=n[0],s=n[1],a=n[2],l;if(Td(t))l=function(){return so(t())};else{var c=so(t);l=function(){return c}}function u(d,p){d===void 0&&(d=l());var h=Rr([o[p.type]],s.filter(function(m){var v=m.matcher;return v(p)}).map(function(m){var v=m.reducer;return v}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,v){if(v)if(ht(m)){var S=m,A=v(S,p);return A===void 0?m:A}else{if(Ke(m))return $i(m,function(E){return v(E,p)});var A=v(m,p);if(A===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return m},d)}return u.getInitialState=l,u}function _d(t,e){return t+"/"+e}function nl(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:so(t.initialState),i=t.reducers||{},n=Object.keys(i),o={},s={},a={};n.forEach(function(u){var d=i[u],p=_d(e,u),h,m;"reducer"in d?(h=d.reducer,m=d.prepare):h=d,o[u]=h,s[p]=h,a[u]=m?Rt(p,m):Rt(p)});function l(){var u=typeof t.extraReducers=="function"?il(t.extraReducers):[t.extraReducers],d=u[0],p=d===void 0?{}:d,h=u[1],m=h===void 0?[]:h,v=u[2],S=v===void 0?void 0:v,A=Tt(Tt({},p),s);return Rd(r,function(E){for(var O in A)E.addCase(O,A[O]);for(var w=0,Q=m;w<Q.length;w++){var K=Q[w];E.addMatcher(K.matcher,K.reducer)}S&&E.addDefaultCase(S)})}var c;return{name:e,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var Ld="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Pd=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Ld[Math.random()*64|0];return e},kd=["name","message","stack","code"],oo=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Za=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Nd=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,i=kd;r<i.length;r++){var n=i[r];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},gh=(function(){function t(e,r,i){var n=Rt(e+"/fulfilled",function(u,d,p,h){return{payload:u,meta:io(Tt({},h||{}),{arg:p,requestId:d,requestStatus:"fulfilled"})}}),o=Rt(e+"/pending",function(u,d,p){return{payload:void 0,meta:io(Tt({},p||{}),{arg:d,requestId:u,requestStatus:"pending"})}}),s=Rt(e+"/rejected",function(u,d,p,h,m){return{payload:h,error:(i&&i.serializeError||Nd)(u||"Rejected"),meta:io(Tt({},m||{}),{arg:p,requestId:d,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(d,p,h){var m=i?.idGenerator?i.idGenerator(u):Pd(),v=new l,S,A=!1;function E(w){S=w,v.abort()}var O=(function(){return bd(this,null,function(){var w,Q,K,yt,pn,bt,we;return fd(this,function(Ne){switch(Ne.label){case 0:return Ne.trys.push([0,4,,5]),yt=(w=i?.condition)==null?void 0:w.call(i,u,{getState:p,extra:h}),Id(yt)?[4,yt]:[3,2];case 1:yt=Ne.sent(),Ne.label=2;case 2:if(yt===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,pn=new Promise(function(Te,Mt){return v.signal.addEventListener("abort",function(){return Mt({name:"AbortError",message:S||"Aborted"})})}),d(o(m,u,(Q=i?.getPendingMeta)==null?void 0:Q.call(i,{requestId:m,arg:u},{getState:p,extra:h}))),[4,Promise.race([pn,Promise.resolve(r(u,{dispatch:d,getState:p,extra:h,requestId:m,signal:v.signal,abort:E,rejectWithValue:function(Te,Mt){return new oo(Te,Mt)},fulfillWithValue:function(Te,Mt){return new Za(Te,Mt)}})).then(function(Te){if(Te instanceof oo)throw Te;return Te instanceof Za?n(Te.payload,m,u,Te.meta):n(Te,m,u)})])];case 3:return K=Ne.sent(),[3,5];case 4:return bt=Ne.sent(),K=bt instanceof oo?s(null,m,u,bt.payload,bt.meta):s(bt,m,u),[3,5];case 5:return we=i&&!i.dispatchConditionRejection&&s.match(K)&&K.meta.condition,we||d(K),[2,K]}})})})();return Object.assign(O,{abort:E,requestId:m,arg:u,unwrap:function(){return O.then(Dd)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t})();function Dd(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Id(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ol="listener",sl="completed",al="cancelled",yh="task-"+al,bh="task-"+sl,xh=ol+"-"+al,Sh=ol+"-"+sl;var ao="listenerMiddleware";var Ah=Rt(ao+"/add"),Eh=Rt(ao+"/removeAll"),Ch=Rt(ao+"/remove");var el,Oh=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(el||(el=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Md=function(t){return function(e){setTimeout(e,t)}},wh=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Md(10);Fa();var $d=Ri(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),Fi=class extends $d(Object){};window.ftReduxStores||(window.ftReduxStores={});var ll=class t extends Fi{static get(e){var r;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[i];if(Ni(o))return o;if(n==null)return;let s=nl({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=rl({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Jr(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new _i;let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(n));return this.reduxStore.dispatch(d),d}:u=>{this.setState({[l]:n(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Bi=class{static format(e,r,i,n,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(e,r,i,n,!!o)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Hi=f(x()),Ud="ft-app-info",_r=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};_r.eventName="authentication-change";var ni=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ni.eventName="ui-locale-changed";var Fd={session:(t,e)=>{(0,Hi.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>C.dispatchEvent(new _r(e.payload)),0))}},C=Hi.FtReduxStore.get({name:Ud,reducers:Fd,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var cl=f(x()),ji=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},em=(0,cl.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(C)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>Bi.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ji([(0,lo.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),ji([(0,lo.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),ji([Un({store:C.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),ji([Un({store:C.name})],e.prototype,"uiLocale",void 0),e});var ul;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(ul||(ul={}));var dl;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(dl||(dl={}));var pl;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(pl||(pl={}));var fl;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(fl||(fl={}));var hl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(hl||(hl={}));var ml;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(ml||(ml={}));var vl;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(vl||(vl={}));var gl;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(gl||(gl={}));var yl;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(yl||(yl={}));var bl;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(bl||(bl={}));var xl;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(xl||(xl={}));var Sl;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Sl||(Sl={}));var Al;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Al||(Al={}));var El;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(El||(El={}));var Cl;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Cl||(Cl={}));var Ol;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Ol||(Ol={}));var co;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(co||(co={}));var wl;(function(t){t.ASC="ASC",t.DESC="DESC"})(wl||(wl={}));var Tl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Tl||(Tl={}));var uo;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(uo||(uo={}));var Rl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Rl||(Rl={}));var _l;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(_l||(_l={}));var Ll;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Ll||(Ll={}));var Pl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Pl||(Pl={}));var kl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(kl||(kl={}));var po;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(po||(po={}));var Nl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Nl||(Nl={}));var X;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(X||(X={}));var Fe;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Fe||(Fe={}));var Dl;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Dl||(Dl={}));var Il;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Il||(Il={}));var Ml;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Ml||(Ml={}));var $l;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})($l||($l={}));var Ul;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Ul||(Ul={}));var Fl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Fl||(Fl={}));var Bl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Bl||(Bl={}));var Hl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Hl||(Hl={}));var jl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(jl||(jl={}));var Vl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Vl||(Vl={}));var zl;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(zl||(zl={}));var ql;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ql||(ql={}));var Bd={[X.PERSONAL_BOOK_SHARE_USER]:[X.PERSONAL_BOOK_USER],[X.HTML_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.PDF_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.KHUB_ADMIN]:[X.CONTENT_PUBLISHER],[X.ADMIN]:[X.KHUB_ADMIN,X.USERS_ADMIN,X.PORTAL_ADMIN,X.BEHAVIOR_DATA_USER],[X.GENERATIVE_AI_EXPORT_USER]:[X.GENERATIVE_AI_USER]};function Wl(t,e){return t===e||(Bd[t]??[]).some(r=>Wl(r,e))}function Kl(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(i=>Wl(i,e))}var Ki=f(x());var fo=f(x());var Xt=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=C.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=C.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var Lr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Xt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Xt.await()}};var Ae=class extends Lr{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new fo.CacheRegistry,this.cache=e?n.commonCache:new fo.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var Vi=class extends Ae{async listMySearches(){let{session:e}=C.getState();return Kl(e,X.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var zi=class extends Ae{async listMyBookmarks(){let e=C.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var qi=class extends Ae{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=C.getState().session;return!!e?.sessionAuthenticated}};var Wi=class extends Ae{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=C.getState().session;return!!e?.sessionAuthenticated}};var Hd="ft-user-assets",jd={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(Fe).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:n}=e.payload;mo(t,r,[...ho(t,r),n]),Gl(t,r,1,i),Yl(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;mo(t,r,ho(t,r).map(n=>n.id===i.id?i:n)),Yl(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;mo(t,r,ho(t,r).filter(o=>o.id!==n)),Gl(t,r,-1,i)}},Xl={[Fe.SEARCHES]:"savedSearches",[Fe.BOOKMARKS]:"bookmarks",[Fe.BOOKS]:void 0,[Fe.COLLECTIONS]:void 0},ho=(t,e)=>{var r;let i=Xl[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},mo=(t,e,r)=>{let i=Xl[e];i&&(t[i]=r)},Gl=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===Fe.BOOKMARKS&&i)){let o=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Yl=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},fe=Ki.FtReduxStore.get({name:Hd,reducers:jd,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Fe).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),vo=class{constructor(e=new qi,r=new Wi){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=C.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new zi,this.savedSearchesService=new Vi,C.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=C.getState();(0,Ki.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),fe.actions.clearAssetCount(),fe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),fe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),fe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();fe.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();fe.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&fe.getState().assetCounts.allAsset[e]!==r.count&&fe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&fe.getState().assetCounts.bookmarkByMap[e]!==r.count&&fe.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(fe.getState().assetCounts.bookmarkByMap).length!==0;e===Fe.BOOKMARKS&&r&&fe.actions.clearBookmarkCountByMap(),fe.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;fe.actions.bookmarks(r)}}},Vd=new vo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Vd);var go=class{addCommand(e,r=!1){C.commands.add(e,r)}consumeCommand(e){return C.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new go;var Be=f(x());var Ql,Pr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},zd=Symbol("clearAfterUnitTest"),Gi=class extends(0,Be.withEventBus)(Ae){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ql]=()=>{this.defaultMessages={},this.cache=new Be.CacheRegistry,this.listeners={}},this.currentUiLocale=C.getState().uiLocale,C.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=C.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,Be.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new Be.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Be.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Pr({loadedContexts:e})),this.dispatchEvent(new Pr({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Pr({loadedContexts:[e]})),this.dispatchEvent(new Pr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,Be.delay)(0).then(()=>i()).catch(()=>null)))}};Ql=zd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Gi{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Gi{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var kr=window.FluidTopicsI18nService,Yi=window.FluidTopicsCustomI18nService;var Jl=f(x()),yo=class{highlightHtml(e,r,i){(0,Jl.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new yo;var Zl=f(x());var bo=class{isDate(e){var r,i,n,o;return(o=(n=((i=(r=C.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(e,r){var i,n,o,s;if(e==null)return"";try{return Zl.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:C.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new bo;var ec=f(x());var oi=class{static get(e,r){var i,n;let o=C.getState(),{lang:s,region:a}=(n=(i=o.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new ec.SearchPlaceConverter(o.baseUrl,e??20,o.searchInAllLanguagesAllowed,r??`${s}-${a}`)}};var xo=class{urlToSearchRequest(e){return oi.get().parse(e)}searchRequestToUrl(e){return oi.get().serialize(e)}};window.FluidTopicsUrlService=new xo;var mt=f(x());var Qt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Qt.eventName="change";var So=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},tc=new So;var Xi=class t extends mt.WithEventBus{static build(){return new t(window.history,tc,()=>window.location,!1)}constructor(e,r,i,n){var o,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,mt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Qt(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(Qt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Qt.eventName,e)}currentItem(){return(0,mt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,mt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,mt.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,mt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Xi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var rc=f(_());var ic=rc.css`
584
+ `;var zs=["top","right","bottom","left"],Vs=["start","end"],_n=zs.reduce((t,e)=>t.concat(e,e+"-"+Vs[0],e+"-"+Vs[1]),[]),Kr=Math.min,At=Math.max,Gr=Math.round;var We=t=>({x:t,y:t}),ku={left:"right",right:"left",bottom:"top",top:"bottom"};function Ln(t,e,r){return At(t,Kr(e,r))}function bi(t,e){return typeof t=="function"?t(e):t}function yr(t){return t.split("-")[0]}function Et(t){return t.split("-")[1]}function Pn(t){return t==="x"?"y":"x"}function kn(t){return t==="y"?"height":"width"}function xi(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Nn(t){return Pn(xi(t))}function qs(t,e,r){r===void 0&&(r=!1);let i=Et(t),n=Nn(t),o=kn(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Rn(s)),[s,Rn(s)]}function Ws(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Rn(t){let e=yr(t);return ku[e]+t.slice(e.length)}function Nu(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ks(t){return typeof t!="number"?Nu(t):{top:t,right:t,bottom:t,left:t}}function jt(t){let{x:e,y:r,width:i,height:n}=t;return{width:i,height:n,top:r,left:e,right:e+i,bottom:r+n,x:e,y:r}}function Gs(t,e,r){let{reference:i,floating:n}=t,o=xi(e),s=Nn(e),a=kn(s),l=yr(e),c=o==="y",u=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:u,y:i.y-n.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:d};break;case"left":h={x:i.x-n.width,y:d};break;default:h={x:i.x,y:i.y}}switch(Et(e)){case"start":h[s]-=p*(r&&c?-1:1);break;case"end":h[s]+=p*(r&&c?-1:1);break}return h}async function Ys(t,e){var r;e===void 0&&(e={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=bi(e,t),m=Ks(h),S=a[p?d==="floating"?"reference":"floating":d],A=jt(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(S)))==null||r?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),E=d==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),w=await(o.isElement==null?void 0:o.isElement(O))?await(o.getScale==null?void 0:o.getScale(O))||{x:1,y:1}:{x:1,y:1},Q=jt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:O,strategy:l}):E);return{top:(A.top-Q.top+m.top)/w.y,bottom:(Q.bottom-A.bottom+m.bottom)/w.y,left:(A.left-Q.left+m.left)/w.x,right:(Q.right-A.right+m.right)/w.x}}var Du=50,Xs=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Ys},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:d}=Gs(c,i,l),p=i,h=0,m={};for(let v=0;v<o.length;v++){let S=o[v];if(!S)continue;let{name:A,fn:E}=S,{x:O,y:w,data:Q,reset:K}=await E({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:e}});u=O??u,d=w??d,m[A]={...m[A],...Q},K&&h<Du&&(h++,typeof K=="object"&&(K.placement&&(p=K.placement),K.rects&&(c=K.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:n}):K.rects),{x:u,y:d}=Gs(c,p,l)),v=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:m}};function Iu(t,e,r){return(t?[...r.filter(n=>Et(n)===t),...r.filter(n=>Et(n)!==t)]:r.filter(n=>yr(n)===n)).filter(n=>t?Et(n)===t||(e?Ws(n)!==n:!1):!0)}var Qs=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:p=_n,autoAlignment:h=!0,...m}=bi(t,e),v=d!==void 0||p===_n?Iu(d||null,h,p):p,S=await l.detectOverflow(e,m),A=((r=s.autoPlacement)==null?void 0:r.index)||0,E=v[A];if(E==null)return{};let O=qs(E,o,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==E)return{reset:{placement:v[0]}};let w=[S[yr(E)],S[O[0]],S[O[1]]],Q=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:E,overflows:w}],K=v[A+1];if(K)return{data:{index:A+1,overflows:Q},reset:{placement:K}};let yt=Q.map(we=>{let Ne=Et(we.placement);return[we.placement,Ne&&u?we.overflows.slice(0,2).reduce((Te,Mt)=>Te+Mt,0):we.overflows[0],we.overflows]}).sort((we,Ne)=>we[1]-Ne[1]),bt=((n=yt.filter(we=>we[2].slice(0,Et(we[0])?2:3).every(Ne=>Ne<=0))[0])==null?void 0:n[0])||yt[0][0];return bt!==a?{data:{index:A+1,overflows:Q},reset:{placement:bt}}:{}}}};var Js=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:n,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:A=>{let{x:E,y:O}=A;return{x:E,y:O}}},...c}=bi(t,e),u={x:r,y:i},d=await o.detectOverflow(e,c),p=xi(yr(n)),h=Pn(p),m=u[h],v=u[p];if(s){let A=h==="y"?"top":"left",E=h==="y"?"bottom":"right",O=m+d[A],w=m-d[E];m=Ln(O,m,w)}if(a){let A=p==="y"?"top":"left",E=p==="y"?"bottom":"right",O=v+d[A],w=v-d[E];v=Ln(O,v,w)}let S=l.fn({...e,[h]:m,[p]:v});return{...S,data:{x:S.x-r,y:S.y-i,enabled:{[h]:s,[p]:a}}}}}};function Ai(){return typeof window<"u"}function zt(t){return ea(t)?(t.nodeName||"").toLowerCase():"#document"}function Se(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function nt(t){var e;return(e=(ea(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ea(t){return Ai()?t instanceof Node||t instanceof Se(t).Node:!1}function Me(t){return Ai()?t instanceof Element||t instanceof Se(t).Element:!1}function ot(t){return Ai()?t instanceof HTMLElement||t instanceof Se(t).HTMLElement:!1}function Zs(t){return!Ai()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Se(t).ShadowRoot}function br(t){let{overflow:e,overflowX:r,overflowY:i,display:n}=$e(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&n!=="inline"&&n!=="contents"}function ta(t){return/^(table|td|th)$/.test(zt(t))}function Yr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Mu=/transform|translate|scale|rotate|perspective|filter/,$u=/paint|layout|strict|content/,Vt=t=>!!t&&t!=="none",Dn;function xr(t){let e=Me(t)?$e(t):t;return Vt(e.transform)||Vt(e.translate)||Vt(e.scale)||Vt(e.rotate)||Vt(e.perspective)||!Ei()&&(Vt(e.backdropFilter)||Vt(e.filter))||Mu.test(e.willChange||"")||$u.test(e.contain||"")}function ra(t){let e=ft(t);for(;ot(e)&&!qt(e);){if(xr(e))return e;if(Yr(e))return null;e=ft(e)}return null}function Ei(){return Dn==null&&(Dn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dn}function qt(t){return/^(html|body|#document)$/.test(zt(t))}function $e(t){return Se(t).getComputedStyle(t)}function Xr(t){return Me(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ft(t){if(zt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Zs(t)&&t.host||nt(t);return Zs(e)?e.host:e}function ia(t){let e=ft(t);return qt(e)?t.ownerDocument?t.ownerDocument.body:t.body:ot(e)&&br(e)?e:ia(e)}function Si(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=ia(t),o=n===((i=t.ownerDocument)==null?void 0:i.body),s=Se(n);if(o){let a=Ci(s);return e.concat(s,s.visualViewport||[],br(n)?n:[],a&&r?Si(a):[])}else return e.concat(n,Si(n,[],r))}function Ci(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function aa(t){let e=$e(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=ot(t),o=n?t.offsetWidth:r,s=n?t.offsetHeight:i,a=Gr(r)!==o||Gr(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function la(t){return Me(t)?t:t.contextElement}function Sr(t){let e=la(t);if(!ot(e))return We(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:o}=aa(e),s=(o?Gr(r.width):r.width)/i,a=(o?Gr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Uu=We(0);function ca(t){let e=Se(t);return!Ei()||!e.visualViewport?Uu:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Fu(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Se(t)?!1:e}function Qr(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),o=la(t),s=We(1);e&&(i?Me(i)&&(s=Sr(i)):s=Sr(t));let a=Fu(o,r,i)?ca(o):We(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,u=n.width/s.x,d=n.height/s.y;if(o){let p=Se(o),h=i&&Me(i)?Se(i):i,m=p,v=Ci(m);for(;v&&i&&h!==m;){let S=Sr(v),A=v.getBoundingClientRect(),E=$e(v),O=A.left+(v.clientLeft+parseFloat(E.paddingLeft))*S.x,w=A.top+(v.clientTop+parseFloat(E.paddingTop))*S.y;l*=S.x,c*=S.y,u*=S.x,d*=S.y,l+=O,c+=w,m=Se(v),v=Ci(m)}}return jt({width:u,height:d,x:l,y:c})}function Oi(t,e){let r=Xr(t).scrollLeft;return e?e.left+r:Qr(nt(t)).left+r}function ua(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-Oi(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function Bu(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,o=n==="fixed",s=nt(i),a=e?Yr(e.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=We(1),u=We(0),d=ot(i);if((d||!d&&!o)&&((zt(i)!=="body"||br(s))&&(l=Xr(i)),d)){let h=Qr(i);c=Sr(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}let p=s&&!d&&!o?ua(s,l):We(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function Hu(t){return Array.from(t.getClientRects())}function ju(t){let e=nt(t),r=Xr(t),i=t.ownerDocument.body,n=At(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=At(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),s=-r.scrollLeft+Oi(t),a=-r.scrollTop;return $e(i).direction==="rtl"&&(s+=At(e.clientWidth,i.clientWidth)-n),{width:n,height:o,x:s,y:a}}var na=25;function Vu(t,e){let r=Se(t),i=nt(t),n=r.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(n){o=n.width,s=n.height;let u=Ei();(!u||u&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}let c=Oi(i);if(c<=0){let u=i.ownerDocument,d=u.body,p=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(i.clientWidth-d.clientWidth-h);m<=na&&(o-=m)}else c<=na&&(o+=c);return{width:o,height:s,x:a,y:l}}function zu(t,e){let r=Qr(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,o=ot(t)?Sr(t):We(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function oa(t,e,r){let i;if(e==="viewport")i=Vu(t,r);else if(e==="document")i=ju(nt(t));else if(Me(e))i=zu(e,r);else{let n=ca(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return jt(i)}function da(t,e){let r=ft(t);return r===e||!Me(r)||qt(r)?!1:$e(r).position==="fixed"||da(r,e)}function qu(t,e){let r=e.get(t);if(r)return r;let i=Si(t,[],!1).filter(a=>Me(a)&&zt(a)!=="body"),n=null,o=$e(t).position==="fixed",s=o?ft(t):t;for(;Me(s)&&!qt(s);){let a=$e(s),l=xr(s);!l&&a.position==="fixed"&&(n=null),(o?!l&&!n:!l&&a.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||br(s)&&!l&&da(t,s))?i=i.filter(u=>u!==s):n=a,s=ft(s)}return e.set(t,i),i}function Wu(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,s=[...r==="clippingAncestors"?Yr(e)?[]:qu(e,this._c):[].concat(r),i],a=oa(e,s[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let h=oa(e,s[p],n);l=At(h.top,l),c=Kr(h.right,c),u=Kr(h.bottom,u),d=At(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Ku(t){let{width:e,height:r}=aa(t);return{width:e,height:r}}function Gu(t,e,r){let i=ot(e),n=nt(e),o=r==="fixed",s=Qr(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=We(0);function c(){l.x=Oi(n)}if(i||!i&&!o)if((zt(e)!=="body"||br(n))&&(a=Xr(e)),i){let h=Qr(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else n&&c();o&&!i&&n&&c();let u=n&&!i&&!o?ua(n,a):We(0),d=s.left+a.scrollLeft-l.x-u.x,p=s.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:s.width,height:s.height}}function In(t){return $e(t).position==="static"}function sa(t,e){if(!ot(t)||$e(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return nt(t)===r&&(r=r.ownerDocument.body),r}function pa(t,e){let r=Se(t);if(Yr(t))return r;if(!ot(t)){let n=ft(t);for(;n&&!qt(n);){if(Me(n)&&!In(n))return n;n=ft(n)}return r}let i=sa(t,e);for(;i&&ta(i)&&In(i);)i=sa(i,e);return i&&qt(i)&&In(i)&&!xr(i)?r:i||ra(t)||r}var Yu=async function(t){let e=this.getOffsetParent||pa,r=this.getDimensions,i=await r(t.floating);return{reference:Gu(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Xu(t){return $e(t).direction==="rtl"}var wi={convertOffsetParentRelativeRectToViewportRelativeRect:Bu,getDocumentElement:nt,getClippingRect:Wu,getOffsetParent:pa,getElementRects:Yu,getClientRects:Hu,getDimensions:Ku,getScale:Sr,isElement:Me,isRTL:Xu};var fa=Qs,ha=Js;var ma=(t,e,r)=>{let i=new Map,n={platform:wi,...r},o={...n.platform,_c:i};return Xs(t,e,{...n,platform:o})};function va(t){return Qu(t)}function Mn(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Qu(t){for(let e=t;e;e=Mn(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Mn(t);e;e=Mn(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||xr(r)||e.tagName==="BODY"))return e}return null}async function ga(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},ma(t,e,{strategy:i.strategy,platform:{...wi,getOffsetParent:n=>wi.getOffsetParent(n,va)},middleware:[ha({crossAxis:!0}),fa({allowedPlacements:[i.placement]})]})}var Dr=f(x());var lo=f(B());var ya=f(B(),1);var $n=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function ba(t,e){return(0,ya.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Jr(t);try{return JSON.parse(r)}catch{return Jr(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Zr,...e??{}})}function Ju(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Ti(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Ti(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(r=o.length,r!==n(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!Ti(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Ti(t,e){try{return Ju(t,e)}catch{return!1}}function Zr(t,e){return!Ti(t,e)}function Jr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Ri(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let n=e(i);return n[t]=!0,n}}var xa=f(B(),1);var Un=t=>{let e=t??{};return(r,i)=>{var n;let o={hasChanged:Zr,attribute:!1,...e};(0,xa.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[i]),store:e.store})}};var _i=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var Wt=f(B(),1);var Li=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Aa=f(_(),1);var Pi=globalThis,Zu=Pi.ShadowRoot&&(Pi.ShadyCSS===void 0||Pi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Sa=(t,e)=>{if(Zu)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let i=document.createElement("style"),n=Pi.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}};var ki=class extends Aa.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return Sa(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){$n(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Ea(t,e,...r){var i;let n=t.querySelector(e);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var Er=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Ta,Ca=Symbol("constructorPrototype"),Oa=Symbol("constructorName"),Ra=Symbol("exportpartsDebouncer"),wa=Symbol("dynamicDependenciesLoaded"),Ar=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Ar.eventName="exportparts-updated";var st=class extends ki{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ta]=new Li(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Ra].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Oa]=this.constructor.name,this[Ca]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Oa]&&Object.setPrototypeOf(this,this[Ca])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[wa]||(r[wa]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Ar.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Ar.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Ar)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=Ea(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,i,n,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&a!==void 0?a:[],v=[...h,...m].filter(l).map(S=>S.trim());for(let S of v)u.add(S)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(h=>`${p}:${h}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};Ta=Ra;Er([(0,Wt.property)()],st.prototype,"exportpartsPrefix",void 0);Er([ba([])],st.prototype,"exportpartsPrefixes",void 0);Er([(0,Wt.property)({reflect:!0})],st.prototype,"exportparts",void 0);Er([(0,Wt.property)()],st.prototype,"customStylesheet",void 0);Er([(0,Wt.property)()],st.prototype,"elementToFocus",void 0);Er([(0,Wt.state)()],st.prototype,"useAdoptedStyleSheets",void 0);function Ni(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ei=Symbol("internalReduxEventsUnsubscribers"),Ct=Symbol("internalStoresUnsubscribers"),Kt=Symbol("internalStores"),ed=Ri(Symbol("withRedux"),function(t){var e,r,i;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Kt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Kt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Kt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Kt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Kt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Kt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[Ct].has(s.store):this[Ct].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[Ct].set(s,a.subscribe(()=>this.updateFromStores())),this[ei].set(s,[]),Ni(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[ei].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ct].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[Ct].has(s)&&this[Ct].get(s)(),this[Ct].delete(s),(a=this[ei].get(s))===null||a===void 0||a.forEach(l=>l()),this[ei].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Ct,r=Kt,i=ei,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),_a=class extends ed(st){};function Ue(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];if(0)var n,o;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ht(t){return!!t&&!!t[U]}function Ke(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===ld})(t)||Array.isArray(t)||!!t[Ma]||!!(!((e=t.constructor)===null||e===void 0)&&e[Ma])||Kn(t)||Gn(t))}function Gt(t,e,r){r===void 0&&(r=!1),wr(t)===0?(r?Object.keys:Or)(t).forEach((function(i){r&&typeof i=="symbol"||e(i,t[i],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function wr(t){var e=t[U];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Kn(t)?2:Gn(t)?3:0}function Cr(t,e){return wr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function td(t,e){return wr(t)===2?t.get(e):t[e]}function $a(t,e,r){var i=wr(t);i===2?t.set(e,r):i===3?t.add(r):t[e]=r}function Ua(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Kn(t){return sd&&t instanceof Map}function Gn(t){return ad&&t instanceof Set}function Ot(t){return t.o||t.t}function Yn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Ha(t);delete e[U];for(var r=Or(e),i=0;i<r.length;i++){var n=r[i],o=e[n];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function Xn(t,e){return e===void 0&&(e=!1),Qn(t)||ht(t)||!Ke(t)||(wr(t)>1&&(t.set=t.add=t.clear=t.delete=rd),Object.freeze(t),e&&Gt(t,(function(r,i){return Xn(i,!0)}),!0)),t}function rd(){Ue(2)}function Qn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function at(t){var e=Wn[t];return e||Ue(18,t),e}function id(t,e){Wn[t]||(Wn[t]=e)}function Vn(){return ri}function Fn(t,e){e&&(at("Patches"),t.u=[],t.s=[],t.v=e)}function Di(t){zn(t),t.p.forEach(nd),t.p=null}function zn(t){t===ri&&(ri=t.l)}function La(t){return ri={p:[],l:ri,h:t,m:!0,_:0}}function nd(t){var e=t[U];e.i===0||e.i===1?e.j():e.g=!0}function Bn(t,e){e._=e.p.length;var r=e.p[0],i=t!==void 0&&t!==r;return e.h.O||at("ES5").S(e,t,i),i?(r[U].P&&(Di(e),Ue(4)),Ke(t)&&(t=Ii(e,t),e.l||Mi(e,t)),e.u&&at("Patches").M(r[U].t,t,e.u,e.s)):t=Ii(e,r,[]),Di(e),e.u&&e.v(e.u,e.s),t!==Ba?t:void 0}function Ii(t,e,r){if(Qn(e))return e;var i=e[U];if(!i)return Gt(e,(function(a,l){return Pa(t,i,e,a,l,r)}),!0),e;if(i.A!==t)return e;if(!i.P)return Mi(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=Yn(i.k):i.o,o=n,s=!1;i.i===3&&(o=new Set(n),n.clear(),s=!0),Gt(o,(function(a,l){return Pa(t,i,n,a,l,r,s)})),Mi(t,n,!1),r&&t.u&&at("Patches").N(i,r,t.u,t.s)}return i.o}function Pa(t,e,r,i,n,o,s){if(ht(n)){var a=Ii(t,n,o&&e&&e.i!==3&&!Cr(e.R,i)?o.concat(i):void 0);if($a(r,i,a),!ht(a))return;t.m=!1}else s&&r.add(n);if(Ke(n)&&!Qn(n)){if(!t.h.D&&t._<1)return;Ii(t,n),e&&e.A.l||Mi(t,n)}}function Mi(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Xn(e,r)}function Hn(t,e){var r=t[U];return(r?Ot(r):t)[e]}function ka(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Object.getPrototypeOf(r)}}function wt(t){t.P||(t.P=!0,t.l&&wt(t.l))}function jn(t){t.o||(t.o=Yn(t.t))}function qn(t,e,r){var i=Kn(e)?at("MapSet").F(e,r):Gn(e)?at("MapSet").T(e,r):t.O?(function(n,o){var s=Array.isArray(n),a={i:s?1:0,A:o?o.A:Vn(),P:!1,I:!1,R:{},l:o,t:n,k:null,o:null,j:null,C:!1},l=a,c=ii;s&&(l=[a],c=ti);var u=Proxy.revocable(l,c),d=u.revoke,p=u.proxy;return a.k=p,a.j=d,p})(e,r):at("ES5").J(e,r);return(r?r.A:Vn()).p.push(i),i}function od(t){return ht(t)||Ue(22,t),(function e(r){if(!Ke(r))return r;var i,n=r[U],o=wr(r);if(n){if(!n.P&&(n.i<4||!at("ES5").K(n)))return n.t;n.I=!0,i=Na(r,o),n.I=!1}else i=Na(r,o);return Gt(i,(function(s,a){n&&td(n.t,s)===a||$a(i,s,e(a))})),o===3?new Set(i):i})(t)}function Na(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Yn(t)}function Fa(){function t(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[U];return ii.get(c,s)},set:function(c){var u=this[U];ii.set(u,s,c)}},l}function e(s){for(var a=s.length-1;a>=0;a--){var l=s[a][U];if(!l.P)switch(l.i){case 5:i(l)&&wt(l);break;case 4:r(l)&&wt(l)}}}function r(s){for(var a=s.t,l=s.k,c=Or(l),u=c.length-1;u>=0;u--){var d=c[u];if(d!==U){var p=a[d];if(p===void 0&&!Cr(a,d))return!0;var h=l[d],m=h&&h[U];if(m?m.t!==p:!Ua(h,p))return!0}}var v=!!a[U];return c.length!==Or(a).length+(v?0:1)}function i(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function n(s){s.g&&Ue(3,JSON.stringify(Ot(s)))}var o={};id("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(d,p){if(d){for(var h=Array(p.length),m=0;m<p.length;m++)Object.defineProperty(h,""+m,t(m,!0));return h}var v=Ha(p);delete v[U];for(var S=Or(v),A=0;A<S.length;A++){var E=S[A];v[E]=t(E,d||!!v[E].enumerable)}return Object.create(Object.getPrototypeOf(p),v)})(l,s),u={i:l?5:4,A:a?a.A:Vn(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,U,{value:u,writable:!0}),c},S:function(s,a,l){l?ht(a)&&a[U].A===s&&e(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var d=u[U];if(d){var p=d.t,h=d.k,m=d.R,v=d.i;if(v===4)Gt(h,(function(w){w!==U&&(p[w]!==void 0||Cr(p,w)?m[w]||c(h[w]):(m[w]=!0,wt(d)))})),Gt(p,(function(w){h[w]!==void 0||Cr(h,w)||(m[w]=!1,wt(d))}));else if(v===5){if(i(d)&&(wt(d),m.length=!0),h.length<p.length)for(var S=h.length;S<p.length;S++)m[S]=!1;else for(var A=p.length;A<h.length;A++)m[A]=!0;for(var E=Math.min(h.length,p.length),O=0;O<E;O++)h.hasOwnProperty(O)||(m[O]=!0),m[O]===void 0&&c(h[O])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var Da,ri,Jn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",sd=typeof Map<"u",ad=typeof Set<"u",Ia=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ba=Jn?Symbol.for("immer-nothing"):((Da={})["immer-nothing"]=!0,Da),Ma=Jn?Symbol.for("immer-draftable"):"__$immer_draftable",U=Jn?Symbol.for("immer-state"):"__$immer_state";var ld=""+Object.prototype.constructor,Or=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ha=Object.getOwnPropertyDescriptors||function(t){var e={};return Or(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Wn={},ii={get:function(t,e){if(e===U)return t;var r=Ot(t);if(!Cr(r,e))return(function(n,o,s){var a,l=ka(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(n.k):void 0})(t,r,e);var i=r[e];return t.I||!Ke(i)?i:i===Hn(t.t,e)?(jn(t),t.o[e]=qn(t.A.h,i,t)):i},has:function(t,e){return e in Ot(t)},ownKeys:function(t){return Reflect.ownKeys(Ot(t))},set:function(t,e,r){var i=ka(Ot(t),e);if(i?.set)return i.set.call(t.k,r),!0;if(!t.P){var n=Hn(Ot(t),e),o=n?.[U];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Ua(r,n)&&(r!==void 0||Cr(t.t,e)))return!0;jn(t),wt(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Hn(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,jn(t),wt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Ot(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:i.enumerable,value:r[e]}},defineProperty:function(){Ue(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ue(12)}},ti={};Gt(ii,(function(t,e){ti[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),ti.deleteProperty=function(t,e){return ti.set.call(this,t,e,void 0)},ti.set=function(t,e,r){return ii.set.call(this,t[0],e,r,t[0])};var cd=(function(){function t(r){var i=this;this.O=Ia,this.D=!0,this.produce=function(n,o,s){if(typeof n=="function"&&typeof o!="function"){var a=o;o=n;var l=i;return function(v){var S=this;v===void 0&&(v=a);for(var A=arguments.length,E=Array(A>1?A-1:0),O=1;O<A;O++)E[O-1]=arguments[O];return l.produce(v,(function(w){var Q;return(Q=o).call.apply(Q,[S,w].concat(E))}))}}var c;if(typeof o!="function"&&Ue(6),s!==void 0&&typeof s!="function"&&Ue(7),Ke(n)){var u=La(i),d=qn(i,n,void 0),p=!0;try{c=o(d),p=!1}finally{p?Di(u):zn(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(v){return Fn(u,s),Bn(v,u)}),(function(v){throw Di(u),v})):(Fn(u,s),Bn(c,u))}if(!n||typeof n!="object"){if((c=o(n))===void 0&&(c=n),c===Ba&&(c=void 0),i.D&&Xn(c,!0),s){var h=[],m=[];at("Patches").M(n,c,h,m),s(h,m)}return c}Ue(21,n)},this.produceWithPatches=function(n,o){if(typeof n=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];return i.produceWithPatches(c,(function(h){return n.apply(void 0,[h].concat(d))}))};var s,a,l=i.produce(n,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Ke(r)||Ue(8),ht(r)&&(r=od(r));var i=La(this),n=qn(this,r,void 0);return n[U].C=!0,zn(i),n},e.finishDraft=function(r,i){var n=r&&r[U],o=n.A;return Fn(o,i),Bn(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Ia&&Ue(20),this.O=r},e.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var o=i[n];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}n>-1&&(i=i.slice(n+1));var s=at("Patches").$;return ht(r)?s(r,i):this.produce(r,(function(a){return s(a,i)}))},t})(),_e=new cd,ud=_e.produce,zf=_e.produceWithPatches.bind(_e),qf=_e.setAutoFreeze.bind(_e),Wf=_e.setUseProxies.bind(_e),Kf=_e.applyPatches.bind(_e),Gf=_e.createDraft.bind(_e),Yf=_e.finishDraft.bind(_e),$i=ud;function Yt(t){"@babel/helpers - typeof";return Yt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yt(t)}function ja(t,e){if(Yt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(Yt(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Va(t){var e=ja(t,"string");return Yt(e)=="symbol"?e:e+""}function za(t,e,r){return(e=Va(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Zn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?qa(Object(r),!0).forEach(function(i){za(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qa(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function ue(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Wa=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),eo=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ui={INIT:"@@redux/INIT"+eo(),REPLACE:"@@redux/REPLACE"+eo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+eo()}};function dd(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function to(t,e,r){var i;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ue(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ue(1));return r(to)(t,e)}if(typeof t!="function")throw new Error(ue(2));var n=t,o=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(ue(3));return o}function d(v){if(typeof v!="function")throw new Error(ue(4));if(l)throw new Error(ue(5));var S=!0;return c(),a.push(v),function(){if(S){if(l)throw new Error(ue(6));S=!1,c();var E=a.indexOf(v);a.splice(E,1),s=null}}}function p(v){if(!dd(v))throw new Error(ue(7));if(typeof v.type>"u")throw new Error(ue(8));if(l)throw new Error(ue(9));try{l=!0,o=n(o,v)}finally{l=!1}for(var S=s=a,A=0;A<S.length;A++){var E=S[A];E()}return v}function h(v){if(typeof v!="function")throw new Error(ue(10));n=v,p({type:Ui.REPLACE})}function m(){var v,S=d;return v={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(ue(11));function O(){E.next&&E.next(u())}O();var w=S(O);return{unsubscribe:w}}},v[Wa]=function(){return this},v}return p({type:Ui.INIT}),i={dispatch:p,subscribe:d,getState:u,replaceReducer:h},i[Wa]=m,i}function pd(t){Object.keys(t).forEach(function(e){var r=t[e],i=r(void 0,{type:Ui.INIT});if(typeof i>"u")throw new Error(ue(12));if(typeof r(void 0,{type:Ui.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ue(13))})}function Ka(t){for(var e=Object.keys(t),r={},i=0;i<e.length;i++){var n=e[i];typeof t[n]=="function"&&(r[n]=t[n])}var o=Object.keys(r),s,a;try{pd(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var d;for(var p=!1,h={},m=0;m<o.length;m++){var v=o[m],S=r[v],A=c[v],E=S(A,u);if(typeof E>"u"){var O=u&&u.type;throw new Error(ue(14))}h[v]=E,p=p||E!==A}return p=p||o.length!==Object.keys(c).length,p?h:c}}function Tr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(i){return i}:e.length===1?e[0]:e.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function Ga(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),o=function(){throw new Error(ue(15))},s={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=e.map(function(l){return l(s)});return o=Tr.apply(void 0,a)(n.dispatch),Zn(Zn({},n),{},{dispatch:o})}}}function Ya(t){var e=function(i){var n=i.dispatch,o=i.getState;return function(s){return function(a){return typeof a=="function"?a(n,o,t):s(a)}}};return e}var Xa=Ya();Xa.withExtraArgument=Ya;var ro=Xa;var tl=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),fd=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(u){c=[6,u],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Rr=function(t,e){for(var r=0,i=e.length,n=t.length;r<i;r++,n++)t[n]=e[r];return t},hd=Object.defineProperty,md=Object.defineProperties,vd=Object.getOwnPropertyDescriptors,Qa=Object.getOwnPropertySymbols,gd=Object.prototype.hasOwnProperty,yd=Object.prototype.propertyIsEnumerable,Ja=function(t,e,r){return e in t?hd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Tt=function(t,e){for(var r in e||(e={}))gd.call(e,r)&&Ja(t,r,e[r]);if(Qa)for(var i=0,n=Qa(e);i<n.length;i++){var r=n[i];yd.call(e,r)&&Ja(t,r,e[r])}return t},io=function(t,e){return md(t,vd(e))},bd=function(t,e,r){return new Promise(function(i,n){var o=function(l){try{a(r.next(l))}catch(c){n(c)}},s=function(l){try{a(r.throw(l))}catch(c){n(c)}},a=function(l){return l.done?i(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(t,e)).next())})};var xd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tr:Tr.apply(null,arguments)},fh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Sd(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Rt(t,e){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var o=e.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return Tt(Tt({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:t,payload:i[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(i){return i.type===t},r}var Ad=(function(t){tl(e,t);function e(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Rr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Rr([void 0],r.concat(this))))},e})(Array),Ed=(function(t){tl(e,t);function e(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Rr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Rr([void 0],r.concat(this))))},e})(Array);function so(t){return Ke(t)?$i(t,function(){}):t}function Cd(t){return typeof t=="boolean"}function Od(){return function(e){return wd(e)}}function wd(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,i=t.immutableCheck,n=i===void 0?!0:i,o=t.serializableCheck,s=o===void 0?!0:o,a=t.actionCreatorCheck,l=a===void 0?!0:a,c=new Ad;if(r&&(Cd(r)?c.push(ro):c.push(ro.withExtraArgument(r.extraArgument))),0){if(n)var u;if(s)var d;if(l)var p}return c}var no=!0;function rl(t){var e=Od(),r=t||{},i=r.reducer,n=i===void 0?void 0:i,o=r.middleware,s=o===void 0?e():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,d=r.enhancers,p=d===void 0?void 0:d,h;if(typeof n=="function")h=n;else if(Sd(n))h=Ka(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(e),!no&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!no&&m.some(function(w){return typeof w!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Ga.apply(void 0,m),S=Tr;l&&(S=xd(Tt({trace:!no},typeof l=="object"&&l)));var A=new Ed(v),E=A;Array.isArray(p)?E=Rr([v],p):typeof p=="function"&&(E=p(A));var O=S.apply(void 0,E);return to(h,u,O)}function il(t){var e={},r=[],i,n={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[a]=s,n},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase:function(o){return i=o,n}};return t(n),[e,r,i]}function Td(t){return typeof t=="function"}function Rd(t,e,r,i){r===void 0&&(r=[]);var n=typeof e=="function"?il(e):[e,r,i],o=n[0],s=n[1],a=n[2],l;if(Td(t))l=function(){return so(t())};else{var c=so(t);l=function(){return c}}function u(d,p){d===void 0&&(d=l());var h=Rr([o[p.type]],s.filter(function(m){var v=m.matcher;return v(p)}).map(function(m){var v=m.reducer;return v}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,v){if(v)if(ht(m)){var S=m,A=v(S,p);return A===void 0?m:A}else{if(Ke(m))return $i(m,function(E){return v(E,p)});var A=v(m,p);if(A===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return m},d)}return u.getInitialState=l,u}function _d(t,e){return t+"/"+e}function nl(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:so(t.initialState),i=t.reducers||{},n=Object.keys(i),o={},s={},a={};n.forEach(function(u){var d=i[u],p=_d(e,u),h,m;"reducer"in d?(h=d.reducer,m=d.prepare):h=d,o[u]=h,s[p]=h,a[u]=m?Rt(p,m):Rt(p)});function l(){var u=typeof t.extraReducers=="function"?il(t.extraReducers):[t.extraReducers],d=u[0],p=d===void 0?{}:d,h=u[1],m=h===void 0?[]:h,v=u[2],S=v===void 0?void 0:v,A=Tt(Tt({},p),s);return Rd(r,function(E){for(var O in A)E.addCase(O,A[O]);for(var w=0,Q=m;w<Q.length;w++){var K=Q[w];E.addMatcher(K.matcher,K.reducer)}S&&E.addDefaultCase(S)})}var c;return{name:e,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var Ld="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Pd=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Ld[Math.random()*64|0];return e},kd=["name","message","stack","code"],oo=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Za=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Nd=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,i=kd;r<i.length;r++){var n=i[r];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},gh=(function(){function t(e,r,i){var n=Rt(e+"/fulfilled",function(u,d,p,h){return{payload:u,meta:io(Tt({},h||{}),{arg:p,requestId:d,requestStatus:"fulfilled"})}}),o=Rt(e+"/pending",function(u,d,p){return{payload:void 0,meta:io(Tt({},p||{}),{arg:d,requestId:u,requestStatus:"pending"})}}),s=Rt(e+"/rejected",function(u,d,p,h,m){return{payload:h,error:(i&&i.serializeError||Nd)(u||"Rejected"),meta:io(Tt({},m||{}),{arg:p,requestId:d,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(d,p,h){var m=i?.idGenerator?i.idGenerator(u):Pd(),v=new l,S,A=!1;function E(w){S=w,v.abort()}var O=(function(){return bd(this,null,function(){var w,Q,K,yt,pn,bt,we;return fd(this,function(Ne){switch(Ne.label){case 0:return Ne.trys.push([0,4,,5]),yt=(w=i?.condition)==null?void 0:w.call(i,u,{getState:p,extra:h}),Id(yt)?[4,yt]:[3,2];case 1:yt=Ne.sent(),Ne.label=2;case 2:if(yt===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,pn=new Promise(function(Te,Mt){return v.signal.addEventListener("abort",function(){return Mt({name:"AbortError",message:S||"Aborted"})})}),d(o(m,u,(Q=i?.getPendingMeta)==null?void 0:Q.call(i,{requestId:m,arg:u},{getState:p,extra:h}))),[4,Promise.race([pn,Promise.resolve(r(u,{dispatch:d,getState:p,extra:h,requestId:m,signal:v.signal,abort:E,rejectWithValue:function(Te,Mt){return new oo(Te,Mt)},fulfillWithValue:function(Te,Mt){return new Za(Te,Mt)}})).then(function(Te){if(Te instanceof oo)throw Te;return Te instanceof Za?n(Te.payload,m,u,Te.meta):n(Te,m,u)})])];case 3:return K=Ne.sent(),[3,5];case 4:return bt=Ne.sent(),K=bt instanceof oo?s(null,m,u,bt.payload,bt.meta):s(bt,m,u),[3,5];case 5:return we=i&&!i.dispatchConditionRejection&&s.match(K)&&K.meta.condition,we||d(K),[2,K]}})})})();return Object.assign(O,{abort:E,requestId:m,arg:u,unwrap:function(){return O.then(Dd)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t})();function Dd(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Id(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ol="listener",sl="completed",al="cancelled",yh="task-"+al,bh="task-"+sl,xh=ol+"-"+al,Sh=ol+"-"+sl;var ao="listenerMiddleware";var Ah=Rt(ao+"/add"),Eh=Rt(ao+"/removeAll"),Ch=Rt(ao+"/remove");var el,Oh=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(el||(el=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Md=function(t){return function(e){setTimeout(e,t)}},wh=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Md(10);Fa();var $d=Ri(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),Fi=class extends $d(Object){};window.ftReduxStores||(window.ftReduxStores={});var ll=class t extends Fi{static get(e){var r;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[i];if(Ni(o))return o;if(n==null)return;let s=nl({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=rl({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Jr(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new _i;let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(n));return this.reduxStore.dispatch(d),d}:u=>{this.setState({[l]:n(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Bi=class{static format(e,r,i,n,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(e,r,i,n,!!o)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Hi=f(x()),Ud="ft-app-info",_r=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};_r.eventName="authentication-change";var ni=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ni.eventName="ui-locale-changed";var Fd={session:(t,e)=>{(0,Hi.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>C.dispatchEvent(new _r(e.payload)),0))}},C=Hi.FtReduxStore.get({name:Ud,reducers:Fd,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var cl=f(x()),ji=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},em=(0,cl.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(C)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>Bi.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ji([(0,lo.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),ji([(0,lo.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),ji([Un({store:C.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),ji([Un({store:C.name})],e.prototype,"uiLocale",void 0),e});var ul;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(ul||(ul={}));var dl;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(dl||(dl={}));var pl;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(pl||(pl={}));var fl;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(fl||(fl={}));var hl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(hl||(hl={}));var ml;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(ml||(ml={}));var vl;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(vl||(vl={}));var gl;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(gl||(gl={}));var yl;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(yl||(yl={}));var bl;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(bl||(bl={}));var xl;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(xl||(xl={}));var Sl;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Sl||(Sl={}));var Al;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Al||(Al={}));var El;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(El||(El={}));var Cl;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Cl||(Cl={}));var Ol;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Ol||(Ol={}));var co;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(co||(co={}));var wl;(function(t){t.ASC="ASC",t.DESC="DESC"})(wl||(wl={}));var Tl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Tl||(Tl={}));var uo;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(uo||(uo={}));var Rl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Rl||(Rl={}));var _l;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(_l||(_l={}));var Ll;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Ll||(Ll={}));var Pl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Pl||(Pl={}));var kl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(kl||(kl={}));var po;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(po||(po={}));var Nl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Nl||(Nl={}));var X;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(X||(X={}));var Fe;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Fe||(Fe={}));var Dl;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Dl||(Dl={}));var Il;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Il||(Il={}));var Ml;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Ml||(Ml={}));var $l;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})($l||($l={}));var Ul;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Ul||(Ul={}));var Fl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Fl||(Fl={}));var Bl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Bl||(Bl={}));var Hl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Hl||(Hl={}));var jl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(jl||(jl={}));var Vl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Vl||(Vl={}));var zl;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(zl||(zl={}));var ql;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ql||(ql={}));var Bd={[X.PERSONAL_BOOK_SHARE_USER]:[X.PERSONAL_BOOK_USER],[X.HTML_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.PDF_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.KHUB_ADMIN]:[X.CONTENT_PUBLISHER],[X.ADMIN]:[X.KHUB_ADMIN,X.USERS_ADMIN,X.PORTAL_ADMIN,X.BEHAVIOR_DATA_USER],[X.GENERATIVE_AI_EXPORT_USER]:[X.GENERATIVE_AI_USER]};function Wl(t,e){return t===e||(Bd[t]??[]).some(r=>Wl(r,e))}function Kl(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(i=>Wl(i,e))}var Ki=f(x());var fo=f(x());var Xt=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=C.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=C.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var Lr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Xt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Xt.await()}};var Ae=class extends Lr{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new fo.CacheRegistry,this.cache=e?n.commonCache:new fo.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var Vi=class extends Ae{async listMySearches(){let{session:e}=C.getState();return Kl(e,X.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var zi=class extends Ae{async listMyBookmarks(){let e=C.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var qi=class extends Ae{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=C.getState().session;return!!e?.sessionAuthenticated}};var Wi=class extends Ae{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=C.getState().session;return!!e?.sessionAuthenticated}};var Hd="ft-user-assets",jd={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(Fe).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:n}=e.payload;mo(t,r,[...ho(t,r),n]),Gl(t,r,1,i),Yl(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;mo(t,r,ho(t,r).map(n=>n.id===i.id?i:n)),Yl(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;mo(t,r,ho(t,r).filter(o=>o.id!==n)),Gl(t,r,-1,i)}},Xl={[Fe.SEARCHES]:"savedSearches",[Fe.BOOKMARKS]:"bookmarks",[Fe.BOOKS]:void 0,[Fe.COLLECTIONS]:void 0},ho=(t,e)=>{var r;let i=Xl[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},mo=(t,e,r)=>{let i=Xl[e];i&&(t[i]=r)},Gl=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===Fe.BOOKMARKS&&i)){let o=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Yl=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},fe=Ki.FtReduxStore.get({name:Hd,reducers:jd,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Fe).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),vo=class{constructor(e=new qi,r=new Wi){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=C.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new zi,this.savedSearchesService=new Vi,C.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=C.getState();(0,Ki.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),fe.actions.clearAssetCount(),fe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),fe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),fe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();fe.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();fe.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&fe.getState().assetCounts.allAsset[e]!==r.count&&fe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&fe.getState().assetCounts.bookmarkByMap[e]!==r.count&&fe.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(fe.getState().assetCounts.bookmarkByMap).length!==0;e===Fe.BOOKMARKS&&r&&fe.actions.clearBookmarkCountByMap(),fe.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;fe.actions.bookmarks(r)}}},Vd=new vo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Vd);var go=class{addCommand(e,r=!1){C.commands.add(e,r)}consumeCommand(e){return C.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new go;var Be=f(x());var Ql,Pr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},zd=Symbol("clearAfterUnitTest"),Gi=class extends(0,Be.withEventBus)(Ae){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ql]=()=>{this.defaultMessages={},this.cache=new Be.CacheRegistry,this.listeners={}},this.currentUiLocale=C.getState().uiLocale,C.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=C.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,Be.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new Be.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Be.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Pr({loadedContexts:e})),this.dispatchEvent(new Pr({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Pr({loadedContexts:[e]})),this.dispatchEvent(new Pr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,Be.delay)(0).then(()=>i()).catch(()=>null)))}};Ql=zd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Gi{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Gi{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var kr=window.FluidTopicsI18nService,Yi=window.FluidTopicsCustomI18nService;var Jl=f(x()),yo=class{highlightHtml(e,r,i){(0,Jl.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new yo;var Zl=f(x());var bo=class{isDate(e){var r,i,n,o;return(o=(n=((i=(r=C.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(e,r){var i,n,o,s;if(e==null)return"";try{return Zl.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:C.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new bo;var ec=f(x());var oi=class{static get(e,r){var i,n;let o=C.getState(),{lang:s,region:a}=(n=(i=o.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new ec.SearchPlaceConverter(o.baseUrl,e??20,o.searchInAllLanguagesAllowed,r??`${s}-${a}`)}};var xo=class{urlToSearchRequest(e){return oi.get().parse(e)}searchRequestToUrl(e){return oi.get().serialize(e)}};window.FluidTopicsUrlService=new xo;var mt=f(x());var Qt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Qt.eventName="change";var So=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},tc=new So;var Xi=class t extends mt.WithEventBus{static build(){return new t(window.history,tc,()=>window.location,!1)}constructor(e,r,i,n){var o,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,mt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Qt(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(Qt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Qt.eventName,e)}currentItem(){return(0,mt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,mt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,mt.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,mt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Xi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var rc=f(_());var ic=rc.css`
585
585
  `;var oc=f(_()),Le=f(B()),er=f(x());var Jt=f(x());function nc(t,e){let{authenticationRequired:r,session:i}=C.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var Qi=class extends Lr{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Ao=class t extends Jt.FtStateManager{static build(e){return new t(C,e)}constructor(e,r){super(),this.store=e,this.cache=new Jt.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new Qi,this.cleanSessionDebouncer=new Jt.Debouncer,this.reloadDebouncer=new Jt.Debouncer(500),this.apiProvider=r??(()=>Xt.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(_r.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>nc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){var r,i,n,o,s;this.localesConfiguration=e,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((r=this.localesConfiguration.availableUiLocales)!==null&&r!==void 0?r:[]),this.store.actions.searchInAllLanguagesAllowed((i=this.localesConfiguration.allLanguagesAllowed)!==null&&i!==void 0?i:!1),this.store.actions.searchLanguageSetsUiLanguage((n=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&n!==void 0?n:!1),this.store.actions.uiLanguageSetsSearchLanguage((o=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&o!==void 0?o:!1),this.store.actions.uiLanguageSetsReaderLanguage((s=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&s!==void 0?s:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new ni(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},Eo=Ao.build();var Zt=class extends Event{constructor(e,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var si=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:o}of i){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Zt(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],i=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(r);o===void 0&&n.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var de=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},q=class extends er.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Eo,this.contextRoot=new si}render(){return oc.html`
586
586
  <slot></slot>
587
587
  `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>kr.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};q.elementDefinitions={};q.styles=ic;de([(0,Le.property)()],q.prototype,"baseUrl",void 0);de([(0,Le.property)()],q.prototype,"apiIntegrationIdentifier",void 0);de([(0,Le.property)()],q.prototype,"apiIntegrationAppVersion",void 0);de([(0,Le.property)()],q.prototype,"uiLocale",void 0);de([(0,er.jsonProperty)(null)],q.prototype,"availableUiLocales",void 0);de([(0,er.jsonProperty)(null)],q.prototype,"metadataConfiguration",void 0);de([(0,Le.property)({type:Boolean})],q.prototype,"editorMode",void 0);de([(0,Le.property)({type:Boolean})],q.prototype,"noCustom",void 0);de([(0,Le.property)({type:Boolean})],q.prototype,"openExternalDocumentInNewTab",void 0);de([(0,Le.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],q.prototype,"noCustomComponent",void 0);de([(0,Le.property)({type:Boolean})],q.prototype,"withManualResources",void 0);de([(0,Le.property)({type:Boolean})],q.prototype,"navigatorOnline",void 0);de([(0,Le.property)({type:Boolean})],q.prototype,"forcedOffline",void 0);de([(0,Le.property)({type:Boolean})],q.prototype,"authenticationRequired",void 0);de([(0,er.jsonProperty)([])],q.prototype,"messageContexts",void 0);de([(0,er.jsonProperty)(void 0)],q.prototype,"session",void 0);var ac=f(x());var sc={"ft-app-context":q};(0,ac.customElements)(sc);var lc=f(B());var Co=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,i]=e.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Nr=new Co;var Kd=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},li=Symbol("i18nAttributes"),cc=Symbol("i18nListAttributes"),uc=Symbol("i18nProperties"),Ji=Symbol("i18nContexts"),ai=Symbol("i18nUnsubs"),Ir=(0,Dr.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?Yi:kr}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:d}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(s,a,...p)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(Nr.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&o(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(s=this[li])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[cc])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(h=>c(u,d,h))})}updateI18nProperties(o){var s;(s=this[uc])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[Ji].set(l,{isCustomContext:a}),this[ai].has(l)||this[ai].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[Ji].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ji].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[ai].forEach(o=>o()),this[ai].clear()}}return e=Ji,r=ai,Kd([(0,lc.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),Zi=class extends Ir(Dr.FtLitElement){},en=class extends Ir(Dr.FtLitElementRedux){};var dc=f(x());var Oo=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(i=>typeof i=="string"?Nr.fromAttribute(i):i):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},Gd=new Oo;var pc=(t,e)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:dc.hasChanged,converter:Nr,...e}),r[li]=(n=r[li])!==null&&n!==void 0?n:new Map,r[li].set(i,t??{})};var tn=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Yi:kr}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(i,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(i,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),this.rawMessages=new Proxy({},{get:(i,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(i,n)=>()=>n}),this.attributes=new Proxy({},{get:(i,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var fc=f(_());var hc=fc.css`
@@ -44,7 +44,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
44
44
  input::-webkit-search-results-decoration {
45
45
  display: none;
46
46
  }
47
- `;var Wl={};var Yi={};V(Yi,{ParametrizedLabelResolver:()=>Yt});var Yt=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var n,i;e=this.resolvePluralKey(e,r);let a=(i=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((n,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,r){for(let n of r)if(typeof n=="number"){let i=`${String(e)}[\\=${n}]`;if(i in this.labels||i in this.defaultLabels)return i}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let n=i=>r?.includes("date")?e.toLocaleDateString(i):r?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return n(document.documentElement.lang)}catch{return n()}}};var Sa={};V(Sa,{FtCommandQueue:()=>vo,FtLitElementRedux:()=>xt,FtReduxStore:()=>Nt,FtStateManager:()=>Rr,ReduxWatcher:()=>pn,clearAllStores:()=>Qf,isFtReduxStore:()=>Sr,redux:()=>bt,reduxEventListener:()=>Xi,reduxReactive:()=>gf,watch:()=>Oc,withRedux:()=>Gl});var gf=()=>(t,e)=>{var r;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(r=n.reduxReactiveProperties)===null||r===void 0||r.add(e)},bt=t=>{let e=t??{};return(r,n)=>{var i;let a={hasChanged:be,attribute:!1,...e};g(a)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:(l=>l[n]),store:e.store})}},Xi=t=>(e,r)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(r,t)};var vo=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function Sr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var So=Symbol("internalReduxEventsUnsubscribers"),Lt=Symbol("internalStoresUnsubscribers"),Xt=Symbol("internalStores"),Gl=ce(Symbol("withRedux"),function(t){var e,r,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Xt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Xt].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[Xt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Xt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Xt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[Lt].has(s.store):this[Lt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var d;this[Lt].set(s,l.subscribe(()=>this.updateFromStores())),this[So].set(s,[]),Sr(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||l.name===p.store)){let f=m=>this[h](m);l.addEventListener(p.eventName,f),this[So].get(s).push(()=>l.removeEventListener(p.eventName,f))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Lt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Lt].has(s)&&this[Lt].get(s)(),this[Lt].delete(s),(l=this[So].get(s))===null||l===void 0||l.forEach(d=>d()),this[So].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Lt,r=Xt,n=So,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),xt=class extends Gl(U){};function ze(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function vt(t){return!!t&&!!t[X]}function Ke(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Of})(t)||Array.isArray(t)||!!t[Jl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Jl])||aa(t)||sa(t))}function Jt(t,e,r){r===void 0&&(r=!1),Or(t)===0?(r?Object.keys:Er)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,i){return e(i,n,t)}))}function Or(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:aa(t)?2:sa(t)?3:0}function Cr(t,e){return Or(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function yf(t,e){return Or(t)===2?t.get(e):t[e]}function Ql(t,e,r){var n=Or(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function ec(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function aa(t){return Cf&&t instanceof Map}function sa(t){return Ef&&t instanceof Set}function Tt(t){return t.o||t.t}function la(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=oc(t);delete e[X];for(var r=Er(e),n=0;n<r.length;n++){var i=r[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ca(t,e){return e===void 0&&(e=!1),da(t)||vt(t)||!Ke(t)||(Or(t)>1&&(t.set=t.add=t.clear=t.delete=bf),Object.freeze(t),e&&Jt(t,(function(r,n){return ca(n,!0)}),!0)),t}function bf(){ze(2)}function da(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function lt(t){var e=ia[t];return e||ze(18,t),e}function xf(t,e){ia[t]||(ia[t]=e)}function ra(){return Eo}function Ji(t,e){e&&(lt("Patches"),t.u=[],t.s=[],t.v=e)}function sn(t){oa(t),t.p.forEach(vf),t.p=null}function oa(t){t===Eo&&(Eo=t.l)}function jl(t){return Eo={p:[],l:Eo,h:t,m:!0,_:0}}function vf(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function Qi(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||lt("ES5").S(e,t,n),n?(r[X].P&&(sn(e),ze(4)),Ke(t)&&(t=ln(e,t),e.l||cn(e,t)),e.u&&lt("Patches").M(r[X].t,t,e.u,e.s)):t=ln(e,r,[]),sn(e),e.u&&e.v(e.u,e.s),t!==rc?t:void 0}function ln(t,e,r){if(da(e))return e;var n=e[X];if(!n)return Jt(e,(function(l,d){return Kl(t,n,e,l,d,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return cn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=la(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Jt(a,(function(l,d){return Kl(t,n,i,l,d,r,s)})),cn(t,i,!1),r&&t.u&&lt("Patches").N(n,r,t.u,t.s)}return n.o}function Kl(t,e,r,n,i,a,s){if(vt(i)){var l=ln(t,i,a&&e&&e.i!==3&&!Cr(e.R,n)?a.concat(n):void 0);if(Ql(r,n,l),!vt(l))return;t.m=!1}else s&&r.add(i);if(Ke(i)&&!da(i)){if(!t.h.D&&t._<1)return;ln(t,i),e&&e.A.l||cn(t,i)}}function cn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&ca(e,r)}function ea(t,e){var r=t[X];return(r?Tt(r):t)[e]}function ql(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function _t(t){t.P||(t.P=!0,t.l&&_t(t.l))}function ta(t){t.o||(t.o=la(t.t))}function na(t,e,r){var n=aa(e)?lt("MapSet").F(e,r):sa(e)?lt("MapSet").T(e,r):t.O?(function(i,a){var s=Array.isArray(i),l={i:s?1:0,A:a?a.A:ra(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},d=l,p=Oo;s&&(d=[l],p=Co);var h=Proxy.revocable(d,p),f=h.revoke,m=h.proxy;return l.k=m,l.j=f,m})(e,r):lt("ES5").J(e,r);return(r?r.A:ra()).p.push(n),n}function Sf(t){return vt(t)||ze(22,t),(function e(r){if(!Ke(r))return r;var n,i=r[X],a=Or(r);if(i){if(!i.P&&(i.i<4||!lt("ES5").K(i)))return i.t;i.I=!0,n=Zl(r,a),i.I=!1}else n=Zl(r,a);return Jt(n,(function(s,l){i&&yf(i.t,s)===l||Ql(n,s,e(l))})),a===3?new Set(n):n})(t)}function Zl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return la(t)}function tc(){function t(s,l){var d=a[s];return d?d.enumerable=l:a[s]=d={configurable:!0,enumerable:l,get:function(){var p=this[X];return Oo.get(p,s)},set:function(p){var h=this[X];Oo.set(h,s,p)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][X];if(!d.P)switch(d.i){case 5:n(d)&&_t(d);break;case 4:r(d)&&_t(d)}}}function r(s){for(var l=s.t,d=s.k,p=Er(d),h=p.length-1;h>=0;h--){var f=p[h];if(f!==X){var m=l[f];if(m===void 0&&!Cr(l,f))return!0;var b=d[f],y=b&&b[X];if(y?y.t!==m:!ec(b,m))return!0}}var S=!!l[X];return p.length!==Er(l).length+(S?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function i(s){s.g&&ze(3,JSON.stringify(Tt(s)))}var a={};xf("ES5",{J:function(s,l){var d=Array.isArray(s),p=(function(f,m){if(f){for(var b=Array(m.length),y=0;y<m.length;y++)Object.defineProperty(b,""+y,t(y,!0));return b}var S=oc(m);delete S[X];for(var E=Er(S),O=0;O<E.length;O++){var T=E[O];S[T]=t(T,f||!!S[T].enumerable)}return Object.create(Object.getPrototypeOf(m),S)})(d,s),h={i:d?5:4,A:l?l.A:ra(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,X,{value:h,writable:!0}),p},S:function(s,l,d){d?vt(l)&&l[X].A===s&&e(s.p):(s.u&&(function p(h){if(h&&typeof h=="object"){var f=h[X];if(f){var m=f.t,b=f.k,y=f.R,S=f.i;if(S===4)Jt(b,(function(x){x!==X&&(m[x]!==void 0||Cr(m,x)?y[x]||p(b[x]):(y[x]=!0,_t(f)))})),Jt(m,(function(x){b[x]!==void 0||Cr(b,x)||(y[x]=!1,_t(f))}));else if(S===5){if(n(f)&&(_t(f),y.length=!0),b.length<m.length)for(var E=b.length;E<m.length;E++)y[E]=!1;else for(var O=m.length;O<b.length;O++)y[O]=!0;for(var T=Math.min(b.length,m.length),v=0;v<T;v++)b.hasOwnProperty(v)||(y[v]=!0),y[v]===void 0&&p(b[v])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var Yl,Eo,ua=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Cf=typeof Map<"u",Ef=typeof Set<"u",Xl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",rc=ua?Symbol.for("immer-nothing"):((Yl={})["immer-nothing"]=!0,Yl),Jl=ua?Symbol.for("immer-draftable"):"__$immer_draftable",X=ua?Symbol.for("immer-state"):"__$immer_state";var Of=""+Object.prototype.constructor,Er=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,oc=Object.getOwnPropertyDescriptors||function(t){var e={};return Er(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},ia={},Oo={get:function(t,e){if(e===X)return t;var r=Tt(t);if(!Cr(r,e))return(function(i,a,s){var l,d=ql(a,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(i.k):void 0})(t,r,e);var n=r[e];return t.I||!Ke(n)?n:n===ea(t.t,e)?(ta(t),t.o[e]=na(t.A.h,n,t)):n},has:function(t,e){return e in Tt(t)},ownKeys:function(t){return Reflect.ownKeys(Tt(t))},set:function(t,e,r){var n=ql(Tt(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var i=ea(Tt(t),e),a=i?.[X];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(ec(r,i)&&(r!==void 0||Cr(t.t,e)))return!0;ta(t),_t(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return ea(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,ta(t),_t(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Tt(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){ze(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ze(12)}},Co={};Jt(Oo,(function(t,e){Co[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Co.deleteProperty=function(t,e){return Co.set.call(this,t,e,void 0)},Co.set=function(t,e,r){return Oo.set.call(this,t[0],e,r,t[0])};var Af=(function(){function t(r){var n=this;this.O=Xl,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var l=a;a=i;var d=n;return function(S){var E=this;S===void 0&&(S=l);for(var O=arguments.length,T=Array(O>1?O-1:0),v=1;v<O;v++)T[v-1]=arguments[v];return d.produce(S,(function(x){var C;return(C=a).call.apply(C,[E,x].concat(T))}))}}var p;if(typeof a!="function"&&ze(6),s!==void 0&&typeof s!="function"&&ze(7),Ke(i)){var h=jl(n),f=na(n,i,void 0),m=!0;try{p=a(f),m=!1}finally{m?sn(h):oa(h)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return Ji(h,s),Qi(S,h)}),(function(S){throw sn(h),S})):(Ji(h,s),Qi(p,h))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===rc&&(p=void 0),n.D&&ca(p,!0),s){var b=[],y=[];lt("Patches").M(i,p,b,y),s(b,y)}return p}ze(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var h=arguments.length,f=Array(h>1?h-1:0),m=1;m<h;m++)f[m-1]=arguments[m];return n.produceWithPatches(p,(function(b){return i.apply(void 0,[b].concat(f))}))};var s,l,d=n.produce(i,a,(function(p,h){s=p,l=h}));return typeof Promise<"u"&&d instanceof Promise?d.then((function(p){return[p,s,l]})):[d,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Ke(r)||ze(8),vt(r)&&(r=Sf(r));var n=jl(this),i=na(this,r,void 0);return i[X].C=!0,oa(n),i},e.finishDraft=function(r,n){var i=r&&r[X],a=i.A;return Ji(a,n),Qi(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Xl&&ze(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var s=lt("Patches").$;return vt(r)?s(r,n):this.produce(r,(function(l){return s(l,n)}))},t})(),Me=new Af,wf=Me.produce,gv=Me.produceWithPatches.bind(Me),yv=Me.setAutoFreeze.bind(Me),bv=Me.setUseProxies.bind(Me),xv=Me.applyPatches.bind(Me),vv=Me.createDraft.bind(Me),Sv=Me.finishDraft.bind(Me),dn=wf;function Qt(t){"@babel/helpers - typeof";return Qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(t)}function nc(t,e){if(Qt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ic(t){var e=nc(t,"string");return Qt(e)=="symbol"?e:e+""}function ac(t,e,r){return(e=ic(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sc(Object(r),!0).forEach(function(n){ac(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sc(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function xe(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var lc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),fa=function(){return Math.random().toString(36).substring(7).split("").join(".")},un={INIT:"@@redux/INIT"+fa(),REPLACE:"@@redux/REPLACE"+fa(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fa()}};function Rf(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function ha(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(xe(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(xe(1));return r(ha)(t,e)}if(typeof t!="function")throw new Error(xe(2));var i=t,a=e,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function h(){if(d)throw new Error(xe(3));return a}function f(S){if(typeof S!="function")throw new Error(xe(4));if(d)throw new Error(xe(5));var E=!0;return p(),l.push(S),function(){if(E){if(d)throw new Error(xe(6));E=!1,p();var T=l.indexOf(S);l.splice(T,1),s=null}}}function m(S){if(!Rf(S))throw new Error(xe(7));if(typeof S.type>"u")throw new Error(xe(8));if(d)throw new Error(xe(9));try{d=!0,a=i(a,S)}finally{d=!1}for(var E=s=l,O=0;O<E.length;O++){var T=E[O];T()}return S}function b(S){if(typeof S!="function")throw new Error(xe(10));i=S,m({type:un.REPLACE})}function y(){var S,E=f;return S={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(xe(11));function v(){T.next&&T.next(h())}v();var x=E(v);return{unsubscribe:x}}},S[lc]=function(){return this},S}return m({type:un.INIT}),n={dispatch:m,subscribe:f,getState:h,replaceReducer:b},n[lc]=y,n}function Lf(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:un.INIT});if(typeof n>"u")throw new Error(xe(12));if(typeof r(void 0,{type:un.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xe(13))})}function cc(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var a=Object.keys(r),s,l;try{Lf(r)}catch(d){l=d}return function(p,h){if(p===void 0&&(p={}),l)throw l;if(0)var f;for(var m=!1,b={},y=0;y<a.length;y++){var S=a[y],E=r[S],O=p[S],T=E(O,h);if(typeof T>"u"){var v=h&&h.type;throw new Error(xe(14))}b[S]=T,m=m||T!==O}return m=m||a.length!==Object.keys(p).length,m?b:p}}function Ar(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function dc(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(xe(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return a=Ar.apply(void 0,l)(i.dispatch),pa(pa({},i),{},{dispatch:a})}}}function uc(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(l){return typeof l=="function"?l(i,a,t):s(l)}}};return e}var pc=uc();pc.withExtraArgument=uc;var ma=pc;var yc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Tf=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(h){return d([p,h])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,i=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){r.label=p[1];break}if(p[0]===6&&r.label<a[1]){r.label=a[1],a=p;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(p);break}a[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(t,r)}catch(h){p=[6,h],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},wr=function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},_f=Object.defineProperty,kf=Object.defineProperties,Pf=Object.getOwnPropertyDescriptors,fc=Object.getOwnPropertySymbols,Nf=Object.prototype.hasOwnProperty,If=Object.prototype.propertyIsEnumerable,hc=function(t,e,r){return e in t?_f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},kt=function(t,e){for(var r in e||(e={}))Nf.call(e,r)&&hc(t,r,e[r]);if(fc)for(var n=0,i=fc(e);n<i.length;n++){var r=i[n];If.call(e,r)&&hc(t,r,e[r])}return t},ga=function(t,e){return kf(t,Pf(e))},Df=function(t,e,r){return new Promise(function(n,i){var a=function(d){try{l(r.next(d))}catch(p){i(p)}},s=function(d){try{l(r.throw(d))}catch(p){i(p)}},l=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(a,s)};l((r=r.apply(t,e)).next())})};var Mf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ar:Ar.apply(null,arguments)},$v=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Ff(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Pt(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return kt(kt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}var Uf=(function(t){yc(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,wr([void 0],r[0].concat(this)))):new(e.bind.apply(e,wr([void 0],r.concat(this))))},e})(Array),$f=(function(t){yc(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,wr([void 0],r[0].concat(this)))):new(e.bind.apply(e,wr([void 0],r.concat(this))))},e})(Array);function xa(t){return Ke(t)?dn(t,function(){}):t}function Bf(t){return typeof t=="boolean"}function Hf(){return function(e){return zf(e)}}function zf(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,l=t.actionCreatorCheck,d=l===void 0?!0:l,p=new Uf;if(r&&(Bf(r)?p.push(ma):p.push(ma.withExtraArgument(r.extraArgument))),0){if(i)var h;if(s)var f;if(d)var m}return p}var ya=!0;function bc(t){var e=Hf(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,s=a===void 0?e():a,l=r.devTools,d=l===void 0?!0:l,p=r.preloadedState,h=p===void 0?void 0:p,f=r.enhancers,m=f===void 0?void 0:f,b;if(typeof i=="function")b=i;else if(Ff(i))b=cc(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var y=s;if(typeof y=="function"&&(y=y(e),!ya&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ya&&y.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=dc.apply(void 0,y),E=Ar;d&&(E=Mf(kt({trace:!ya},typeof d=="object"&&d)));var O=new $f(S),T=O;Array.isArray(m)?T=wr([S],m):typeof m=="function"&&(T=m(O));var v=E.apply(void 0,T);return ha(b,h,v)}function xc(t){var e={},r=[],n,i={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[l]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,r,n]}function Vf(t){return typeof t=="function"}function Wf(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?xc(e):[e,r,n],a=i[0],s=i[1],l=i[2],d;if(Vf(t))d=function(){return xa(t())};else{var p=xa(t);d=function(){return p}}function h(f,m){f===void 0&&(f=d());var b=wr([a[m.type]],s.filter(function(y){var S=y.matcher;return S(m)}).map(function(y){var S=y.reducer;return S}));return b.filter(function(y){return!!y}).length===0&&(b=[l]),b.reduce(function(y,S){if(S)if(vt(y)){var E=y,O=S(E,m);return O===void 0?y:O}else{if(Ke(y))return dn(y,function(T){return S(T,m)});var O=S(y,m);if(O===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return O}return y},f)}return h.getInitialState=d,h}function Gf(t,e){return t+"/"+e}function vc(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:xa(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},l={};i.forEach(function(h){var f=n[h],m=Gf(e,h),b,y;"reducer"in f?(b=f.reducer,y=f.prepare):b=f,a[h]=b,s[m]=b,l[h]=y?Pt(m,y):Pt(m)});function d(){var h=typeof t.extraReducers=="function"?xc(t.extraReducers):[t.extraReducers],f=h[0],m=f===void 0?{}:f,b=h[1],y=b===void 0?[]:b,S=h[2],E=S===void 0?void 0:S,O=kt(kt({},m),s);return Wf(r,function(T){for(var v in O)T.addCase(v,O[v]);for(var x=0,C=y;x<C.length;x++){var _=C[x];T.addMatcher(_.matcher,_.reducer)}E&&T.addDefaultCase(E)})}var p;return{name:e,reducer:function(h,f){return p||(p=d()),p(h,f)},actions:l,caseReducers:a,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var jf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Kf=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=jf[Math.random()*64|0];return e},qf=["name","message","stack","code"],ba=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),mc=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Zf=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=qf;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},Vv=(function(){function t(e,r,n){var i=Pt(e+"/fulfilled",function(h,f,m,b){return{payload:h,meta:ga(kt({},b||{}),{arg:m,requestId:f,requestStatus:"fulfilled"})}}),a=Pt(e+"/pending",function(h,f,m){return{payload:void 0,meta:ga(kt({},m||{}),{arg:f,requestId:h,requestStatus:"pending"})}}),s=Pt(e+"/rejected",function(h,f,m,b,y){return{payload:b,error:(n&&n.serializeError||Zf)(h||"Rejected"),meta:ga(kt({},y||{}),{arg:m,requestId:f,rejectedWithValue:!!b,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:(function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h})();function p(h){return function(f,m,b){var y=n?.idGenerator?n.idGenerator(h):Kf(),S=new d,E,O=!1;function T(x){E=x,S.abort()}var v=(function(){return Df(this,null,function(){var x,C,_,$,ie,j,P;return Tf(this,function(D){switch(D.label){case 0:return D.trys.push([0,4,,5]),$=(x=n?.condition)==null?void 0:x.call(n,h,{getState:m,extra:b}),Xf($)?[4,$]:[3,2];case 1:$=D.sent(),D.label=2;case 2:if($===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return O=!0,ie=new Promise(function(W,se){return S.signal.addEventListener("abort",function(){return se({name:"AbortError",message:E||"Aborted"})})}),f(a(y,h,(C=n?.getPendingMeta)==null?void 0:C.call(n,{requestId:y,arg:h},{getState:m,extra:b}))),[4,Promise.race([ie,Promise.resolve(r(h,{dispatch:f,getState:m,extra:b,requestId:y,signal:S.signal,abort:T,rejectWithValue:function(W,se){return new ba(W,se)},fulfillWithValue:function(W,se){return new mc(W,se)}})).then(function(W){if(W instanceof ba)throw W;return W instanceof mc?i(W.payload,y,h,W.meta):i(W,y,h)})])];case 3:return _=D.sent(),[3,5];case 4:return j=D.sent(),_=j instanceof ba?s(null,y,h,j.payload,j.meta):s(j,y,h),[3,5];case 5:return P=n&&!n.dispatchConditionRejection&&s.match(_)&&_.meta.condition,P||f(_),[2,_]}})})})();return Object.assign(v,{abort:T,requestId:y,arg:h,unwrap:function(){return v.then(Yf)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t})();function Yf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Xf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Sc="listener",Cc="completed",Ec="cancelled",Wv="task-"+Ec,Gv="task-"+Cc,jv=Sc+"-"+Ec,Kv=Sc+"-"+Cc;var va="listenerMiddleware";var qv=Pt(va+"/add"),Zv=Pt(va+"/removeAll"),Yv=Pt(va+"/remove");var gc,Xv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(gc||(gc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Jf=function(t){return function(e){setTimeout(e,t)}},Jv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Jf(10);tc();window.ftReduxStores||(window.ftReduxStores={});var Nt=class t extends gt{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Sr(a))return a;if(i==null)return;let s=vc({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),l=bc({reducer:(d,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=_e(s.getInitialState());for(let f of p.keeping)h[f]=(d??h)[f];return h}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...p.overwrites};return s.reducer(d,p)}});return window.ftReduxStores[i.name]=new t(s,l,i.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new vo;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,l)=>{let d=s,p=a[d];return p?(...h)=>{let f=p(...h.map(i));return this.reduxStore.dispatch(f),f}:h=>{this.setState({[d]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function Qf(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Sr(e)&&e.clear()}var pn=class{constructor(e,r,n){this.store=e,this.valueSelector=r,this.callback=n}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);be(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function Oc(t,e,r){return new pn(t,e,r).watch()}var Rr=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let n of r)this.getOrCreateRequestConsumers(n).add(e).size==1&&this.onNewNeededRequest(n)}unregisterComponent(e,r){for(let n of r)this.getOrCreateRequestConsumers(n).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Oa={};V(Oa,{scrollHelper:()=>eh});var Ca,fn=new Map,Ea=class{lock(e,r){if(r){let n=fn.get(r);if(n==null||n===e)return fn.set(r,e),r}}release(e,r){r&&fn.get(r)===e&&fn.delete(r)}findFirstScrollableParent(e){var r;let n,i;for(let a of ai(e)){let s=a,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else l&&i==null&&(i=s)}return(r=n??i)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var n,i;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(n=r.offsetTop)!==null&&n!==void 0?n:0,r=r.offsetParent;return a+((i=r?.offsetTop)!==null&&i!==void 0?i:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let i=this.getAbsoluteScrollOffset(n,e),a=i-n.clientHeight+e.clientHeight,s=i,l=At(0,(s-n.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,l)*(a-s)+s;n.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(Ca=window.FluidTopicsScrollHelper)!==null&&Ca!==void 0?Ca:new Ea;var eh=window.FluidTopicsScrollHelper;var wa={};V(wa,{SearchPlaceConverter:()=>Tr,SearchPlaceQueryParams:()=>H,isSearchPlaceQueryParams:()=>ud,serializeRequest:()=>oh});var Ac;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ac||(Ac={}));var wc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(wc||(wc={}));var Rc;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Rc||(Rc={}));var Lc;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Lc||(Lc={}));var Tc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Tc||(Tc={}));var _c;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(_c||(_c={}));var kc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(kc||(kc={}));var Pc;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Pc||(Pc={}));var Nc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Nc||(Nc={}));var Ic;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Ic||(Ic={}));var Dc;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(Dc||(Dc={}));var Mc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Mc||(Mc={}));var Fc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Fc||(Fc={}));var Uc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Uc||(Uc={}));var $c;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})($c||($c={}));var Bc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Bc||(Bc={}));var er;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(er||(er={}));var Hc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Hc||(Hc={}));var zc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(zc||(zc={}));var hn;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(hn||(hn={}));var Zc=t=>Object.keys(hn).includes(t);var Vc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Vc||(Vc={}));var Wc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Wc||(Wc={}));var Gc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Gc||(Gc={}));var Lr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Lr||(Lr={}));var Yc=t=>Object.keys(Lr).includes(t);var jc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(jc||(jc={}));var Aa;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Aa||(Aa={}));var Kc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Kc||(Kc={}));var ae;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ae||(ae={}));var Ve;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Ve||(Ve={}));var qc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(qc||(qc={}));var Xc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Xc||(Xc={}));var Jc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Jc||(Jc={}));var Qc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(Qc||(Qc={}));var ed;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(ed||(ed={}));var td;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(td||(td={}));var rd;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(rd||(rd={}));var od;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(od||(od={}));var nd;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(nd||(nd={}));var id;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(id||(id={}));var ad;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(ad||(ad={}));var sd;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(sd||(sd={}));var th={[ae.PERSONAL_BOOK_SHARE_USER]:[ae.PERSONAL_BOOK_USER],[ae.HTML_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.PDF_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.KHUB_ADMIN]:[ae.CONTENT_PUBLISHER],[ae.ADMIN]:[ae.KHUB_ADMIN,ae.USERS_ADMIN,ae.PORTAL_ADMIN,ae.BEHAVIOR_DATA_USER],[ae.GENERATIVE_AI_EXPORT_USER]:[ae.GENERATIVE_AI_USER]};function ld(t,e){return t===e||(th[t]??[]).some(r=>ld(r,e))}function cd(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>ld(n,e))}function rh(t){return`"${t}"`}function dd(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function oh(t,e){return new Tr(t).serialize(e)}var H;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(H||(H={}));var nh=new Set(Object.values(H));function ud(t){return nh.has(t)}var Tr=class{constructor(e,r=20,n=!1,i="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=n,this.defaultContentLocale=i,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let n=r==null||r.trim().length===0,i=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return i.search=this.toURLSearchParams(e),i.toString()}toURLSearchParams(e,r=!1){var n,i,a,s,l,d,p,h,f,m,b;let y=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&y.append(H.LOCALE,e.contentLocale):y.append(H.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&y.append(H.QUERY,e.query);let S=(a=(i=e.metadataFilters)===null||i===void 0?void 0:i.filter(x=>x.valueFilter&&!x.valueFilter.negative))!==null&&a!==void 0?a:[];if(S.length>0){let x=S.map(C=>{var _,$;let ie=(($=(_=C.valueFilter)===null||_===void 0?void 0:_.values)!==null&&$!==void 0?$:[]).map(j=>this.escapeFilters(j)).map(j=>rh(dd(j))).join("_");return`${C.key}~${ie}`}).join("*");y.append(H.VALUE_FILTERS,x)}let E=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(x=>x.dateFilter))!==null&&l!==void 0?l:[];if(E.length>0){let x=E.map(C=>{var _;return`${C.key}~${(_=C.dateFilter)===null||_===void 0?void 0:_.type.toLowerCase()}`}).join("*");y.append(H.DATE_FILTERS,x)}let O=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(x=>x.rangeFilter))!==null&&p!==void 0?p:[];if(O.length>0){let x=O.map(C=>{var _,$;return`${C.key}~${(_=C.rangeFilter)===null||_===void 0?void 0:_.from}_${($=C.rangeFilter)===null||$===void 0?void 0:$.to}`}).join("*");y.append(H.RANGE_FILTERS,x)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&y.append(H.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&y.append(H.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&y.append(H.SORT,e.sortId),!((h=e.paging)===null||h===void 0)&&h.perPage&&((m=(f=e.paging)===null||f===void 0?void 0:f.perPage)!==null&&m!==void 0?m:this.defaultPerPage)!=this.defaultPerPage&&y.append(H.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&y.append(H.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let T=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let x in T)y.append(x,T[x]);let v=new Array;return y.forEach((x,C)=>{v.push(this.encodeQueryString(C)+"="+this.encodeQueryString(x))}),encodeURI(v.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let n=e.split("?"),i=this.fromURLSearchParams(n.slice(1).join("?")),a=n[0].split("/search/")[1];return a==null?i:{...i,scope:(r=this.scopeMapping[a])!==null&&r!==void 0?r:i.scope}}fromURLSearchParams(e){var r,n,i,a,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(O){console.warn("Could not decode search request query params, fallback on raw value",O)}let d=new URLSearchParams(e),p=d.get(H.LOCALE)==="all"?void 0:d.get(H.LOCALE),h=((r=d.get(H.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),f=(n=d.get(H.SORT))===null||n===void 0?void 0:n.toLowerCase(),m=(i=d.get(H.SCOPE))!==null&&i!==void 0?i:"default",b=+((a=d.get(H.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),y=d.get(H.KEYWORD_MATCH),S=y?y.toUpperCase()===er.MANDATORY?er.MANDATORY:er.OPTIONAL:void 0,E={};for(let O of d.keys())ud(O)||(E[O]=d.get(O));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(H.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[m])!==null&&l!==void 0?l:"DEFAULT",virtualField:Zc(h)?h:"EVERYWHERE",sortId:f,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:At(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:S,otherQueryParams:E}}parseCompatFilters(e){var r,n,i,a,s,l;let d=[];return e.has(H.FILTERS)&&(d=this.parseValueFilters((r=e.get(H.FILTERS))!==null&&r!==void 0?r:"")),(n=e.has(H.PERIOD))!==null&&n!==void 0&&n&&(d=[...d,...this.parseLegacyPeriodFilter(((i=e.get(H.PERIOD))!==null&&i!==void 0?i:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(H.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(H.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(H.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(dd).map(n=>this.unescapeFilterValue(n)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Lr[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(r,n);return e}superEscapeFilters(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(n,i);return e}unescapeFilterValue(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(i,r);return e}parseLegacyPeriodFilter(e){if(Yc(e))return[{key:"ft:lastEdition",dateFilter:{type:Lr[e]}}];if(e.startsWith("CUSTOM_")){let[r,n,i]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:i}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[H.LOCALE,H.FILTERS,H.VALUE_FILTERS,H.DATE_FILTERS,H.RANGE_FILTERS].forEach(i=>{r.searchParams.delete(i)}),r.toString()}static updateLocaleParamInUrl(e,r){let n=new URL(e);return n.searchParams.delete(H.LOCALE),r!==void 0&&n.searchParams.append(H.LOCALE,r),n.toString()}};var Ta={};V(Ta,{toFtFormComponent:()=>La});var Ra=Symbol("elementInternals"),La=ce(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Ra].form}constructor(...n){super(n),this[Ra]=this.attachInternals()}setFormValue(n){this[Ra].setFormValue(n)}}return e});var _a={};V(_a,{DateFormatter:()=>tr});var tr=class{static format(e,r,n,i,a){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,i,!!a)):this.getIntlDateTime(e,r,n,i,!!a)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,i,a){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return a?d:i?`${l} ${d}`:l}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Pa={};V(Pa,{ALL_KEYS_VALUE:()=>ka,SameWindowStorageEvent:()=>_r});var ka="__all__",_r=class extends CustomEvent{constructor(e,r,n){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==ka}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new _r(r[0],n,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new _r(r[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new _r(ka))}});var Ia={};V(Ia,{FocusMainContentEvent:()=>Na});var Na=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var pd={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function ih(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function ah(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",ih);document.addEventListener("click",ah);var fd=k`
47
+ `;var Wl={};var Yi={};V(Yi,{ParametrizedLabelResolver:()=>Yt});var Yt=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var n,i;e=this.resolvePluralKey(e,r);let a=(i=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((n,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,r){for(let n of r)if(typeof n=="number"){let i=`${String(e)}[\\=${n}]`;if(i in this.labels||i in this.defaultLabels)return i}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let n=i=>r?.includes("date")?e.toLocaleDateString(i):r?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return n(document.documentElement.lang)}catch{return n()}}};var Sa={};V(Sa,{FtCommandQueue:()=>vo,FtLitElementRedux:()=>xt,FtReduxStore:()=>Nt,FtStateManager:()=>Rr,ReduxWatcher:()=>pn,clearAllStores:()=>Qf,isFtReduxStore:()=>Sr,redux:()=>bt,reduxEventListener:()=>Xi,reduxReactive:()=>gf,watch:()=>Oc,withRedux:()=>Gl});var gf=()=>(t,e)=>{var r;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(r=n.reduxReactiveProperties)===null||r===void 0||r.add(e)},bt=t=>{let e=t??{};return(r,n)=>{var i;let a={hasChanged:be,attribute:!1,...e};g(a)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:(l=>l[n]),store:e.store})}},Xi=t=>(e,r)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(r,t)};var vo=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function Sr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var So=Symbol("internalReduxEventsUnsubscribers"),Lt=Symbol("internalStoresUnsubscribers"),Xt=Symbol("internalStores"),Gl=ce(Symbol("withRedux"),function(t){var e,r,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Xt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Xt].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[Xt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Xt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Xt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[Lt].has(s.store):this[Lt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var d;this[Lt].set(s,l.subscribe(()=>this.updateFromStores())),this[So].set(s,[]),Sr(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||l.name===p.store)){let f=m=>this[h](m);l.addEventListener(p.eventName,f),this[So].get(s).push(()=>l.removeEventListener(p.eventName,f))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Lt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Lt].has(s)&&this[Lt].get(s)(),this[Lt].delete(s),(l=this[So].get(s))===null||l===void 0||l.forEach(d=>d()),this[So].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Lt,r=Xt,n=So,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),xt=class extends Gl(U){};function ze(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function vt(t){return!!t&&!!t[X]}function Ke(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Of})(t)||Array.isArray(t)||!!t[Jl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Jl])||aa(t)||sa(t))}function Jt(t,e,r){r===void 0&&(r=!1),Or(t)===0?(r?Object.keys:Er)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,i){return e(i,n,t)}))}function Or(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:aa(t)?2:sa(t)?3:0}function Cr(t,e){return Or(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function yf(t,e){return Or(t)===2?t.get(e):t[e]}function Ql(t,e,r){var n=Or(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function ec(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function aa(t){return Cf&&t instanceof Map}function sa(t){return Ef&&t instanceof Set}function Tt(t){return t.o||t.t}function la(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=oc(t);delete e[X];for(var r=Er(e),n=0;n<r.length;n++){var i=r[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ca(t,e){return e===void 0&&(e=!1),da(t)||vt(t)||!Ke(t)||(Or(t)>1&&(t.set=t.add=t.clear=t.delete=bf),Object.freeze(t),e&&Jt(t,(function(r,n){return ca(n,!0)}),!0)),t}function bf(){ze(2)}function da(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function lt(t){var e=ia[t];return e||ze(18,t),e}function xf(t,e){ia[t]||(ia[t]=e)}function ra(){return Eo}function Ji(t,e){e&&(lt("Patches"),t.u=[],t.s=[],t.v=e)}function sn(t){oa(t),t.p.forEach(vf),t.p=null}function oa(t){t===Eo&&(Eo=t.l)}function jl(t){return Eo={p:[],l:Eo,h:t,m:!0,_:0}}function vf(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function Qi(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||lt("ES5").S(e,t,n),n?(r[X].P&&(sn(e),ze(4)),Ke(t)&&(t=ln(e,t),e.l||cn(e,t)),e.u&&lt("Patches").M(r[X].t,t,e.u,e.s)):t=ln(e,r,[]),sn(e),e.u&&e.v(e.u,e.s),t!==rc?t:void 0}function ln(t,e,r){if(da(e))return e;var n=e[X];if(!n)return Jt(e,(function(l,d){return Kl(t,n,e,l,d,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return cn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=la(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Jt(a,(function(l,d){return Kl(t,n,i,l,d,r,s)})),cn(t,i,!1),r&&t.u&&lt("Patches").N(n,r,t.u,t.s)}return n.o}function Kl(t,e,r,n,i,a,s){if(vt(i)){var l=ln(t,i,a&&e&&e.i!==3&&!Cr(e.R,n)?a.concat(n):void 0);if(Ql(r,n,l),!vt(l))return;t.m=!1}else s&&r.add(i);if(Ke(i)&&!da(i)){if(!t.h.D&&t._<1)return;ln(t,i),e&&e.A.l||cn(t,i)}}function cn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&ca(e,r)}function ea(t,e){var r=t[X];return(r?Tt(r):t)[e]}function ql(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function _t(t){t.P||(t.P=!0,t.l&&_t(t.l))}function ta(t){t.o||(t.o=la(t.t))}function na(t,e,r){var n=aa(e)?lt("MapSet").F(e,r):sa(e)?lt("MapSet").T(e,r):t.O?(function(i,a){var s=Array.isArray(i),l={i:s?1:0,A:a?a.A:ra(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},d=l,p=Oo;s&&(d=[l],p=Co);var h=Proxy.revocable(d,p),f=h.revoke,m=h.proxy;return l.k=m,l.j=f,m})(e,r):lt("ES5").J(e,r);return(r?r.A:ra()).p.push(n),n}function Sf(t){return vt(t)||ze(22,t),(function e(r){if(!Ke(r))return r;var n,i=r[X],a=Or(r);if(i){if(!i.P&&(i.i<4||!lt("ES5").K(i)))return i.t;i.I=!0,n=Zl(r,a),i.I=!1}else n=Zl(r,a);return Jt(n,(function(s,l){i&&yf(i.t,s)===l||Ql(n,s,e(l))})),a===3?new Set(n):n})(t)}function Zl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return la(t)}function tc(){function t(s,l){var d=a[s];return d?d.enumerable=l:a[s]=d={configurable:!0,enumerable:l,get:function(){var p=this[X];return Oo.get(p,s)},set:function(p){var h=this[X];Oo.set(h,s,p)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][X];if(!d.P)switch(d.i){case 5:n(d)&&_t(d);break;case 4:r(d)&&_t(d)}}}function r(s){for(var l=s.t,d=s.k,p=Er(d),h=p.length-1;h>=0;h--){var f=p[h];if(f!==X){var m=l[f];if(m===void 0&&!Cr(l,f))return!0;var b=d[f],y=b&&b[X];if(y?y.t!==m:!ec(b,m))return!0}}var S=!!l[X];return p.length!==Er(l).length+(S?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function i(s){s.g&&ze(3,JSON.stringify(Tt(s)))}var a={};xf("ES5",{J:function(s,l){var d=Array.isArray(s),p=(function(f,m){if(f){for(var b=Array(m.length),y=0;y<m.length;y++)Object.defineProperty(b,""+y,t(y,!0));return b}var S=oc(m);delete S[X];for(var E=Er(S),O=0;O<E.length;O++){var T=E[O];S[T]=t(T,f||!!S[T].enumerable)}return Object.create(Object.getPrototypeOf(m),S)})(d,s),h={i:d?5:4,A:l?l.A:ra(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,X,{value:h,writable:!0}),p},S:function(s,l,d){d?vt(l)&&l[X].A===s&&e(s.p):(s.u&&(function p(h){if(h&&typeof h=="object"){var f=h[X];if(f){var m=f.t,b=f.k,y=f.R,S=f.i;if(S===4)Jt(b,(function(x){x!==X&&(m[x]!==void 0||Cr(m,x)?y[x]||p(b[x]):(y[x]=!0,_t(f)))})),Jt(m,(function(x){b[x]!==void 0||Cr(b,x)||(y[x]=!1,_t(f))}));else if(S===5){if(n(f)&&(_t(f),y.length=!0),b.length<m.length)for(var E=b.length;E<m.length;E++)y[E]=!1;else for(var O=m.length;O<b.length;O++)y[O]=!0;for(var T=Math.min(b.length,m.length),v=0;v<T;v++)b.hasOwnProperty(v)||(y[v]=!0),y[v]===void 0&&p(b[v])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var Yl,Eo,ua=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Cf=typeof Map<"u",Ef=typeof Set<"u",Xl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",rc=ua?Symbol.for("immer-nothing"):((Yl={})["immer-nothing"]=!0,Yl),Jl=ua?Symbol.for("immer-draftable"):"__$immer_draftable",X=ua?Symbol.for("immer-state"):"__$immer_state";var Of=""+Object.prototype.constructor,Er=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,oc=Object.getOwnPropertyDescriptors||function(t){var e={};return Er(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},ia={},Oo={get:function(t,e){if(e===X)return t;var r=Tt(t);if(!Cr(r,e))return(function(i,a,s){var l,d=ql(a,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(i.k):void 0})(t,r,e);var n=r[e];return t.I||!Ke(n)?n:n===ea(t.t,e)?(ta(t),t.o[e]=na(t.A.h,n,t)):n},has:function(t,e){return e in Tt(t)},ownKeys:function(t){return Reflect.ownKeys(Tt(t))},set:function(t,e,r){var n=ql(Tt(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var i=ea(Tt(t),e),a=i?.[X];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(ec(r,i)&&(r!==void 0||Cr(t.t,e)))return!0;ta(t),_t(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return ea(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,ta(t),_t(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Tt(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){ze(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ze(12)}},Co={};Jt(Oo,(function(t,e){Co[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Co.deleteProperty=function(t,e){return Co.set.call(this,t,e,void 0)},Co.set=function(t,e,r){return Oo.set.call(this,t[0],e,r,t[0])};var Af=(function(){function t(r){var n=this;this.O=Xl,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var l=a;a=i;var d=n;return function(S){var E=this;S===void 0&&(S=l);for(var O=arguments.length,T=Array(O>1?O-1:0),v=1;v<O;v++)T[v-1]=arguments[v];return d.produce(S,(function(x){var C;return(C=a).call.apply(C,[E,x].concat(T))}))}}var p;if(typeof a!="function"&&ze(6),s!==void 0&&typeof s!="function"&&ze(7),Ke(i)){var h=jl(n),f=na(n,i,void 0),m=!0;try{p=a(f),m=!1}finally{m?sn(h):oa(h)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return Ji(h,s),Qi(S,h)}),(function(S){throw sn(h),S})):(Ji(h,s),Qi(p,h))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===rc&&(p=void 0),n.D&&ca(p,!0),s){var b=[],y=[];lt("Patches").M(i,p,b,y),s(b,y)}return p}ze(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var h=arguments.length,f=Array(h>1?h-1:0),m=1;m<h;m++)f[m-1]=arguments[m];return n.produceWithPatches(p,(function(b){return i.apply(void 0,[b].concat(f))}))};var s,l,d=n.produce(i,a,(function(p,h){s=p,l=h}));return typeof Promise<"u"&&d instanceof Promise?d.then((function(p){return[p,s,l]})):[d,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Ke(r)||ze(8),vt(r)&&(r=Sf(r));var n=jl(this),i=na(this,r,void 0);return i[X].C=!0,oa(n),i},e.finishDraft=function(r,n){var i=r&&r[X],a=i.A;return Ji(a,n),Qi(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Xl&&ze(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var s=lt("Patches").$;return vt(r)?s(r,n):this.produce(r,(function(l){return s(l,n)}))},t})(),Me=new Af,wf=Me.produce,gv=Me.produceWithPatches.bind(Me),yv=Me.setAutoFreeze.bind(Me),bv=Me.setUseProxies.bind(Me),xv=Me.applyPatches.bind(Me),vv=Me.createDraft.bind(Me),Sv=Me.finishDraft.bind(Me),dn=wf;function Qt(t){"@babel/helpers - typeof";return Qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(t)}function nc(t,e){if(Qt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ic(t){var e=nc(t,"string");return Qt(e)=="symbol"?e:e+""}function ac(t,e,r){return(e=ic(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sc(Object(r),!0).forEach(function(n){ac(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sc(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function xe(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var lc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),fa=function(){return Math.random().toString(36).substring(7).split("").join(".")},un={INIT:"@@redux/INIT"+fa(),REPLACE:"@@redux/REPLACE"+fa(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fa()}};function Rf(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function ha(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(xe(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(xe(1));return r(ha)(t,e)}if(typeof t!="function")throw new Error(xe(2));var i=t,a=e,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function h(){if(d)throw new Error(xe(3));return a}function f(S){if(typeof S!="function")throw new Error(xe(4));if(d)throw new Error(xe(5));var E=!0;return p(),l.push(S),function(){if(E){if(d)throw new Error(xe(6));E=!1,p();var T=l.indexOf(S);l.splice(T,1),s=null}}}function m(S){if(!Rf(S))throw new Error(xe(7));if(typeof S.type>"u")throw new Error(xe(8));if(d)throw new Error(xe(9));try{d=!0,a=i(a,S)}finally{d=!1}for(var E=s=l,O=0;O<E.length;O++){var T=E[O];T()}return S}function b(S){if(typeof S!="function")throw new Error(xe(10));i=S,m({type:un.REPLACE})}function y(){var S,E=f;return S={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(xe(11));function v(){T.next&&T.next(h())}v();var x=E(v);return{unsubscribe:x}}},S[lc]=function(){return this},S}return m({type:un.INIT}),n={dispatch:m,subscribe:f,getState:h,replaceReducer:b},n[lc]=y,n}function Lf(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:un.INIT});if(typeof n>"u")throw new Error(xe(12));if(typeof r(void 0,{type:un.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xe(13))})}function cc(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var a=Object.keys(r),s,l;try{Lf(r)}catch(d){l=d}return function(p,h){if(p===void 0&&(p={}),l)throw l;if(0)var f;for(var m=!1,b={},y=0;y<a.length;y++){var S=a[y],E=r[S],O=p[S],T=E(O,h);if(typeof T>"u"){var v=h&&h.type;throw new Error(xe(14))}b[S]=T,m=m||T!==O}return m=m||a.length!==Object.keys(p).length,m?b:p}}function Ar(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function dc(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(xe(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return a=Ar.apply(void 0,l)(i.dispatch),pa(pa({},i),{},{dispatch:a})}}}function uc(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(l){return typeof l=="function"?l(i,a,t):s(l)}}};return e}var pc=uc();pc.withExtraArgument=uc;var ma=pc;var yc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Tf=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(h){return d([p,h])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,i=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){r.label=p[1];break}if(p[0]===6&&r.label<a[1]){r.label=a[1],a=p;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(p);break}a[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(t,r)}catch(h){p=[6,h],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},wr=function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},_f=Object.defineProperty,kf=Object.defineProperties,Pf=Object.getOwnPropertyDescriptors,fc=Object.getOwnPropertySymbols,Nf=Object.prototype.hasOwnProperty,If=Object.prototype.propertyIsEnumerable,hc=function(t,e,r){return e in t?_f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},kt=function(t,e){for(var r in e||(e={}))Nf.call(e,r)&&hc(t,r,e[r]);if(fc)for(var n=0,i=fc(e);n<i.length;n++){var r=i[n];If.call(e,r)&&hc(t,r,e[r])}return t},ga=function(t,e){return kf(t,Pf(e))},Df=function(t,e,r){return new Promise(function(n,i){var a=function(d){try{l(r.next(d))}catch(p){i(p)}},s=function(d){try{l(r.throw(d))}catch(p){i(p)}},l=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(a,s)};l((r=r.apply(t,e)).next())})};var Mf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ar:Ar.apply(null,arguments)},$v=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Ff(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Pt(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return kt(kt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}var Uf=(function(t){yc(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,wr([void 0],r[0].concat(this)))):new(e.bind.apply(e,wr([void 0],r.concat(this))))},e})(Array),$f=(function(t){yc(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,wr([void 0],r[0].concat(this)))):new(e.bind.apply(e,wr([void 0],r.concat(this))))},e})(Array);function xa(t){return Ke(t)?dn(t,function(){}):t}function Bf(t){return typeof t=="boolean"}function Hf(){return function(e){return zf(e)}}function zf(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,l=t.actionCreatorCheck,d=l===void 0?!0:l,p=new Uf;if(r&&(Bf(r)?p.push(ma):p.push(ma.withExtraArgument(r.extraArgument))),0){if(i)var h;if(s)var f;if(d)var m}return p}var ya=!0;function bc(t){var e=Hf(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,s=a===void 0?e():a,l=r.devTools,d=l===void 0?!0:l,p=r.preloadedState,h=p===void 0?void 0:p,f=r.enhancers,m=f===void 0?void 0:f,b;if(typeof i=="function")b=i;else if(Ff(i))b=cc(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var y=s;if(typeof y=="function"&&(y=y(e),!ya&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ya&&y.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=dc.apply(void 0,y),E=Ar;d&&(E=Mf(kt({trace:!ya},typeof d=="object"&&d)));var O=new $f(S),T=O;Array.isArray(m)?T=wr([S],m):typeof m=="function"&&(T=m(O));var v=E.apply(void 0,T);return ha(b,h,v)}function xc(t){var e={},r=[],n,i={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[l]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,r,n]}function Vf(t){return typeof t=="function"}function Wf(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?xc(e):[e,r,n],a=i[0],s=i[1],l=i[2],d;if(Vf(t))d=function(){return xa(t())};else{var p=xa(t);d=function(){return p}}function h(f,m){f===void 0&&(f=d());var b=wr([a[m.type]],s.filter(function(y){var S=y.matcher;return S(m)}).map(function(y){var S=y.reducer;return S}));return b.filter(function(y){return!!y}).length===0&&(b=[l]),b.reduce(function(y,S){if(S)if(vt(y)){var E=y,O=S(E,m);return O===void 0?y:O}else{if(Ke(y))return dn(y,function(T){return S(T,m)});var O=S(y,m);if(O===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return O}return y},f)}return h.getInitialState=d,h}function Gf(t,e){return t+"/"+e}function vc(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:xa(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},l={};i.forEach(function(h){var f=n[h],m=Gf(e,h),b,y;"reducer"in f?(b=f.reducer,y=f.prepare):b=f,a[h]=b,s[m]=b,l[h]=y?Pt(m,y):Pt(m)});function d(){var h=typeof t.extraReducers=="function"?xc(t.extraReducers):[t.extraReducers],f=h[0],m=f===void 0?{}:f,b=h[1],y=b===void 0?[]:b,S=h[2],E=S===void 0?void 0:S,O=kt(kt({},m),s);return Wf(r,function(T){for(var v in O)T.addCase(v,O[v]);for(var x=0,C=y;x<C.length;x++){var _=C[x];T.addMatcher(_.matcher,_.reducer)}E&&T.addDefaultCase(E)})}var p;return{name:e,reducer:function(h,f){return p||(p=d()),p(h,f)},actions:l,caseReducers:a,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var jf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Kf=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=jf[Math.random()*64|0];return e},qf=["name","message","stack","code"],ba=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),mc=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Zf=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=qf;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},Vv=(function(){function t(e,r,n){var i=Pt(e+"/fulfilled",function(h,f,m,b){return{payload:h,meta:ga(kt({},b||{}),{arg:m,requestId:f,requestStatus:"fulfilled"})}}),a=Pt(e+"/pending",function(h,f,m){return{payload:void 0,meta:ga(kt({},m||{}),{arg:f,requestId:h,requestStatus:"pending"})}}),s=Pt(e+"/rejected",function(h,f,m,b,y){return{payload:b,error:(n&&n.serializeError||Zf)(h||"Rejected"),meta:ga(kt({},y||{}),{arg:m,requestId:f,rejectedWithValue:!!b,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:(function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h})();function p(h){return function(f,m,b){var y=n?.idGenerator?n.idGenerator(h):Kf(),S=new d,E,O=!1;function T(x){E=x,S.abort()}var v=(function(){return Df(this,null,function(){var x,C,_,$,ie,j,P;return Tf(this,function(D){switch(D.label){case 0:return D.trys.push([0,4,,5]),$=(x=n?.condition)==null?void 0:x.call(n,h,{getState:m,extra:b}),Xf($)?[4,$]:[3,2];case 1:$=D.sent(),D.label=2;case 2:if($===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return O=!0,ie=new Promise(function(W,se){return S.signal.addEventListener("abort",function(){return se({name:"AbortError",message:E||"Aborted"})})}),f(a(y,h,(C=n?.getPendingMeta)==null?void 0:C.call(n,{requestId:y,arg:h},{getState:m,extra:b}))),[4,Promise.race([ie,Promise.resolve(r(h,{dispatch:f,getState:m,extra:b,requestId:y,signal:S.signal,abort:T,rejectWithValue:function(W,se){return new ba(W,se)},fulfillWithValue:function(W,se){return new mc(W,se)}})).then(function(W){if(W instanceof ba)throw W;return W instanceof mc?i(W.payload,y,h,W.meta):i(W,y,h)})])];case 3:return _=D.sent(),[3,5];case 4:return j=D.sent(),_=j instanceof ba?s(null,y,h,j.payload,j.meta):s(j,y,h),[3,5];case 5:return P=n&&!n.dispatchConditionRejection&&s.match(_)&&_.meta.condition,P||f(_),[2,_]}})})})();return Object.assign(v,{abort:T,requestId:y,arg:h,unwrap:function(){return v.then(Yf)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t})();function Yf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Xf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Sc="listener",Cc="completed",Ec="cancelled",Wv="task-"+Ec,Gv="task-"+Cc,jv=Sc+"-"+Ec,Kv=Sc+"-"+Cc;var va="listenerMiddleware";var qv=Pt(va+"/add"),Zv=Pt(va+"/removeAll"),Yv=Pt(va+"/remove");var gc,Xv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(gc||(gc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Jf=function(t){return function(e){setTimeout(e,t)}},Jv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Jf(10);tc();window.ftReduxStores||(window.ftReduxStores={});var Nt=class t extends gt{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Sr(a))return a;if(i==null)return;let s=vc({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),l=bc({reducer:(d,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=_e(s.getInitialState());for(let f of p.keeping)h[f]=(d??h)[f];return h}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...p.overwrites};return s.reducer(d,p)}});return window.ftReduxStores[i.name]=new t(s,l,i.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new vo;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,l)=>{let d=s,p=a[d];return p?(...h)=>{let f=p(...h.map(i));return this.reduxStore.dispatch(f),f}:h=>{this.setState({[d]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function Qf(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Sr(e)&&e.clear()}var pn=class{constructor(e,r,n){this.store=e,this.valueSelector=r,this.callback=n}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);be(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function Oc(t,e,r){return new pn(t,e,r).watch()}var Rr=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let n of r)this.getOrCreateRequestConsumers(n).add(e).size==1&&this.onNewNeededRequest(n)}unregisterComponent(e,r){for(let n of r)this.getOrCreateRequestConsumers(n).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Oa={};V(Oa,{scrollHelper:()=>eh});var Ca,fn=new Map,Ea=class{lock(e,r){if(r){let n=fn.get(r);if(n==null||n===e)return fn.set(r,e),r}}release(e,r){r&&fn.get(r)===e&&fn.delete(r)}findFirstScrollableParent(e){var r;let n,i;for(let a of ai(e)){let s=a,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else l&&i==null&&(i=s)}return(r=n??i)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var n,i;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(n=r.offsetTop)!==null&&n!==void 0?n:0,r=r.offsetParent;return a+((i=r?.offsetTop)!==null&&i!==void 0?i:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let i=this.getAbsoluteScrollOffset(n,e),a=i-n.clientHeight+e.clientHeight,s=i,l=At(0,(s-n.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,l)*(a-s)+s;n.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(Ca=window.FluidTopicsScrollHelper)!==null&&Ca!==void 0?Ca:new Ea;var eh=window.FluidTopicsScrollHelper;var wa={};V(wa,{SearchPlaceConverter:()=>Tr,SearchPlaceQueryParams:()=>H,isSearchPlaceQueryParams:()=>ud,serializeRequest:()=>oh});var Ac;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ac||(Ac={}));var wc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(wc||(wc={}));var Rc;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Rc||(Rc={}));var Lc;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Lc||(Lc={}));var Tc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Tc||(Tc={}));var _c;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(_c||(_c={}));var kc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(kc||(kc={}));var Pc;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Pc||(Pc={}));var Nc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Nc||(Nc={}));var Ic;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Ic||(Ic={}));var Dc;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(Dc||(Dc={}));var Mc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Mc||(Mc={}));var Fc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Fc||(Fc={}));var Uc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Uc||(Uc={}));var $c;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})($c||($c={}));var Bc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Bc||(Bc={}));var er;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(er||(er={}));var Hc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Hc||(Hc={}));var zc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(zc||(zc={}));var hn;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(hn||(hn={}));var Zc=t=>Object.keys(hn).includes(t);var Vc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Vc||(Vc={}));var Wc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Wc||(Wc={}));var Gc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Gc||(Gc={}));var Lr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Lr||(Lr={}));var Yc=t=>Object.keys(Lr).includes(t);var jc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(jc||(jc={}));var Aa;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Aa||(Aa={}));var Kc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Kc||(Kc={}));var ae;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ae||(ae={}));var Ve;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Ve||(Ve={}));var qc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(qc||(qc={}));var Xc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Xc||(Xc={}));var Jc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Jc||(Jc={}));var Qc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Qc||(Qc={}));var ed;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(ed||(ed={}));var td;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(td||(td={}));var rd;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(rd||(rd={}));var od;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(od||(od={}));var nd;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(nd||(nd={}));var id;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(id||(id={}));var ad;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(ad||(ad={}));var sd;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(sd||(sd={}));var th={[ae.PERSONAL_BOOK_SHARE_USER]:[ae.PERSONAL_BOOK_USER],[ae.HTML_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.PDF_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.KHUB_ADMIN]:[ae.CONTENT_PUBLISHER],[ae.ADMIN]:[ae.KHUB_ADMIN,ae.USERS_ADMIN,ae.PORTAL_ADMIN,ae.BEHAVIOR_DATA_USER],[ae.GENERATIVE_AI_EXPORT_USER]:[ae.GENERATIVE_AI_USER]};function ld(t,e){return t===e||(th[t]??[]).some(r=>ld(r,e))}function cd(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>ld(n,e))}function rh(t){return`"${t}"`}function dd(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function oh(t,e){return new Tr(t).serialize(e)}var H;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(H||(H={}));var nh=new Set(Object.values(H));function ud(t){return nh.has(t)}var Tr=class{constructor(e,r=20,n=!1,i="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=n,this.defaultContentLocale=i,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let n=r==null||r.trim().length===0,i=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return i.search=this.toURLSearchParams(e),i.toString()}toURLSearchParams(e,r=!1){var n,i,a,s,l,d,p,h,f,m,b;let y=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&y.append(H.LOCALE,e.contentLocale):y.append(H.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&y.append(H.QUERY,e.query);let S=(a=(i=e.metadataFilters)===null||i===void 0?void 0:i.filter(x=>x.valueFilter&&!x.valueFilter.negative))!==null&&a!==void 0?a:[];if(S.length>0){let x=S.map(C=>{var _,$;let ie=(($=(_=C.valueFilter)===null||_===void 0?void 0:_.values)!==null&&$!==void 0?$:[]).map(j=>this.escapeFilters(j)).map(j=>rh(dd(j))).join("_");return`${C.key}~${ie}`}).join("*");y.append(H.VALUE_FILTERS,x)}let E=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(x=>x.dateFilter))!==null&&l!==void 0?l:[];if(E.length>0){let x=E.map(C=>{var _;return`${C.key}~${(_=C.dateFilter)===null||_===void 0?void 0:_.type.toLowerCase()}`}).join("*");y.append(H.DATE_FILTERS,x)}let O=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(x=>x.rangeFilter))!==null&&p!==void 0?p:[];if(O.length>0){let x=O.map(C=>{var _,$;return`${C.key}~${(_=C.rangeFilter)===null||_===void 0?void 0:_.from}_${($=C.rangeFilter)===null||$===void 0?void 0:$.to}`}).join("*");y.append(H.RANGE_FILTERS,x)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&y.append(H.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&y.append(H.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&y.append(H.SORT,e.sortId),!((h=e.paging)===null||h===void 0)&&h.perPage&&((m=(f=e.paging)===null||f===void 0?void 0:f.perPage)!==null&&m!==void 0?m:this.defaultPerPage)!=this.defaultPerPage&&y.append(H.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&y.append(H.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let T=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let x in T)y.append(x,T[x]);let v=new Array;return y.forEach((x,C)=>{v.push(this.encodeQueryString(C)+"="+this.encodeQueryString(x))}),encodeURI(v.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let n=e.split("?"),i=this.fromURLSearchParams(n.slice(1).join("?")),a=n[0].split("/search/")[1];return a==null?i:{...i,scope:(r=this.scopeMapping[a])!==null&&r!==void 0?r:i.scope}}fromURLSearchParams(e){var r,n,i,a,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(O){console.warn("Could not decode search request query params, fallback on raw value",O)}let d=new URLSearchParams(e),p=d.get(H.LOCALE)==="all"?void 0:d.get(H.LOCALE),h=((r=d.get(H.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),f=(n=d.get(H.SORT))===null||n===void 0?void 0:n.toLowerCase(),m=(i=d.get(H.SCOPE))!==null&&i!==void 0?i:"default",b=+((a=d.get(H.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),y=d.get(H.KEYWORD_MATCH),S=y?y.toUpperCase()===er.MANDATORY?er.MANDATORY:er.OPTIONAL:void 0,E={};for(let O of d.keys())ud(O)||(E[O]=d.get(O));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(H.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[m])!==null&&l!==void 0?l:"DEFAULT",virtualField:Zc(h)?h:"EVERYWHERE",sortId:f,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:At(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:S,otherQueryParams:E}}parseCompatFilters(e){var r,n,i,a,s,l;let d=[];return e.has(H.FILTERS)&&(d=this.parseValueFilters((r=e.get(H.FILTERS))!==null&&r!==void 0?r:"")),(n=e.has(H.PERIOD))!==null&&n!==void 0&&n&&(d=[...d,...this.parseLegacyPeriodFilter(((i=e.get(H.PERIOD))!==null&&i!==void 0?i:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(H.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(H.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(H.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(dd).map(n=>this.unescapeFilterValue(n)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Lr[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(r,n);return e}superEscapeFilters(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(n,i);return e}unescapeFilterValue(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(i,r);return e}parseLegacyPeriodFilter(e){if(Yc(e))return[{key:"ft:lastEdition",dateFilter:{type:Lr[e]}}];if(e.startsWith("CUSTOM_")){let[r,n,i]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:i}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[H.LOCALE,H.FILTERS,H.VALUE_FILTERS,H.DATE_FILTERS,H.RANGE_FILTERS].forEach(i=>{r.searchParams.delete(i)}),r.toString()}static updateLocaleParamInUrl(e,r){let n=new URL(e);return n.searchParams.delete(H.LOCALE),r!==void 0&&n.searchParams.append(H.LOCALE,r),n.toString()}};var Ta={};V(Ta,{toFtFormComponent:()=>La});var Ra=Symbol("elementInternals"),La=ce(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Ra].form}constructor(...n){super(n),this[Ra]=this.attachInternals()}setFormValue(n){this[Ra].setFormValue(n)}}return e});var _a={};V(_a,{DateFormatter:()=>tr});var tr=class{static format(e,r,n,i,a){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,i,!!a)):this.getIntlDateTime(e,r,n,i,!!a)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,i,a){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return a?d:i?`${l} ${d}`:l}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Pa={};V(Pa,{ALL_KEYS_VALUE:()=>ka,SameWindowStorageEvent:()=>_r});var ka="__all__",_r=class extends CustomEvent{constructor(e,r,n){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==ka}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new _r(r[0],n,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new _r(r[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new _r(ka))}});var Ia={};V(Ia,{FocusMainContentEvent:()=>Na});var Na=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var pd={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function ih(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function ah(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",ih);document.addEventListener("click",ah);var fd=k`
48
48
  .sr-only {
49
49
  position:absolute;
50
50
  left:-10000px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-facet",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "description": "Search facet for integrated search component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,16 +19,16 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-filter": "2.1.5",
23
- "@fluid-topics/ft-i18n": "2.1.5",
24
- "@fluid-topics/ft-search-context": "2.1.5",
25
- "@fluid-topics/ft-tree-selector": "2.1.5",
26
- "@fluid-topics/ft-typography": "2.1.5",
27
- "@fluid-topics/ft-wc-utils": "2.1.5",
22
+ "@fluid-topics/ft-filter": "2.1.7",
23
+ "@fluid-topics/ft-i18n": "2.1.7",
24
+ "@fluid-topics/ft-search-context": "2.1.7",
25
+ "@fluid-topics/ft-tree-selector": "2.1.7",
26
+ "@fluid-topics/ft-typography": "2.1.7",
27
+ "@fluid-topics/ft-wc-utils": "2.1.7",
28
28
  "lit": "3.1.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@fluid-topics/public-api": "1.0.127"
31
+ "@fluid-topics/public-api": "1.0.128"
32
32
  },
33
- "gitHead": "cea42544a196f1f784982f8a666a27c534578779"
33
+ "gitHead": "a37679b529fc9821ce025bdedbf909d9f51b4c48"
34
34
  }