@fluid-topics/ft-search-locale-selector 2.0.11 → 2.0.12

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.
@@ -601,7 +601,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
601
601
  <div class="ft-ripple--background"></div>
602
602
  <div class="ft-ripple--effect"></div>
603
603
  </div>
604
- `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var r,n;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(n=this.target)===null||n===void 0||n.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,r;let n=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;n&&this.setupFor((r=this.target)!==null&&r!==void 0?r:n)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let r=(...l)=>f=>{l.forEach(u=>window.addEventListener(u,this.endPress,{once:!0})),this.startPress(f)},n=r("mouseup","contextmenu"),a=r("touchend","touchcancel"),i=l=>{["Enter"," "].includes(l.key)&&r("keyup")(l)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",n,s),t.addEventListener("touchstart",a,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",i,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",n,s),t.removeEventListener("touchstart",a,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",i,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let r=t,n=t,a,i;return r.x!=null?{x:a,y:i}=r:n.touches!=null&&(a=n.touches[0].clientX,i=n.touches[0].clientY),{x:a,y:i}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let r of t.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};q.elementDefinitions={};q.styles=Jc;Ge([(0,ke.property)({type:Boolean})],q.prototype,"primary",void 0);Ge([(0,ke.property)({type:Boolean})],q.prototype,"secondary",void 0);Ge([(0,ke.property)({type:Boolean})],q.prototype,"unbounded",void 0);Ge([(0,ke.property)({type:Boolean})],q.prototype,"activated",void 0);Ge([(0,ke.property)({type:Boolean})],q.prototype,"selected",void 0);Ge([(0,ke.property)({type:Boolean})],q.prototype,"disabled",void 0);Ge([(0,ke.state)()],q.prototype,"hovered",void 0);Ge([(0,ke.state)()],q.prototype,"focused",void 0);Ge([(0,ke.state)()],q.prototype,"pressed",void 0);Ge([(0,ke.state)()],q.prototype,"rippling",void 0);Ge([(0,ke.state)()],q.prototype,"originX",void 0);Ge([(0,ke.state)()],q.prototype,"originY",void 0);Ge([(0,ke.query)(".ft-ripple")],q.prototype,"ripple",void 0);Ge([(0,ke.query)(".ft-ripple--effect")],q.prototype,"rippleEffect",void 0);var Xl=v(w());(0,Xl.customElement)("ft-ripple")(q);var Cd=v(U()),pt=v(K()),ut=v(w());var Jl=["top","right","bottom","left"],Ql=["start","end"],Ai=Jl.reduce((e,t)=>e.concat(t,t+"-"+Ql[0],t+"-"+Ql[1]),[]),qo=Math.min,nr=Math.max,Zo=Math.round;var St=e=>({x:e,y:e}),pu={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(e,t,r){return nr(e,qo(t,r))}function Bn(e,t){return typeof e=="function"?e(t):e}function po(e){return e.split("-")[0]}function ar(e){return e.split("-")[1]}function wi(e){return e==="x"?"y":"x"}function _i(e){return e==="y"?"height":"width"}function $n(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ni(e){return wi($n(e))}function e1(e,t,r){r===void 0&&(r=!1);let n=ar(e),a=Ni(e),i=_i(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Li(s)),[s,Li(s)]}function t1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Li(e){let t=po(e);return pu[t]+e.slice(t.length)}function hu(e){return{top:0,right:0,bottom:0,left:0,...e}}function r1(e){return typeof e!="number"?hu(e):{top:e,right:e,bottom:e,left:e}}function Tr(e){let{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function o1(e,t,r){let{reference:n,floating:a}=e,i=$n(t),s=Ni(t),l=_i(s),f=po(t),u=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,S;switch(f){case"top":S={x:m,y:n.y-a.height};break;case"bottom":S={x:m,y:n.y+n.height};break;case"right":S={x:n.x+n.width,y:g};break;case"left":S={x:n.x-a.width,y:g};break;default:S={x:n.x,y:n.y}}switch(ar(t)){case"start":S[s]-=y*(r&&u?-1:1);break;case"end":S[s]+=y*(r&&u?-1:1);break}return S}async function n1(e,t){var r;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:S=0}=Bn(t,e),C=r1(S),N=l[y?g==="floating"?"reference":"floating":g],M=Tr(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(N)))==null||r?N:N.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:m,strategy:f})),T=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),$=await(i.isElement==null?void 0:i.isElement(D))?await(i.getScale==null?void 0:i.getScale(D))||{x:1,y:1}:{x:1,y:1},W=Tr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:T,offsetParent:D,strategy:f}):T);return{top:(M.top-W.top+C.top)/$.y,bottom:(W.bottom-M.bottom+C.bottom)/$.y,left:(M.left-W.left+C.left)/$.x,right:(W.right-M.right+C.right)/$.x}}var mu=50,a1=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:n1},f=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=o1(u,n,f),y=n,S=0,C={};for(let L=0;L<i.length;L++){let N=i[L];if(!N)continue;let{name:M,fn:T}=N,{x:D,y:$,data:W,reset:ae}=await T({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:C,rects:u,platform:l,elements:{reference:e,floating:t}});m=D??m,g=$??g,C[M]={...C[M],...W},ae&&S<mu&&(S++,typeof ae=="object"&&(ae.placement&&(y=ae.placement),ae.rects&&(u=ae.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):ae.rects),{x:m,y:g}=o1(u,y,f)),L=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:C}};function gu(e,t,r){return(e?[...r.filter(a=>ar(a)===e),...r.filter(a=>ar(a)!==e)]:r.filter(a=>po(a)===a)).filter(a=>e?ar(a)===e||(t?t1(a)!==a:!1):!0)}var i1=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:u}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Ai,autoAlignment:S=!0,...C}=Bn(e,t),L=g!==void 0||y===Ai?gu(g||null,S,y):y,N=await f.detectOverflow(t,C),M=((r=s.autoPlacement)==null?void 0:r.index)||0,T=L[M];if(T==null)return{};let D=e1(T,i,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(l!==T)return{reset:{placement:L[0]}};let $=[N[po(T)],N[D[0]],N[D[1]]],W=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:T,overflows:$}],ae=L[M+1];if(ae)return{data:{index:M+1,overflows:W},reset:{placement:ae}};let Fe=W.map(_e=>{let x=ar(_e.placement);return[_e.placement,x&&m?_e.overflows.slice(0,2).reduce((E,H)=>E+H,0):_e.overflows[0],_e.overflows]}).sort((_e,x)=>_e[1]-x[1]),_t=((a=Fe.filter(_e=>_e[2].slice(0,ar(_e[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||Fe[0][0];return _t!==l?{data:{index:M+1,overflows:W},reset:{placement:_t}}:{}}}};var s1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:M=>{let{x:T,y:D}=M;return{x:T,y:D}}},...u}=Bn(e,t),m={x:r,y:n},g=await i.detectOverflow(t,u),y=$n(po(a)),S=wi(y),C=m[S],L=m[y];if(s){let M=S==="y"?"top":"left",T=S==="y"?"bottom":"right",D=C+g[M],$=C-g[T];C=Ri(D,C,$)}if(l){let M=y==="y"?"top":"left",T=y==="y"?"bottom":"right",D=L+g[M],$=L-g[T];L=Ri(D,L,$)}let N=f.fn({...t,[S]:C,[y]:L});return{...N,data:{x:N.x-r,y:N.y-n,enabled:{[S]:s,[y]:l}}}}}};function Hn(){return typeof window<"u"}function Mr(e){return l1(e)?(e.nodeName||"").toLowerCase():"#document"}function We(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(e){var t;return(t=(l1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function l1(e){return Hn()?e instanceof Node||e instanceof We(e).Node:!1}function st(e){return Hn()?e instanceof Element||e instanceof We(e).Element:!1}function Pt(e){return Hn()?e instanceof HTMLElement||e instanceof We(e).HTMLElement:!1}function c1(e){return!Hn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof We(e).ShadowRoot}function ho(e){let{overflow:t,overflowX:r,overflowY:n,display:a}=ct(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&a!=="inline"&&a!=="contents"}function d1(e){return/^(table|td|th)$/.test(Mr(e))}function Yo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var yu=/transform|translate|scale|rotate|perspective|filter/,bu=/paint|layout|strict|content/,kr=e=>!!e&&e!=="none",Ti;function Fn(e){let t=st(e)?ct(e):e;return kr(t.transform)||kr(t.translate)||kr(t.scale)||kr(t.rotate)||kr(t.perspective)||!Gn()&&(kr(t.backdropFilter)||kr(t.filter))||yu.test(t.willChange||"")||bu.test(t.contain||"")}function f1(e){let t=jt(e);for(;Pt(t)&&!Pr(t);){if(Fn(t))return t;if(Yo(t))return null;t=jt(t)}return null}function Gn(){return Ti==null&&(Ti=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ti}function Pr(e){return/^(html|body|#document)$/.test(Mr(e))}function ct(e){return We(e).getComputedStyle(e)}function Xo(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jt(e){if(Mr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||c1(e)&&e.host||Mt(e);return c1(t)?t.host:t}function u1(e){let t=jt(e);return Pr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&ho(t)?t:u1(t)}function Un(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let a=u1(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=We(a);if(i){let l=Wn(s);return t.concat(s,s.visualViewport||[],ho(a)?a:[],l&&r?Un(l):[])}else return t.concat(a,Un(a,[],r))}function Wn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function g1(e){let t=ct(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Pt(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,l=Zo(r)!==i||Zo(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function y1(e){return st(e)?e:e.contextElement}function mo(e){let t=y1(e);if(!Pt(t))return St(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:i}=g1(t),s=(i?Zo(r.width):r.width)/n,l=(i?Zo(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var vu=St(0);function b1(e){let t=We(e);return!Gn()||!t.visualViewport?vu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xu(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==We(e)?!1:t}function Qo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),i=y1(e),s=St(1);t&&(n?st(n)&&(s=mo(n)):s=mo(e));let l=xu(i,r,n)?b1(i):St(0),f=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=We(i),S=n&&st(n)?We(n):n,C=y,L=Wn(C);for(;L&&n&&S!==C;){let N=mo(L),M=L.getBoundingClientRect(),T=ct(L),D=M.left+(L.clientLeft+parseFloat(T.paddingLeft))*N.x,$=M.top+(L.clientTop+parseFloat(T.paddingTop))*N.y;f*=N.x,u*=N.y,m*=N.x,g*=N.y,f+=D,u+=$,C=We(L),L=Wn(C)}}return Tr({width:m,height:g,x:f,y:u})}function Vn(e,t){let r=Xo(e).scrollLeft;return t?t.left+r:Qo(Mt(e)).left+r}function v1(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Vn(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function Su(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Mt(n),l=t?Yo(t.floating):!1;if(n===s||l&&i)return r;let f={scrollLeft:0,scrollTop:0},u=St(1),m=St(0),g=Pt(n);if((g||!g&&!i)&&((Mr(n)!=="body"||ho(s))&&(f=Xo(n)),g)){let S=Qo(n);u=mo(n),m.x=S.x+n.clientLeft,m.y=S.y+n.clientTop}let y=s&&!g&&!i?v1(s,f):St(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+m.x+y.x,y:r.y*u.y-f.scrollTop*u.y+m.y+y.y}}function Cu(e){return Array.from(e.getClientRects())}function Ou(e){let t=Mt(e),r=Xo(e),n=e.ownerDocument.body,a=nr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=nr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+Vn(e),l=-r.scrollTop;return ct(n).direction==="rtl"&&(s+=nr(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var p1=25;function Eu(e,t){let r=We(e),n=Mt(e),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,f=0;if(a){i=a.width,s=a.height;let m=Gn();(!m||m&&t==="fixed")&&(l=a.offsetLeft,f=a.offsetTop)}let u=Vn(n);if(u<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),S=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(n.clientWidth-g.clientWidth-S);C<=p1&&(i-=C)}else u<=p1&&(i+=u);return{width:i,height:s,x:l,y:f}}function Lu(e,t){let r=Qo(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=Pt(e)?mo(e):St(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,u=n*i.y;return{width:s,height:l,x:f,y:u}}function h1(e,t,r){let n;if(t==="viewport")n=Eu(e,r);else if(t==="document")n=Ou(Mt(e));else if(st(t))n=Lu(t,r);else{let a=b1(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Tr(n)}function x1(e,t){let r=jt(e);return r===t||!st(r)||Pr(r)?!1:ct(r).position==="fixed"||x1(r,t)}function Au(e,t){let r=t.get(e);if(r)return r;let n=Un(e,[],!1).filter(l=>st(l)&&Mr(l)!=="body"),a=null,i=ct(e).position==="fixed",s=i?jt(e):e;for(;st(s)&&!Pr(s);){let l=ct(s),f=Fn(s);!f&&l.position==="fixed"&&(a=null),(i?!f&&!a:!f&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||ho(s)&&!f&&x1(e,s))?n=n.filter(m=>m!==s):a=l,s=jt(s)}return t.set(e,n),n}function Ru(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,s=[...r==="clippingAncestors"?Yo(t)?[]:Au(t,this._c):[].concat(r),n],l=h1(t,s[0],a),f=l.top,u=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let S=h1(t,s[y],a);f=nr(S.top,f),u=qo(S.right,u),m=qo(S.bottom,m),g=nr(S.left,g)}return{width:u-g,height:m-f,x:g,y:f}}function wu(e){let{width:t,height:r}=g1(e);return{width:t,height:r}}function _u(e,t,r){let n=Pt(t),a=Mt(t),i=r==="fixed",s=Qo(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=St(0);function u(){f.x=Vn(a)}if(n||!n&&!i)if((Mr(t)!=="body"||ho(a))&&(l=Xo(t)),n){let S=Qo(t,!0,i,t);f.x=S.x+t.clientLeft,f.y=S.y+t.clientTop}else a&&u();i&&!n&&a&&u();let m=a&&!n&&!i?v1(a,l):St(0),g=s.left+l.scrollLeft-f.x-m.x,y=s.top+l.scrollTop-f.y-m.y;return{x:g,y,width:s.width,height:s.height}}function ki(e){return ct(e).position==="static"}function m1(e,t){if(!Pt(e)||ct(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Mt(e)===r&&(r=r.ownerDocument.body),r}function S1(e,t){let r=We(e);if(Yo(e))return r;if(!Pt(e)){let a=jt(e);for(;a&&!Pr(a);){if(st(a)&&!ki(a))return a;a=jt(a)}return r}let n=m1(e,t);for(;n&&d1(n)&&ki(n);)n=m1(n,t);return n&&Pr(n)&&ki(n)&&!Fn(n)?r:n||f1(e)||r}var Nu=async function(e){let t=this.getOffsetParent||S1,r=this.getDimensions,n=await r(e.floating);return{reference:_u(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Tu(e){return ct(e).direction==="rtl"}var jn={convertOffsetParentRelativeRectToViewportRelativeRect:Su,getDocumentElement:Mt,getClippingRect:Ru,getOffsetParent:S1,getElementRects:Nu,getClientRects:Cu,getDimensions:wu,getScale:mo,isElement:st,isRTL:Tu};var C1=i1,O1=s1;var E1=(e,t,r)=>{let n=new Map,a={platform:jn,...r},i={...a.platform,_c:n};return a1(e,t,{...a,platform:i})};function L1(e){return ku(e)}function Mi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function ku(e){for(let t=e;t;t=Mi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Mi(e);t;t=Mi(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||r.filter!=="none"||t.tagName==="BODY"))return t}return null}async function A1(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},E1(e,t,{strategy:n.strategy,platform:{...jn,getOffsetParent:a=>jn.getOffsetParent(a,L1)},middleware:[O1({crossAxis:!0}),C1({allowedPlacements:[n.placement]})]})}var Ro=v(w());var ns=v(K());function Mu(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Kn(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Kn(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null);if(a=i(e),r=a.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let s=a[n];if(!Kn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Kn(e,t){try{return Mu(e,t)}catch{return!1}}function Jo(e,t){return!Kn(e,t)}function R1(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function qn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var w1=v(K(),1);var Pi=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:Jo,attribute:!1,...t};(0,w1.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:l=>l[n],store:t.store})}};var Zn=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var zr=v(K(),1);var _1=v(K(),1);function N1(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,_1.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Jo,...t??{}})}var Yn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var k1=v(U(),1);var Xn=globalThis,Pu=Xn.ShadowRoot&&(Xn.ShadyCSS===void 0||Xn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mx=Symbol();var T1=(e,t)=>{if(Pu)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=Xn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var Qn=class extends k1.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return T1(n,t.elementStyles),n}};function M1(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var yo=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},D1,P1=Symbol("constructorPrototype"),z1=Symbol("constructorName"),B1=Symbol("exportpartsDebouncer"),I1=Symbol("dynamicDependenciesLoaded"),go=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};go.eventName="exportparts-updated";var zt=class extends Qn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[D1]=new Yn(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[B1].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[z1]=this.constructor.name,this[P1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[z1]&&Object.setPrototypeOf(this,this[P1])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[I1]||(r[I1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(go.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(go.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new go)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=M1(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,l;let f=y=>y!=null&&y.trim().length>0,u=t.filter(f).map(y=>y.trim());if(u.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(N=>N.split(":")[1]))!==null&&l!==void 0?l:[],L=[...S,...C].filter(f).map(N=>N.trim());for(let N of L)m.add(N)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>u.map(S=>`${y}:${S}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};D1=B1;yo([(0,zr.property)()],zt.prototype,"exportpartsPrefix",void 0);yo([N1([])],zt.prototype,"exportpartsPrefixes",void 0);yo([(0,zr.property)({reflect:!0})],zt.prototype,"exportparts",void 0);yo([(0,zr.property)()],zt.prototype,"customStylesheet",void 0);yo([(0,zr.property)()],zt.prototype,"elementToFocus",void 0);yo([(0,zr.state)()],zt.prototype,"useAdoptedStyleSheets",void 0);function Jn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var en=Symbol("internalReduxEventsUnsubscribers"),ir=Symbol("internalStoresUnsubscribers"),Ir=Symbol("internalStores"),zu=qn(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Ir].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ir].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ir].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Ir].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Ir].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Ir].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let u=this.getStore(s.store);u&&(s.store?this[ir].has(s.store):this[ir].size>0)&&(this[l]=s.selector(u.getState(),this))}})}subscribeToStore(s,l){var f;this[ir].set(s,l.subscribe(()=>this.updateFromStores())),this[en].set(s,[]),Jn(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||l.name===u.store)){let g=y=>this[m](y);l.addEventListener(u.eventName,g),this[en].get(s).push(()=>l.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ir].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[ir].has(s)&&this[ir].get(s)(),this[ir].delete(s),(l=this[en].get(s))===null||l===void 0||l.forEach(f=>f()),this[en].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ir,r=Ir,n=en,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),$1=class extends zu(zt){};function lt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Kt(e){return!!e&&!!e[se]}function Ct(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Gu}(e)||Array.isArray(e)||!!e[j1]||!!(!((t=e.constructor)===null||t===void 0)&&t[j1])||Gi(e)||Wi(e))}function Dr(e,t,r){r===void 0&&(r=!1),xo(e)===0?(r?Object.keys:vo)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function xo(e){var t=e[se];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Gi(e)?2:Wi(e)?3:0}function bo(e,t){return xo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Iu(e,t){return xo(e)===2?e.get(t):e[t]}function K1(e,t,r){var n=xo(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function q1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Gi(e){return Hu&&e instanceof Map}function Wi(e){return Fu&&e instanceof Set}function sr(e){return e.o||e.t}function Vi(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=X1(e);delete t[se];for(var r=vo(t),n=0;n<r.length;n++){var a=r[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function ji(e,t){return t===void 0&&(t=!1),Ki(e)||Kt(e)||!Ct(e)||(xo(e)>1&&(e.set=e.add=e.clear=e.delete=Du),Object.freeze(e),t&&Dr(e,function(r,n){return ji(n,!0)},!0)),e}function Du(){lt(2)}function Ki(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function It(e){var t=Fi[e];return t||lt(18,e),t}function Bu(e,t){Fi[e]||(Fi[e]=t)}function $i(){return rn}function zi(e,t){t&&(It("Patches"),e.u=[],e.s=[],e.v=t)}function ea(e){Ui(e),e.p.forEach($u),e.p=null}function Ui(e){e===rn&&(rn=e.l)}function U1(e){return rn={p:[],l:rn,h:e,m:!0,_:0}}function $u(e){var t=e[se];t.i===0||t.i===1?t.j():t.g=!0}function Ii(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||It("ES5").S(t,e,n),n?(r[se].P&&(ea(t),lt(4)),Ct(e)&&(e=ta(t,e),t.l||ra(t,e)),t.u&&It("Patches").M(r[se].t,e,t.u,t.s)):e=ta(t,r,[]),ea(t),t.u&&t.v(t.u,t.s),e!==Y1?e:void 0}function ta(e,t,r){if(Ki(t))return t;var n=t[se];if(!n)return Dr(t,function(l,f){return H1(e,n,t,l,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return ra(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Vi(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Dr(i,function(l,f){return H1(e,n,a,l,f,r,s)}),ra(e,a,!1),r&&e.u&&It("Patches").N(n,r,e.u,e.s)}return n.o}function H1(e,t,r,n,a,i,s){if(Kt(a)){var l=ta(e,a,i&&t&&t.i!==3&&!bo(t.R,n)?i.concat(n):void 0);if(K1(r,n,l),!Kt(l))return;e.m=!1}else s&&r.add(a);if(Ct(a)&&!Ki(a)){if(!e.h.D&&e._<1)return;ta(e,a),t&&t.A.l||ra(e,a)}}function ra(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ji(t,r)}function Di(e,t){var r=e[se];return(r?sr(r):e)[t]}function F1(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function cr(e){e.P||(e.P=!0,e.l&&cr(e.l))}function Bi(e){e.o||(e.o=Vi(e.t))}function Hi(e,t,r){var n=Gi(t)?It("MapSet").F(t,r):Wi(t)?It("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:$i(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,u=on;s&&(f=[l],u=tn);var m=Proxy.revocable(f,u),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y}(t,r):It("ES5").J(t,r);return(r?r.A:$i()).p.push(n),n}function Uu(e){return Kt(e)||lt(22,e),function t(r){if(!Ct(r))return r;var n,a=r[se],i=xo(r);if(a){if(!a.P&&(a.i<4||!It("ES5").K(a)))return a.t;a.I=!0,n=G1(r,i),a.I=!1}else n=G1(r,i);return Dr(n,function(s,l){a&&Iu(a.t,s)===l||K1(n,s,t(l))}),i===3?new Set(n):n}(e)}function G1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Vi(e)}function Z1(){function e(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var u=this[se];return on.get(u,s)},set:function(u){var m=this[se];on.set(m,s,u)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][se];if(!f.P)switch(f.i){case 5:n(f)&&cr(f);break;case 4:r(f)&&cr(f)}}}function r(s){for(var l=s.t,f=s.k,u=vo(f),m=u.length-1;m>=0;m--){var g=u[m];if(g!==se){var y=l[g];if(y===void 0&&!bo(l,g))return!0;var S=f[g],C=S&&S[se];if(C?C.t!==y:!q1(S,y))return!0}}var L=!!l[se];return u.length!==vo(l).length+(L?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var u=0;u<l.length;u++)if(!l.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&lt(3,JSON.stringify(sr(s)))}var i={};Bu("ES5",{J:function(s,l){var f=Array.isArray(s),u=function(g,y){if(g){for(var S=Array(y.length),C=0;C<y.length;C++)Object.defineProperty(S,""+C,e(C,!0));return S}var L=X1(y);delete L[se];for(var N=vo(L),M=0;M<N.length;M++){var T=N[M];L[T]=e(T,g||!!L[T].enumerable)}return Object.create(Object.getPrototypeOf(y),L)}(f,s),m={i:f?5:4,A:l?l.A:$i(),P:!1,I:!1,R:{},l,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,se,{value:m,writable:!0}),u},S:function(s,l,f){f?Kt(l)&&l[se].A===s&&t(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var g=m[se];if(g){var y=g.t,S=g.k,C=g.R,L=g.i;if(L===4)Dr(S,function($){$!==se&&(y[$]!==void 0||bo(y,$)?C[$]||u(S[$]):(C[$]=!0,cr(g)))}),Dr(y,function($){S[$]!==void 0||bo(S,$)||(C[$]=!1,cr(g))});else if(L===5){if(n(g)&&(cr(g),C.length=!0),S.length<y.length)for(var N=S.length;N<y.length;N++)C[N]=!1;else for(var M=y.length;M<S.length;M++)C[M]=!0;for(var T=Math.min(S.length,y.length),D=0;D<T;D++)S.hasOwnProperty(D)||(C[D]=!0),C[D]===void 0&&u(S[D])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var W1,rn,qi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Hu=typeof Map<"u",Fu=typeof Set<"u",V1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Y1=qi?Symbol.for("immer-nothing"):((W1={})["immer-nothing"]=!0,W1),j1=qi?Symbol.for("immer-draftable"):"__$immer_draftable",se=qi?Symbol.for("immer-state"):"__$immer_state";var Gu=""+Object.prototype.constructor,vo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,X1=Object.getOwnPropertyDescriptors||function(e){var t={};return vo(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},Fi={},on={get:function(e,t){if(t===se)return e;var r=sr(e);if(!bo(r,t))return function(a,i,s){var l,f=F1(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!Ct(n)?n:n===Di(e.t,t)?(Bi(e),e.o[t]=Hi(e.A.h,n,e)):n},has:function(e,t){return t in sr(e)},ownKeys:function(e){return Reflect.ownKeys(sr(e))},set:function(e,t,r){var n=F1(sr(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Di(sr(e),t),i=a?.[se];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(q1(r,a)&&(r!==void 0||bo(e.t,t)))return!0;Bi(e),cr(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Di(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Bi(e),cr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=sr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){lt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){lt(12)}},tn={};Dr(on,function(e,t){tn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),tn.deleteProperty=function(e,t){return tn.set.call(this,e,t,void 0)},tn.set=function(e,t,r){return on.set.call(this,e[0],t,r,e[0])};var Wu=function(){function e(r){var n=this;this.O=V1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var f=n;return function(L){var N=this;L===void 0&&(L=l);for(var M=arguments.length,T=Array(M>1?M-1:0),D=1;D<M;D++)T[D-1]=arguments[D];return f.produce(L,function($){var W;return(W=i).call.apply(W,[N,$].concat(T))})}}var u;if(typeof i!="function"&&lt(6),s!==void 0&&typeof s!="function"&&lt(7),Ct(a)){var m=U1(n),g=Hi(n,a,void 0),y=!0;try{u=i(g),y=!1}finally{y?ea(m):Ui(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(L){return zi(m,s),Ii(L,m)},function(L){throw ea(m),L}):(zi(m,s),Ii(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Y1&&(u=void 0),n.D&&ji(u,!0),s){var S=[],C=[];It("Patches").M(a,u,S,C),s(S,C)}return u}lt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(g))})};var s,l,f=n.produce(a,i,function(u,m){s=u,l=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,s,l]}):[f,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Ct(r)||lt(8),Kt(r)&&(r=Uu(r));var n=U1(this),a=Hi(this,r,void 0);return a[se].C=!0,Ui(n),a},t.finishDraft=function(r,n){var a=r&&r[se],i=a.A;return zi(i,n),Ii(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!V1&&lt(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=It("Patches").$;return Kt(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},e}(),Ye=new Wu,Vu=Ye.produce,Nx=Ye.produceWithPatches.bind(Ye),Tx=Ye.setAutoFreeze.bind(Ye),kx=Ye.setUseProxies.bind(Ye),Mx=Ye.applyPatches.bind(Ye),Px=Ye.createDraft.bind(Ye),zx=Ye.finishDraft.bind(Ye),oa=Vu;function Br(e){"@babel/helpers - typeof";return Br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Br(e)}function Q1(e,t){if(Br(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Br(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function J1(e){var t=Q1(e,"string");return Br(t)=="symbol"?t:t+""}function e2(e,t,r){return(t=J1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?t2(Object(r),!0).forEach(function(n){e2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Be(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var r2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Yi=function(){return Math.random().toString(36).substring(7).split("").join(".")},na={INIT:"@@redux/INIT"+Yi(),REPLACE:"@@redux/REPLACE"+Yi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Yi()}};function ju(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Xi(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Be(1));return r(Xi)(e,t)}if(typeof e!="function")throw new Error(Be(2));var a=e,i=t,s=[],l=s,f=!1;function u(){l===s&&(l=s.slice())}function m(){if(f)throw new Error(Be(3));return i}function g(L){if(typeof L!="function")throw new Error(Be(4));if(f)throw new Error(Be(5));var N=!0;return u(),l.push(L),function(){if(N){if(f)throw new Error(Be(6));N=!1,u();var T=l.indexOf(L);l.splice(T,1),s=null}}}function y(L){if(!ju(L))throw new Error(Be(7));if(typeof L.type>"u")throw new Error(Be(8));if(f)throw new Error(Be(9));try{f=!0,i=a(i,L)}finally{f=!1}for(var N=s=l,M=0;M<N.length;M++){var T=N[M];T()}return L}function S(L){if(typeof L!="function")throw new Error(Be(10));a=L,y({type:na.REPLACE})}function C(){var L,N=g;return L={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(Be(11));function D(){T.next&&T.next(m())}D();var $=N(D);return{unsubscribe:$}}},L[r2]=function(){return this},L}return y({type:na.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:S},n[r2]=C,n}function Ku(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:na.INIT});if(typeof n>"u")throw new Error(Be(12));if(typeof r(void 0,{type:na.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Be(13))})}function o2(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),s,l;try{Ku(r)}catch(f){l=f}return function(u,m){if(u===void 0&&(u={}),l)throw l;if(0)var g;for(var y=!1,S={},C=0;C<i.length;C++){var L=i[C],N=r[L],M=u[L],T=N(M,m);if(typeof T>"u"){var D=m&&m.type;throw new Error(Be(14))}S[L]=T,y=y||T!==M}return y=y||i.length!==Object.keys(u).length,y?S:u}}function So(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function n2(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Be(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=So.apply(void 0,l)(a.dispatch),Zi(Zi({},a),{},{dispatch:i})}}}function a2(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var i2=a2();i2.withExtraArgument=a2;var Qi=i2;var f2=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),qu=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(m){return f([u,m])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Co=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},Zu=Object.defineProperty,Yu=Object.defineProperties,Xu=Object.getOwnPropertyDescriptors,s2=Object.getOwnPropertySymbols,Qu=Object.prototype.hasOwnProperty,Ju=Object.prototype.propertyIsEnumerable,c2=function(e,t,r){return t in e?Zu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},lr=function(e,t){for(var r in t||(t={}))Qu.call(t,r)&&c2(e,r,t[r]);if(s2)for(var n=0,a=s2(t);n<a.length;n++){var r=a[n];Ju.call(t,r)&&c2(e,r,t[r])}return e},Ji=function(e,t){return Yu(e,Xu(t))},ep=function(e,t,r){return new Promise(function(n,a){var i=function(f){try{l(r.next(f))}catch(u){a(u)}},s=function(f){try{l(r.throw(f))}catch(u){a(u)}},l=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,s)};l((r=r.apply(e,t)).next())})};var tp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?So:So.apply(null,arguments)},Jx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function rp(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var op=function(e){f2(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Co([void 0],r[0].concat(this)))):new(t.bind.apply(t,Co([void 0],r.concat(this))))},t}(Array),np=function(e){f2(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Co([void 0],r[0].concat(this)))):new(t.bind.apply(t,Co([void 0],r.concat(this))))},t}(Array);function rs(e){return Ct(e)?oa(e,function(){}):e}function ap(e){return typeof e=="boolean"}function ip(){return function(t){return sp(t)}}function sp(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=new op;if(r&&(ap(r)?l.push(Qi):l.push(Qi.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return l}var es=!0;function u2(e){var t=ip(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?t():i,l=r.devTools,f=l===void 0?!0:l,u=r.preloadedState,m=u===void 0?void 0:u,g=r.enhancers,y=g===void 0?void 0:g,S;if(typeof a=="function")S=a;else if(rp(a))S=o2(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(t),!es&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!es&&C.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=n2.apply(void 0,C),N=So;f&&(N=tp(lr({trace:!es},typeof f=="object"&&f)));var M=new np(L),T=M;Array.isArray(y)?T=Co([L],y):typeof y=="function"&&(T=y(M));var D=N.apply(void 0,T);return Xi(S,m,D)}function dr(e,t){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return lr(lr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function p2(e){var t={},r=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,r,n]}function cp(e){return typeof e=="function"}function lp(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?p2(t):[t,r,n],i=a[0],s=a[1],l=a[2],f;if(cp(e))f=function(){return rs(e())};else{var u=rs(e);f=function(){return u}}function m(g,y){g===void 0&&(g=f());var S=Co([i[y.type]],s.filter(function(C){var L=C.matcher;return L(y)}).map(function(C){var L=C.reducer;return L}));return S.filter(function(C){return!!C}).length===0&&(S=[l]),S.reduce(function(C,L){if(L)if(Kt(C)){var N=C,M=L(N,y);return M===void 0?C:M}else{if(Ct(C))return oa(C,function(T){return L(T,y)});var M=L(C,y);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},g)}return m.getInitialState=f,m}function dp(e,t){return e+"/"+t}function h2(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:rs(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=dp(t,m),S,C;"reducer"in g?(S=g.reducer,C=g.prepare):S=g,i[m]=S,s[y]=S,l[m]=C?dr(y,C):dr(y)});function f(){var m=typeof e.extraReducers=="function"?p2(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,S=m[1],C=S===void 0?[]:S,L=m[2],N=L===void 0?void 0:L,M=lr(lr({},y),s);return lp(r,function(T){for(var D in M)T.addCase(D,M[D]);for(var $=0,W=C;$<W.length;$++){var ae=W[$];T.addMatcher(ae.matcher,ae.reducer)}N&&T.addDefaultCase(N)})}var u;return{name:t,reducer:function(m,g){return u||(u=f()),u(m,g)},actions:l,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var fp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",up=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=fp[Math.random()*64|0];return t},pp=["name","message","stack","code"],ts=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),l2=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),hp=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=pp;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},oS=function(){function e(t,r,n){var a=dr(t+"/fulfilled",function(m,g,y,S){return{payload:m,meta:Ji(lr({},S||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=dr(t+"/pending",function(m,g,y){return{payload:void 0,meta:Ji(lr({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=dr(t+"/rejected",function(m,g,y,S,C){return{payload:S,error:(n&&n.serializeError||hp)(m||"Rejected"),meta:Ji(lr({},C||{}),{arg:y,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(g,y,S){var C=n?.idGenerator?n.idGenerator(m):up(),L=new f,N,M=!1;function T($){N=$,L.abort()}var D=function(){return ep(this,null,function(){var $,W,ae,Fe,we,_t,_e;return qu(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),Fe=($=n?.condition)==null?void 0:$.call(n,m,{getState:y,extra:S}),gp(Fe)?[4,Fe]:[3,2];case 1:Fe=x.sent(),x.label=2;case 2:if(Fe===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,we=new Promise(function(E,H){return L.signal.addEventListener("abort",function(){return H({name:"AbortError",message:N||"Aborted"})})}),g(i(C,m,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:C,arg:m},{getState:y,extra:S}))),[4,Promise.race([we,Promise.resolve(r(m,{dispatch:g,getState:y,extra:S,requestId:C,signal:L.signal,abort:T,rejectWithValue:function(E,H){return new ts(E,H)},fulfillWithValue:function(E,H){return new l2(E,H)}})).then(function(E){if(E instanceof ts)throw E;return E instanceof l2?a(E.payload,C,m,E.meta):a(E,C,m)})])];case 3:return ae=x.sent(),[3,5];case 4:return _t=x.sent(),ae=_t instanceof ts?s(null,C,m,_t.payload,_t.meta):s(_t,C,m),[3,5];case 5:return _e=n&&!n.dispatchConditionRejection&&s.match(ae)&&ae.meta.condition,_e||g(ae),[2,ae]}})})}();return Object.assign(D,{abort:T,requestId:C,arg:m,unwrap:function(){return D.then(mp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function mp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function gp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var m2="listener",g2="completed",y2="cancelled",nS="task-"+y2,aS="task-"+g2,iS=m2+"-"+y2,sS=m2+"-"+g2;var os="listenerMiddleware";var cS=dr(os+"/add"),lS=dr(os+"/removeAll"),dS=dr(os+"/remove");var d2,fS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(d2||(d2=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},yp=function(e){return function(t){setTimeout(t,e)}},uS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:yp(10);Z1();var bp=qn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),aa=class extends bp(Object){};window.ftReduxStores||(window.ftReduxStores={});var b2=class e extends aa{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Jn(i))return i;if(a==null)return;let s=h2({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=u2({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=R1(s.getInitialState());for(let g of u.keeping)m[g]=(f??m)[g];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...u.overwrites};return s.reducer(f,u)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Zn;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,u=i[f];return u?(...m)=>{let g=u(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var ia=class{static format(t,r,n,a){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(t,r,n,a)}static getMomentDateFormat(t,r){return t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(i);if(!a)return s;let l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var sa=v(w()),vp="ft-app-info",$r=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};$r.eventName="authentication-change";var xp={session:(e,t)=>{(0,sa.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>I.dispatchEvent(new $r(t.payload)),0))}},I=sa.FtReduxStore.get({name:vp,reducers:xp,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var v2=v(w()),ca=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},US=(0,v2.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(I)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>ia.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ca([(0,ns.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ca([(0,ns.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ca([Pi({store:I.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),ca([Pi({store:I.name})],t.prototype,"uiLocale",void 0),t});var Cp=v(S2(),1);var C2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(C2||(C2={}));var O2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(O2||(O2={}));var E2;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(E2||(E2={}));var L2;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(L2||(L2={}));var A2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(A2||(A2={}));var R2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(R2||(R2={}));var w2;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(w2||(w2={}));var _2;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(_2||(_2={}));var N2;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(N2||(N2={}));var T2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(T2||(T2={}));var k2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(k2||(k2={}));var M2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(M2||(M2={}));var P2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(P2||(P2={}));var z2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(z2||(z2={}));var as;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(as||(as={}));var I2;(function(e){e.ASC="ASC",e.DESC="DESC"})(I2||(I2={}));var D2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(D2||(D2={}));var is;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(is||(is={}));var B2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(B2||(B2={}));var $2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})($2||($2={}));var U2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(U2||(U2={}));var H2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(H2||(H2={}));var F2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(F2||(F2={}));var ss;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ss||(ss={}));var G2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(G2||(G2={}));var be;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(be||(be={}));var dt;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(dt||(dt={}));var W2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(W2||(W2={}));var V2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(V2||(V2={}));var j2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(j2||(j2={}));var K2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(K2||(K2={}));var q2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(q2||(q2={}));var Z2;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(Z2||(Z2={}));var Y2;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Y2||(Y2={}));var X2;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(X2||(X2={}));var Q2;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Q2||(Q2={}));var Sp={[be.PERSONAL_BOOK_SHARE_USER]:[be.PERSONAL_BOOK_USER],[be.HTML_EXPORT_USER]:[be.PERSONAL_BOOK_USER],[be.PDF_EXPORT_USER]:[be.PERSONAL_BOOK_USER],[be.KHUB_ADMIN]:[be.CONTENT_PUBLISHER],[be.ADMIN]:[be.KHUB_ADMIN,be.USERS_ADMIN,be.PORTAL_ADMIN,be.BEHAVIOR_DATA_USER],[be.GENERATIVE_AI_EXPORT_USER]:[be.GENERATIVE_AI_USER]};function J2(e,t){return e===t||(Sp[e]??[]).some(r=>J2(r,t))}function ed(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>J2(n,t))}var ga=v(w());var cs=v(w());var Ur=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=I.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=I.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var fa=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ur.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ur.await()}};var Ve=class extends fa{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new cs.CacheRegistry,this.cache=t?a.commonCache:new cs.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var ua=class extends Ve{async listMySearches(){let{session:t}=I.getState();return ed(t,be.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var pa=class extends Ve{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ha=class extends Ve{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=I.getState().session;return!!t?.sessionAuthenticated}};var ma=class extends Ve{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=I.getState().session;return!!t?.sessionAuthenticated}};var Op="ft-user-assets",Ep={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(dt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:a}=t.payload;ds(e,r,[...ls(e,r),a]),td(e,r,1,n),rd(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;ds(e,r,ls(e,r).map(a=>a.id===n.id?n:a)),rd(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;ds(e,r,ls(e,r).filter(i=>i.id!==a)),td(e,r,-1,n)}},od={[dt.SEARCHES]:"savedSearches",[dt.BOOKMARKS]:"bookmarks",[dt.BOOKS]:void 0,[dt.COLLECTIONS]:void 0},ls=(e,t)=>{var r;let n=od[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},ds=(e,t,r)=>{let n=od[t];n&&(e[n]=r)},td=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===dt.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},rd=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},Xe=ga.FtReduxStore.get({name:Op,reducers:Ep,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(dt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),fs=class{constructor(t=new ha,r=new ma){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new pa,this.savedSearchesService=new ua,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=I.getState();(0,ga.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Xe.actions.clearAssetCount(),Xe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Xe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Xe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Xe.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Xe.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Xe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Xe.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Xe.getState().assetCounts.bookmarkByMap).length!==0;t===dt.BOOKMARKS&&r&&Xe.actions.clearBookmarkCountByMap(),Xe.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Xe.actions.bookmarks(r)}}},Lp=new fs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Lp);var us=class{addCommand(t,r=!1){I.commands.add(t,r)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new us;var ft=v(w());var nd,Eo=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Ap=Symbol("clearAfterUnitTest"),ya=class extends(0,ft.withEventBus)(Ve){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[nd]=()=>{this.defaultMessages={},this.cache=new ft.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,ft.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new ft.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof ft.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Eo({loadedContexts:t})),this.dispatchEvent(new Eo({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Eo({loadedContexts:[t]})),this.dispatchEvent(new Eo({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,ft.delay)(0).then(()=>n()).catch(()=>null)))}};nd=Ap;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ya{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ya{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Lo=window.FluidTopicsI18nService,ba=window.FluidTopicsCustomI18nService;var ad=v(w()),ps=class{highlightHtml(t,r,n){(0,ad.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new ps;var id=v(w());var hs=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=I.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i;if(t==null)return"";try{return id.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}catch(s){throw console.error(`Date ${JSON.stringify(t)} is not valid`,s),s}}};window.FluidTopicsDateService=new hs;var sd=v(w());var nn=class{static get(t,r){var n,a;let i=I.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new sd.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var ms=class{urlToSearchRequest(t){return nn.get().parse(t)}searchRequestToUrl(t){return nn.get().serialize(t)}};window.FluidTopicsUrlService=new ms;var ur=v(w());var Hr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Hr.eventName="change";var gs=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},cd=new gs;var va=class e extends ur.WithEventBus{static build(){return new e(window.history,cd,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ur.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Hr(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,l])=>{let f=r(),u={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Hr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Hr.eventName,t)}currentItem(){return(0,ur.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ur.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,ur.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=va.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var ld=v(U());var dd=ld.css`
604
+ `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var r,n;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(n=this.target)===null||n===void 0||n.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,r;let n=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;n&&this.setupFor((r=this.target)!==null&&r!==void 0?r:n)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let r=(...l)=>f=>{l.forEach(u=>window.addEventListener(u,this.endPress,{once:!0})),this.startPress(f)},n=r("mouseup","contextmenu"),a=r("touchend","touchcancel"),i=l=>{["Enter"," "].includes(l.key)&&r("keyup")(l)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",n,s),t.addEventListener("touchstart",a,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",i,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",n,s),t.removeEventListener("touchstart",a,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",i,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let r=t,n=t,a,i;return r.x!=null?{x:a,y:i}=r:n.touches!=null&&(a=n.touches[0].clientX,i=n.touches[0].clientY),{x:a,y:i}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let r of t.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};q.elementDefinitions={};q.styles=Jc;Ge([(0,ke.property)({type:Boolean})],q.prototype,"primary",void 0);Ge([(0,ke.property)({type:Boolean})],q.prototype,"secondary",void 0);Ge([(0,ke.property)({type:Boolean})],q.prototype,"unbounded",void 0);Ge([(0,ke.property)({type:Boolean})],q.prototype,"activated",void 0);Ge([(0,ke.property)({type:Boolean})],q.prototype,"selected",void 0);Ge([(0,ke.property)({type:Boolean})],q.prototype,"disabled",void 0);Ge([(0,ke.state)()],q.prototype,"hovered",void 0);Ge([(0,ke.state)()],q.prototype,"focused",void 0);Ge([(0,ke.state)()],q.prototype,"pressed",void 0);Ge([(0,ke.state)()],q.prototype,"rippling",void 0);Ge([(0,ke.state)()],q.prototype,"originX",void 0);Ge([(0,ke.state)()],q.prototype,"originY",void 0);Ge([(0,ke.query)(".ft-ripple")],q.prototype,"ripple",void 0);Ge([(0,ke.query)(".ft-ripple--effect")],q.prototype,"rippleEffect",void 0);var Xl=v(w());(0,Xl.customElement)("ft-ripple")(q);var Cd=v(U()),pt=v(K()),ut=v(w());var Jl=["top","right","bottom","left"],Ql=["start","end"],Ai=Jl.reduce((e,t)=>e.concat(t,t+"-"+Ql[0],t+"-"+Ql[1]),[]),qo=Math.min,nr=Math.max,Zo=Math.round;var St=e=>({x:e,y:e}),pu={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(e,t,r){return nr(e,qo(t,r))}function Bn(e,t){return typeof e=="function"?e(t):e}function po(e){return e.split("-")[0]}function ar(e){return e.split("-")[1]}function wi(e){return e==="x"?"y":"x"}function _i(e){return e==="y"?"height":"width"}function $n(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ni(e){return wi($n(e))}function e1(e,t,r){r===void 0&&(r=!1);let n=ar(e),a=Ni(e),i=_i(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Li(s)),[s,Li(s)]}function t1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Li(e){let t=po(e);return pu[t]+e.slice(t.length)}function hu(e){return{top:0,right:0,bottom:0,left:0,...e}}function r1(e){return typeof e!="number"?hu(e):{top:e,right:e,bottom:e,left:e}}function Tr(e){let{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function o1(e,t,r){let{reference:n,floating:a}=e,i=$n(t),s=Ni(t),l=_i(s),f=po(t),u=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,S;switch(f){case"top":S={x:m,y:n.y-a.height};break;case"bottom":S={x:m,y:n.y+n.height};break;case"right":S={x:n.x+n.width,y:g};break;case"left":S={x:n.x-a.width,y:g};break;default:S={x:n.x,y:n.y}}switch(ar(t)){case"start":S[s]-=y*(r&&u?-1:1);break;case"end":S[s]+=y*(r&&u?-1:1);break}return S}async function n1(e,t){var r;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:S=0}=Bn(t,e),C=r1(S),N=l[y?g==="floating"?"reference":"floating":g],M=Tr(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(N)))==null||r?N:N.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:m,strategy:f})),T=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),$=await(i.isElement==null?void 0:i.isElement(D))?await(i.getScale==null?void 0:i.getScale(D))||{x:1,y:1}:{x:1,y:1},W=Tr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:T,offsetParent:D,strategy:f}):T);return{top:(M.top-W.top+C.top)/$.y,bottom:(W.bottom-M.bottom+C.bottom)/$.y,left:(M.left-W.left+C.left)/$.x,right:(W.right-M.right+C.right)/$.x}}var mu=50,a1=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:n1},f=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=o1(u,n,f),y=n,S=0,C={};for(let L=0;L<i.length;L++){let N=i[L];if(!N)continue;let{name:M,fn:T}=N,{x:D,y:$,data:W,reset:ae}=await T({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:C,rects:u,platform:l,elements:{reference:e,floating:t}});m=D??m,g=$??g,C[M]={...C[M],...W},ae&&S<mu&&(S++,typeof ae=="object"&&(ae.placement&&(y=ae.placement),ae.rects&&(u=ae.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):ae.rects),{x:m,y:g}=o1(u,y,f)),L=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:C}};function gu(e,t,r){return(e?[...r.filter(a=>ar(a)===e),...r.filter(a=>ar(a)!==e)]:r.filter(a=>po(a)===a)).filter(a=>e?ar(a)===e||(t?t1(a)!==a:!1):!0)}var i1=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:u}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Ai,autoAlignment:S=!0,...C}=Bn(e,t),L=g!==void 0||y===Ai?gu(g||null,S,y):y,N=await f.detectOverflow(t,C),M=((r=s.autoPlacement)==null?void 0:r.index)||0,T=L[M];if(T==null)return{};let D=e1(T,i,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(l!==T)return{reset:{placement:L[0]}};let $=[N[po(T)],N[D[0]],N[D[1]]],W=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:T,overflows:$}],ae=L[M+1];if(ae)return{data:{index:M+1,overflows:W},reset:{placement:ae}};let Fe=W.map(_e=>{let x=ar(_e.placement);return[_e.placement,x&&m?_e.overflows.slice(0,2).reduce((E,H)=>E+H,0):_e.overflows[0],_e.overflows]}).sort((_e,x)=>_e[1]-x[1]),_t=((a=Fe.filter(_e=>_e[2].slice(0,ar(_e[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||Fe[0][0];return _t!==l?{data:{index:M+1,overflows:W},reset:{placement:_t}}:{}}}};var s1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:M=>{let{x:T,y:D}=M;return{x:T,y:D}}},...u}=Bn(e,t),m={x:r,y:n},g=await i.detectOverflow(t,u),y=$n(po(a)),S=wi(y),C=m[S],L=m[y];if(s){let M=S==="y"?"top":"left",T=S==="y"?"bottom":"right",D=C+g[M],$=C-g[T];C=Ri(D,C,$)}if(l){let M=y==="y"?"top":"left",T=y==="y"?"bottom":"right",D=L+g[M],$=L-g[T];L=Ri(D,L,$)}let N=f.fn({...t,[S]:C,[y]:L});return{...N,data:{x:N.x-r,y:N.y-n,enabled:{[S]:s,[y]:l}}}}}};function Hn(){return typeof window<"u"}function Mr(e){return l1(e)?(e.nodeName||"").toLowerCase():"#document"}function We(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(e){var t;return(t=(l1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function l1(e){return Hn()?e instanceof Node||e instanceof We(e).Node:!1}function st(e){return Hn()?e instanceof Element||e instanceof We(e).Element:!1}function Pt(e){return Hn()?e instanceof HTMLElement||e instanceof We(e).HTMLElement:!1}function c1(e){return!Hn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof We(e).ShadowRoot}function ho(e){let{overflow:t,overflowX:r,overflowY:n,display:a}=ct(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&a!=="inline"&&a!=="contents"}function d1(e){return/^(table|td|th)$/.test(Mr(e))}function Yo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var yu=/transform|translate|scale|rotate|perspective|filter/,bu=/paint|layout|strict|content/,kr=e=>!!e&&e!=="none",Ti;function Fn(e){let t=st(e)?ct(e):e;return kr(t.transform)||kr(t.translate)||kr(t.scale)||kr(t.rotate)||kr(t.perspective)||!Gn()&&(kr(t.backdropFilter)||kr(t.filter))||yu.test(t.willChange||"")||bu.test(t.contain||"")}function f1(e){let t=jt(e);for(;Pt(t)&&!Pr(t);){if(Fn(t))return t;if(Yo(t))return null;t=jt(t)}return null}function Gn(){return Ti==null&&(Ti=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ti}function Pr(e){return/^(html|body|#document)$/.test(Mr(e))}function ct(e){return We(e).getComputedStyle(e)}function Xo(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jt(e){if(Mr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||c1(e)&&e.host||Mt(e);return c1(t)?t.host:t}function u1(e){let t=jt(e);return Pr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&ho(t)?t:u1(t)}function Un(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let a=u1(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=We(a);if(i){let l=Wn(s);return t.concat(s,s.visualViewport||[],ho(a)?a:[],l&&r?Un(l):[])}else return t.concat(a,Un(a,[],r))}function Wn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function g1(e){let t=ct(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Pt(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,l=Zo(r)!==i||Zo(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function y1(e){return st(e)?e:e.contextElement}function mo(e){let t=y1(e);if(!Pt(t))return St(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:i}=g1(t),s=(i?Zo(r.width):r.width)/n,l=(i?Zo(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var vu=St(0);function b1(e){let t=We(e);return!Gn()||!t.visualViewport?vu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xu(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==We(e)?!1:t}function Qo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),i=y1(e),s=St(1);t&&(n?st(n)&&(s=mo(n)):s=mo(e));let l=xu(i,r,n)?b1(i):St(0),f=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=We(i),S=n&&st(n)?We(n):n,C=y,L=Wn(C);for(;L&&n&&S!==C;){let N=mo(L),M=L.getBoundingClientRect(),T=ct(L),D=M.left+(L.clientLeft+parseFloat(T.paddingLeft))*N.x,$=M.top+(L.clientTop+parseFloat(T.paddingTop))*N.y;f*=N.x,u*=N.y,m*=N.x,g*=N.y,f+=D,u+=$,C=We(L),L=Wn(C)}}return Tr({width:m,height:g,x:f,y:u})}function Vn(e,t){let r=Xo(e).scrollLeft;return t?t.left+r:Qo(Mt(e)).left+r}function v1(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Vn(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function Su(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Mt(n),l=t?Yo(t.floating):!1;if(n===s||l&&i)return r;let f={scrollLeft:0,scrollTop:0},u=St(1),m=St(0),g=Pt(n);if((g||!g&&!i)&&((Mr(n)!=="body"||ho(s))&&(f=Xo(n)),g)){let S=Qo(n);u=mo(n),m.x=S.x+n.clientLeft,m.y=S.y+n.clientTop}let y=s&&!g&&!i?v1(s,f):St(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+m.x+y.x,y:r.y*u.y-f.scrollTop*u.y+m.y+y.y}}function Cu(e){return Array.from(e.getClientRects())}function Ou(e){let t=Mt(e),r=Xo(e),n=e.ownerDocument.body,a=nr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=nr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+Vn(e),l=-r.scrollTop;return ct(n).direction==="rtl"&&(s+=nr(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var p1=25;function Eu(e,t){let r=We(e),n=Mt(e),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,f=0;if(a){i=a.width,s=a.height;let m=Gn();(!m||m&&t==="fixed")&&(l=a.offsetLeft,f=a.offsetTop)}let u=Vn(n);if(u<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),S=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(n.clientWidth-g.clientWidth-S);C<=p1&&(i-=C)}else u<=p1&&(i+=u);return{width:i,height:s,x:l,y:f}}function Lu(e,t){let r=Qo(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=Pt(e)?mo(e):St(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,u=n*i.y;return{width:s,height:l,x:f,y:u}}function h1(e,t,r){let n;if(t==="viewport")n=Eu(e,r);else if(t==="document")n=Ou(Mt(e));else if(st(t))n=Lu(t,r);else{let a=b1(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Tr(n)}function x1(e,t){let r=jt(e);return r===t||!st(r)||Pr(r)?!1:ct(r).position==="fixed"||x1(r,t)}function Au(e,t){let r=t.get(e);if(r)return r;let n=Un(e,[],!1).filter(l=>st(l)&&Mr(l)!=="body"),a=null,i=ct(e).position==="fixed",s=i?jt(e):e;for(;st(s)&&!Pr(s);){let l=ct(s),f=Fn(s);!f&&l.position==="fixed"&&(a=null),(i?!f&&!a:!f&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||ho(s)&&!f&&x1(e,s))?n=n.filter(m=>m!==s):a=l,s=jt(s)}return t.set(e,n),n}function Ru(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,s=[...r==="clippingAncestors"?Yo(t)?[]:Au(t,this._c):[].concat(r),n],l=h1(t,s[0],a),f=l.top,u=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let S=h1(t,s[y],a);f=nr(S.top,f),u=qo(S.right,u),m=qo(S.bottom,m),g=nr(S.left,g)}return{width:u-g,height:m-f,x:g,y:f}}function wu(e){let{width:t,height:r}=g1(e);return{width:t,height:r}}function _u(e,t,r){let n=Pt(t),a=Mt(t),i=r==="fixed",s=Qo(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=St(0);function u(){f.x=Vn(a)}if(n||!n&&!i)if((Mr(t)!=="body"||ho(a))&&(l=Xo(t)),n){let S=Qo(t,!0,i,t);f.x=S.x+t.clientLeft,f.y=S.y+t.clientTop}else a&&u();i&&!n&&a&&u();let m=a&&!n&&!i?v1(a,l):St(0),g=s.left+l.scrollLeft-f.x-m.x,y=s.top+l.scrollTop-f.y-m.y;return{x:g,y,width:s.width,height:s.height}}function ki(e){return ct(e).position==="static"}function m1(e,t){if(!Pt(e)||ct(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Mt(e)===r&&(r=r.ownerDocument.body),r}function S1(e,t){let r=We(e);if(Yo(e))return r;if(!Pt(e)){let a=jt(e);for(;a&&!Pr(a);){if(st(a)&&!ki(a))return a;a=jt(a)}return r}let n=m1(e,t);for(;n&&d1(n)&&ki(n);)n=m1(n,t);return n&&Pr(n)&&ki(n)&&!Fn(n)?r:n||f1(e)||r}var Nu=async function(e){let t=this.getOffsetParent||S1,r=this.getDimensions,n=await r(e.floating);return{reference:_u(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Tu(e){return ct(e).direction==="rtl"}var jn={convertOffsetParentRelativeRectToViewportRelativeRect:Su,getDocumentElement:Mt,getClippingRect:Ru,getOffsetParent:S1,getElementRects:Nu,getClientRects:Cu,getDimensions:wu,getScale:mo,isElement:st,isRTL:Tu};var C1=i1,O1=s1;var E1=(e,t,r)=>{let n=new Map,a={platform:jn,...r},i={...a.platform,_c:n};return a1(e,t,{...a,platform:i})};function L1(e){return ku(e)}function Mi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function ku(e){for(let t=e;t;t=Mi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Mi(e);t;t=Mi(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||r.filter!=="none"||t.tagName==="BODY"))return t}return null}async function A1(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},E1(e,t,{strategy:n.strategy,platform:{...jn,getOffsetParent:a=>jn.getOffsetParent(a,L1)},middleware:[O1({crossAxis:!0}),C1({allowedPlacements:[n.placement]})]})}var Ro=v(w());var ns=v(K());function Mu(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Kn(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Kn(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null);if(a=i(e),r=a.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let s=a[n];if(!Kn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Kn(e,t){try{return Mu(e,t)}catch{return!1}}function Jo(e,t){return!Kn(e,t)}function R1(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function qn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var w1=v(K(),1);var Pi=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:Jo,attribute:!1,...t};(0,w1.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:l=>l[n],store:t.store})}};var Zn=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var zr=v(K(),1);var _1=v(K(),1);function N1(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,_1.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Jo,...t??{}})}var Yn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var k1=v(U(),1);var Xn=globalThis,Pu=Xn.ShadowRoot&&(Xn.ShadyCSS===void 0||Xn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mx=Symbol();var T1=(e,t)=>{if(Pu)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=Xn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var Qn=class extends k1.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return T1(n,t.elementStyles),n}};function M1(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var yo=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},D1,P1=Symbol("constructorPrototype"),z1=Symbol("constructorName"),B1=Symbol("exportpartsDebouncer"),I1=Symbol("dynamicDependenciesLoaded"),go=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};go.eventName="exportparts-updated";var zt=class extends Qn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[D1]=new Yn(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[B1].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[z1]=this.constructor.name,this[P1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[z1]&&Object.setPrototypeOf(this,this[P1])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[I1]||(r[I1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(go.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(go.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new go)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=M1(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,l;let f=y=>y!=null&&y.trim().length>0,u=t.filter(f).map(y=>y.trim());if(u.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(N=>N.split(":")[1]))!==null&&l!==void 0?l:[],L=[...S,...C].filter(f).map(N=>N.trim());for(let N of L)m.add(N)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>u.map(S=>`${y}:${S}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};D1=B1;yo([(0,zr.property)()],zt.prototype,"exportpartsPrefix",void 0);yo([N1([])],zt.prototype,"exportpartsPrefixes",void 0);yo([(0,zr.property)({reflect:!0})],zt.prototype,"exportparts",void 0);yo([(0,zr.property)()],zt.prototype,"customStylesheet",void 0);yo([(0,zr.property)()],zt.prototype,"elementToFocus",void 0);yo([(0,zr.state)()],zt.prototype,"useAdoptedStyleSheets",void 0);function Jn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var en=Symbol("internalReduxEventsUnsubscribers"),ir=Symbol("internalStoresUnsubscribers"),Ir=Symbol("internalStores"),zu=qn(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Ir].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ir].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ir].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Ir].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Ir].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Ir].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let u=this.getStore(s.store);u&&(s.store?this[ir].has(s.store):this[ir].size>0)&&(this[l]=s.selector(u.getState(),this))}})}subscribeToStore(s,l){var f;this[ir].set(s,l.subscribe(()=>this.updateFromStores())),this[en].set(s,[]),Jn(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||l.name===u.store)){let g=y=>this[m](y);l.addEventListener(u.eventName,g),this[en].get(s).push(()=>l.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ir].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[ir].has(s)&&this[ir].get(s)(),this[ir].delete(s),(l=this[en].get(s))===null||l===void 0||l.forEach(f=>f()),this[en].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ir,r=Ir,n=en,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),$1=class extends zu(zt){};function lt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Kt(e){return!!e&&!!e[se]}function Ct(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Gu}(e)||Array.isArray(e)||!!e[j1]||!!(!((t=e.constructor)===null||t===void 0)&&t[j1])||Gi(e)||Wi(e))}function Dr(e,t,r){r===void 0&&(r=!1),xo(e)===0?(r?Object.keys:vo)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function xo(e){var t=e[se];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Gi(e)?2:Wi(e)?3:0}function bo(e,t){return xo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Iu(e,t){return xo(e)===2?e.get(t):e[t]}function K1(e,t,r){var n=xo(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function q1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Gi(e){return Hu&&e instanceof Map}function Wi(e){return Fu&&e instanceof Set}function sr(e){return e.o||e.t}function Vi(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=X1(e);delete t[se];for(var r=vo(t),n=0;n<r.length;n++){var a=r[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function ji(e,t){return t===void 0&&(t=!1),Ki(e)||Kt(e)||!Ct(e)||(xo(e)>1&&(e.set=e.add=e.clear=e.delete=Du),Object.freeze(e),t&&Dr(e,function(r,n){return ji(n,!0)},!0)),e}function Du(){lt(2)}function Ki(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function It(e){var t=Fi[e];return t||lt(18,e),t}function Bu(e,t){Fi[e]||(Fi[e]=t)}function $i(){return rn}function zi(e,t){t&&(It("Patches"),e.u=[],e.s=[],e.v=t)}function ea(e){Ui(e),e.p.forEach($u),e.p=null}function Ui(e){e===rn&&(rn=e.l)}function U1(e){return rn={p:[],l:rn,h:e,m:!0,_:0}}function $u(e){var t=e[se];t.i===0||t.i===1?t.j():t.g=!0}function Ii(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||It("ES5").S(t,e,n),n?(r[se].P&&(ea(t),lt(4)),Ct(e)&&(e=ta(t,e),t.l||ra(t,e)),t.u&&It("Patches").M(r[se].t,e,t.u,t.s)):e=ta(t,r,[]),ea(t),t.u&&t.v(t.u,t.s),e!==Y1?e:void 0}function ta(e,t,r){if(Ki(t))return t;var n=t[se];if(!n)return Dr(t,function(l,f){return H1(e,n,t,l,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return ra(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Vi(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Dr(i,function(l,f){return H1(e,n,a,l,f,r,s)}),ra(e,a,!1),r&&e.u&&It("Patches").N(n,r,e.u,e.s)}return n.o}function H1(e,t,r,n,a,i,s){if(Kt(a)){var l=ta(e,a,i&&t&&t.i!==3&&!bo(t.R,n)?i.concat(n):void 0);if(K1(r,n,l),!Kt(l))return;e.m=!1}else s&&r.add(a);if(Ct(a)&&!Ki(a)){if(!e.h.D&&e._<1)return;ta(e,a),t&&t.A.l||ra(e,a)}}function ra(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ji(t,r)}function Di(e,t){var r=e[se];return(r?sr(r):e)[t]}function F1(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function cr(e){e.P||(e.P=!0,e.l&&cr(e.l))}function Bi(e){e.o||(e.o=Vi(e.t))}function Hi(e,t,r){var n=Gi(t)?It("MapSet").F(t,r):Wi(t)?It("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:$i(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,u=on;s&&(f=[l],u=tn);var m=Proxy.revocable(f,u),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y}(t,r):It("ES5").J(t,r);return(r?r.A:$i()).p.push(n),n}function Uu(e){return Kt(e)||lt(22,e),function t(r){if(!Ct(r))return r;var n,a=r[se],i=xo(r);if(a){if(!a.P&&(a.i<4||!It("ES5").K(a)))return a.t;a.I=!0,n=G1(r,i),a.I=!1}else n=G1(r,i);return Dr(n,function(s,l){a&&Iu(a.t,s)===l||K1(n,s,t(l))}),i===3?new Set(n):n}(e)}function G1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Vi(e)}function Z1(){function e(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var u=this[se];return on.get(u,s)},set:function(u){var m=this[se];on.set(m,s,u)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][se];if(!f.P)switch(f.i){case 5:n(f)&&cr(f);break;case 4:r(f)&&cr(f)}}}function r(s){for(var l=s.t,f=s.k,u=vo(f),m=u.length-1;m>=0;m--){var g=u[m];if(g!==se){var y=l[g];if(y===void 0&&!bo(l,g))return!0;var S=f[g],C=S&&S[se];if(C?C.t!==y:!q1(S,y))return!0}}var L=!!l[se];return u.length!==vo(l).length+(L?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var u=0;u<l.length;u++)if(!l.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&lt(3,JSON.stringify(sr(s)))}var i={};Bu("ES5",{J:function(s,l){var f=Array.isArray(s),u=function(g,y){if(g){for(var S=Array(y.length),C=0;C<y.length;C++)Object.defineProperty(S,""+C,e(C,!0));return S}var L=X1(y);delete L[se];for(var N=vo(L),M=0;M<N.length;M++){var T=N[M];L[T]=e(T,g||!!L[T].enumerable)}return Object.create(Object.getPrototypeOf(y),L)}(f,s),m={i:f?5:4,A:l?l.A:$i(),P:!1,I:!1,R:{},l,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,se,{value:m,writable:!0}),u},S:function(s,l,f){f?Kt(l)&&l[se].A===s&&t(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var g=m[se];if(g){var y=g.t,S=g.k,C=g.R,L=g.i;if(L===4)Dr(S,function($){$!==se&&(y[$]!==void 0||bo(y,$)?C[$]||u(S[$]):(C[$]=!0,cr(g)))}),Dr(y,function($){S[$]!==void 0||bo(S,$)||(C[$]=!1,cr(g))});else if(L===5){if(n(g)&&(cr(g),C.length=!0),S.length<y.length)for(var N=S.length;N<y.length;N++)C[N]=!1;else for(var M=y.length;M<S.length;M++)C[M]=!0;for(var T=Math.min(S.length,y.length),D=0;D<T;D++)S.hasOwnProperty(D)||(C[D]=!0),C[D]===void 0&&u(S[D])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var W1,rn,qi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Hu=typeof Map<"u",Fu=typeof Set<"u",V1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Y1=qi?Symbol.for("immer-nothing"):((W1={})["immer-nothing"]=!0,W1),j1=qi?Symbol.for("immer-draftable"):"__$immer_draftable",se=qi?Symbol.for("immer-state"):"__$immer_state";var Gu=""+Object.prototype.constructor,vo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,X1=Object.getOwnPropertyDescriptors||function(e){var t={};return vo(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},Fi={},on={get:function(e,t){if(t===se)return e;var r=sr(e);if(!bo(r,t))return function(a,i,s){var l,f=F1(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!Ct(n)?n:n===Di(e.t,t)?(Bi(e),e.o[t]=Hi(e.A.h,n,e)):n},has:function(e,t){return t in sr(e)},ownKeys:function(e){return Reflect.ownKeys(sr(e))},set:function(e,t,r){var n=F1(sr(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Di(sr(e),t),i=a?.[se];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(q1(r,a)&&(r!==void 0||bo(e.t,t)))return!0;Bi(e),cr(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Di(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Bi(e),cr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=sr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){lt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){lt(12)}},tn={};Dr(on,function(e,t){tn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),tn.deleteProperty=function(e,t){return tn.set.call(this,e,t,void 0)},tn.set=function(e,t,r){return on.set.call(this,e[0],t,r,e[0])};var Wu=function(){function e(r){var n=this;this.O=V1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var f=n;return function(L){var N=this;L===void 0&&(L=l);for(var M=arguments.length,T=Array(M>1?M-1:0),D=1;D<M;D++)T[D-1]=arguments[D];return f.produce(L,function($){var W;return(W=i).call.apply(W,[N,$].concat(T))})}}var u;if(typeof i!="function"&&lt(6),s!==void 0&&typeof s!="function"&&lt(7),Ct(a)){var m=U1(n),g=Hi(n,a,void 0),y=!0;try{u=i(g),y=!1}finally{y?ea(m):Ui(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(L){return zi(m,s),Ii(L,m)},function(L){throw ea(m),L}):(zi(m,s),Ii(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Y1&&(u=void 0),n.D&&ji(u,!0),s){var S=[],C=[];It("Patches").M(a,u,S,C),s(S,C)}return u}lt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(g))})};var s,l,f=n.produce(a,i,function(u,m){s=u,l=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,s,l]}):[f,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Ct(r)||lt(8),Kt(r)&&(r=Uu(r));var n=U1(this),a=Hi(this,r,void 0);return a[se].C=!0,Ui(n),a},t.finishDraft=function(r,n){var a=r&&r[se],i=a.A;return zi(i,n),Ii(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!V1&&lt(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=It("Patches").$;return Kt(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},e}(),Ye=new Wu,Vu=Ye.produce,Nx=Ye.produceWithPatches.bind(Ye),Tx=Ye.setAutoFreeze.bind(Ye),kx=Ye.setUseProxies.bind(Ye),Mx=Ye.applyPatches.bind(Ye),Px=Ye.createDraft.bind(Ye),zx=Ye.finishDraft.bind(Ye),oa=Vu;function Br(e){"@babel/helpers - typeof";return Br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Br(e)}function Q1(e,t){if(Br(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Br(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function J1(e){var t=Q1(e,"string");return Br(t)=="symbol"?t:t+""}function e2(e,t,r){return(t=J1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?t2(Object(r),!0).forEach(function(n){e2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Be(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var r2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Yi=function(){return Math.random().toString(36).substring(7).split("").join(".")},na={INIT:"@@redux/INIT"+Yi(),REPLACE:"@@redux/REPLACE"+Yi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Yi()}};function ju(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Xi(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Be(1));return r(Xi)(e,t)}if(typeof e!="function")throw new Error(Be(2));var a=e,i=t,s=[],l=s,f=!1;function u(){l===s&&(l=s.slice())}function m(){if(f)throw new Error(Be(3));return i}function g(L){if(typeof L!="function")throw new Error(Be(4));if(f)throw new Error(Be(5));var N=!0;return u(),l.push(L),function(){if(N){if(f)throw new Error(Be(6));N=!1,u();var T=l.indexOf(L);l.splice(T,1),s=null}}}function y(L){if(!ju(L))throw new Error(Be(7));if(typeof L.type>"u")throw new Error(Be(8));if(f)throw new Error(Be(9));try{f=!0,i=a(i,L)}finally{f=!1}for(var N=s=l,M=0;M<N.length;M++){var T=N[M];T()}return L}function S(L){if(typeof L!="function")throw new Error(Be(10));a=L,y({type:na.REPLACE})}function C(){var L,N=g;return L={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(Be(11));function D(){T.next&&T.next(m())}D();var $=N(D);return{unsubscribe:$}}},L[r2]=function(){return this},L}return y({type:na.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:S},n[r2]=C,n}function Ku(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:na.INIT});if(typeof n>"u")throw new Error(Be(12));if(typeof r(void 0,{type:na.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Be(13))})}function o2(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),s,l;try{Ku(r)}catch(f){l=f}return function(u,m){if(u===void 0&&(u={}),l)throw l;if(0)var g;for(var y=!1,S={},C=0;C<i.length;C++){var L=i[C],N=r[L],M=u[L],T=N(M,m);if(typeof T>"u"){var D=m&&m.type;throw new Error(Be(14))}S[L]=T,y=y||T!==M}return y=y||i.length!==Object.keys(u).length,y?S:u}}function So(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function n2(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Be(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=So.apply(void 0,l)(a.dispatch),Zi(Zi({},a),{},{dispatch:i})}}}function a2(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var i2=a2();i2.withExtraArgument=a2;var Qi=i2;var f2=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),qu=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(m){return f([u,m])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Co=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},Zu=Object.defineProperty,Yu=Object.defineProperties,Xu=Object.getOwnPropertyDescriptors,s2=Object.getOwnPropertySymbols,Qu=Object.prototype.hasOwnProperty,Ju=Object.prototype.propertyIsEnumerable,c2=function(e,t,r){return t in e?Zu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},lr=function(e,t){for(var r in t||(t={}))Qu.call(t,r)&&c2(e,r,t[r]);if(s2)for(var n=0,a=s2(t);n<a.length;n++){var r=a[n];Ju.call(t,r)&&c2(e,r,t[r])}return e},Ji=function(e,t){return Yu(e,Xu(t))},ep=function(e,t,r){return new Promise(function(n,a){var i=function(f){try{l(r.next(f))}catch(u){a(u)}},s=function(f){try{l(r.throw(f))}catch(u){a(u)}},l=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,s)};l((r=r.apply(e,t)).next())})};var tp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?So:So.apply(null,arguments)},Jx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function rp(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var op=function(e){f2(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Co([void 0],r[0].concat(this)))):new(t.bind.apply(t,Co([void 0],r.concat(this))))},t}(Array),np=function(e){f2(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Co([void 0],r[0].concat(this)))):new(t.bind.apply(t,Co([void 0],r.concat(this))))},t}(Array);function rs(e){return Ct(e)?oa(e,function(){}):e}function ap(e){return typeof e=="boolean"}function ip(){return function(t){return sp(t)}}function sp(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=new op;if(r&&(ap(r)?l.push(Qi):l.push(Qi.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return l}var es=!0;function u2(e){var t=ip(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?t():i,l=r.devTools,f=l===void 0?!0:l,u=r.preloadedState,m=u===void 0?void 0:u,g=r.enhancers,y=g===void 0?void 0:g,S;if(typeof a=="function")S=a;else if(rp(a))S=o2(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(t),!es&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!es&&C.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=n2.apply(void 0,C),N=So;f&&(N=tp(lr({trace:!es},typeof f=="object"&&f)));var M=new np(L),T=M;Array.isArray(y)?T=Co([L],y):typeof y=="function"&&(T=y(M));var D=N.apply(void 0,T);return Xi(S,m,D)}function dr(e,t){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return lr(lr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function p2(e){var t={},r=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,r,n]}function cp(e){return typeof e=="function"}function lp(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?p2(t):[t,r,n],i=a[0],s=a[1],l=a[2],f;if(cp(e))f=function(){return rs(e())};else{var u=rs(e);f=function(){return u}}function m(g,y){g===void 0&&(g=f());var S=Co([i[y.type]],s.filter(function(C){var L=C.matcher;return L(y)}).map(function(C){var L=C.reducer;return L}));return S.filter(function(C){return!!C}).length===0&&(S=[l]),S.reduce(function(C,L){if(L)if(Kt(C)){var N=C,M=L(N,y);return M===void 0?C:M}else{if(Ct(C))return oa(C,function(T){return L(T,y)});var M=L(C,y);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},g)}return m.getInitialState=f,m}function dp(e,t){return e+"/"+t}function h2(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:rs(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=dp(t,m),S,C;"reducer"in g?(S=g.reducer,C=g.prepare):S=g,i[m]=S,s[y]=S,l[m]=C?dr(y,C):dr(y)});function f(){var m=typeof e.extraReducers=="function"?p2(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,S=m[1],C=S===void 0?[]:S,L=m[2],N=L===void 0?void 0:L,M=lr(lr({},y),s);return lp(r,function(T){for(var D in M)T.addCase(D,M[D]);for(var $=0,W=C;$<W.length;$++){var ae=W[$];T.addMatcher(ae.matcher,ae.reducer)}N&&T.addDefaultCase(N)})}var u;return{name:t,reducer:function(m,g){return u||(u=f()),u(m,g)},actions:l,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var fp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",up=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=fp[Math.random()*64|0];return t},pp=["name","message","stack","code"],ts=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),l2=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),hp=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=pp;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},oS=function(){function e(t,r,n){var a=dr(t+"/fulfilled",function(m,g,y,S){return{payload:m,meta:Ji(lr({},S||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=dr(t+"/pending",function(m,g,y){return{payload:void 0,meta:Ji(lr({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=dr(t+"/rejected",function(m,g,y,S,C){return{payload:S,error:(n&&n.serializeError||hp)(m||"Rejected"),meta:Ji(lr({},C||{}),{arg:y,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(g,y,S){var C=n?.idGenerator?n.idGenerator(m):up(),L=new f,N,M=!1;function T($){N=$,L.abort()}var D=function(){return ep(this,null,function(){var $,W,ae,Fe,we,_t,_e;return qu(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),Fe=($=n?.condition)==null?void 0:$.call(n,m,{getState:y,extra:S}),gp(Fe)?[4,Fe]:[3,2];case 1:Fe=x.sent(),x.label=2;case 2:if(Fe===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,we=new Promise(function(E,H){return L.signal.addEventListener("abort",function(){return H({name:"AbortError",message:N||"Aborted"})})}),g(i(C,m,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:C,arg:m},{getState:y,extra:S}))),[4,Promise.race([we,Promise.resolve(r(m,{dispatch:g,getState:y,extra:S,requestId:C,signal:L.signal,abort:T,rejectWithValue:function(E,H){return new ts(E,H)},fulfillWithValue:function(E,H){return new l2(E,H)}})).then(function(E){if(E instanceof ts)throw E;return E instanceof l2?a(E.payload,C,m,E.meta):a(E,C,m)})])];case 3:return ae=x.sent(),[3,5];case 4:return _t=x.sent(),ae=_t instanceof ts?s(null,C,m,_t.payload,_t.meta):s(_t,C,m),[3,5];case 5:return _e=n&&!n.dispatchConditionRejection&&s.match(ae)&&ae.meta.condition,_e||g(ae),[2,ae]}})})}();return Object.assign(D,{abort:T,requestId:C,arg:m,unwrap:function(){return D.then(mp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function mp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function gp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var m2="listener",g2="completed",y2="cancelled",nS="task-"+y2,aS="task-"+g2,iS=m2+"-"+y2,sS=m2+"-"+g2;var os="listenerMiddleware";var cS=dr(os+"/add"),lS=dr(os+"/removeAll"),dS=dr(os+"/remove");var d2,fS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(d2||(d2=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},yp=function(e){return function(t){setTimeout(t,e)}},uS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:yp(10);Z1();var bp=qn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),aa=class extends bp(Object){};window.ftReduxStores||(window.ftReduxStores={});var b2=class e extends aa{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Jn(i))return i;if(a==null)return;let s=h2({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=u2({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=R1(s.getInitialState());for(let g of u.keeping)m[g]=(f??m)[g];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...u.overwrites};return s.reducer(f,u)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Zn;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,u=i[f];return u?(...m)=>{let g=u(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var ia=class{static format(t,r,n,a,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,r,n,a,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),f=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?f:a?`${l} ${f}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var sa=v(w()),vp="ft-app-info",$r=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};$r.eventName="authentication-change";var xp={session:(e,t)=>{(0,sa.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>I.dispatchEvent(new $r(t.payload)),0))}},I=sa.FtReduxStore.get({name:vp,reducers:xp,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var v2=v(w()),ca=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},US=(0,v2.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(I)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>ia.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ca([(0,ns.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ca([(0,ns.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ca([Pi({store:I.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),ca([Pi({store:I.name})],t.prototype,"uiLocale",void 0),t});var Cp=v(S2(),1);var C2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(C2||(C2={}));var O2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(O2||(O2={}));var E2;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(E2||(E2={}));var L2;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(L2||(L2={}));var A2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(A2||(A2={}));var R2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(R2||(R2={}));var w2;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(w2||(w2={}));var _2;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(_2||(_2={}));var N2;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(N2||(N2={}));var T2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(T2||(T2={}));var k2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(k2||(k2={}));var M2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(M2||(M2={}));var P2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(P2||(P2={}));var z2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(z2||(z2={}));var as;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(as||(as={}));var I2;(function(e){e.ASC="ASC",e.DESC="DESC"})(I2||(I2={}));var D2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(D2||(D2={}));var is;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(is||(is={}));var B2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(B2||(B2={}));var $2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})($2||($2={}));var U2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(U2||(U2={}));var H2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(H2||(H2={}));var F2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(F2||(F2={}));var ss;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ss||(ss={}));var G2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(G2||(G2={}));var be;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(be||(be={}));var dt;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(dt||(dt={}));var W2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(W2||(W2={}));var V2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(V2||(V2={}));var j2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(j2||(j2={}));var K2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(K2||(K2={}));var q2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(q2||(q2={}));var Z2;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(Z2||(Z2={}));var Y2;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Y2||(Y2={}));var X2;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(X2||(X2={}));var Q2;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Q2||(Q2={}));var Sp={[be.PERSONAL_BOOK_SHARE_USER]:[be.PERSONAL_BOOK_USER],[be.HTML_EXPORT_USER]:[be.PERSONAL_BOOK_USER],[be.PDF_EXPORT_USER]:[be.PERSONAL_BOOK_USER],[be.KHUB_ADMIN]:[be.CONTENT_PUBLISHER],[be.ADMIN]:[be.KHUB_ADMIN,be.USERS_ADMIN,be.PORTAL_ADMIN,be.BEHAVIOR_DATA_USER],[be.GENERATIVE_AI_EXPORT_USER]:[be.GENERATIVE_AI_USER]};function J2(e,t){return e===t||(Sp[e]??[]).some(r=>J2(r,t))}function ed(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>J2(n,t))}var ga=v(w());var cs=v(w());var Ur=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=I.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=I.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var fa=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ur.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ur.await()}};var Ve=class extends fa{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new cs.CacheRegistry,this.cache=t?a.commonCache:new cs.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var ua=class extends Ve{async listMySearches(){let{session:t}=I.getState();return ed(t,be.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var pa=class extends Ve{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ha=class extends Ve{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=I.getState().session;return!!t?.sessionAuthenticated}};var ma=class extends Ve{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=I.getState().session;return!!t?.sessionAuthenticated}};var Op="ft-user-assets",Ep={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(dt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:a}=t.payload;ds(e,r,[...ls(e,r),a]),td(e,r,1,n),rd(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;ds(e,r,ls(e,r).map(a=>a.id===n.id?n:a)),rd(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;ds(e,r,ls(e,r).filter(i=>i.id!==a)),td(e,r,-1,n)}},od={[dt.SEARCHES]:"savedSearches",[dt.BOOKMARKS]:"bookmarks",[dt.BOOKS]:void 0,[dt.COLLECTIONS]:void 0},ls=(e,t)=>{var r;let n=od[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},ds=(e,t,r)=>{let n=od[t];n&&(e[n]=r)},td=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===dt.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},rd=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},Xe=ga.FtReduxStore.get({name:Op,reducers:Ep,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(dt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),fs=class{constructor(t=new ha,r=new ma){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new pa,this.savedSearchesService=new ua,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=I.getState();(0,ga.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Xe.actions.clearAssetCount(),Xe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Xe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Xe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Xe.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Xe.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Xe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Xe.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Xe.getState().assetCounts.bookmarkByMap).length!==0;t===dt.BOOKMARKS&&r&&Xe.actions.clearBookmarkCountByMap(),Xe.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Xe.actions.bookmarks(r)}}},Lp=new fs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Lp);var us=class{addCommand(t,r=!1){I.commands.add(t,r)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new us;var ft=v(w());var nd,Eo=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Ap=Symbol("clearAfterUnitTest"),ya=class extends(0,ft.withEventBus)(Ve){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[nd]=()=>{this.defaultMessages={},this.cache=new ft.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,ft.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new ft.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof ft.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Eo({loadedContexts:t})),this.dispatchEvent(new Eo({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Eo({loadedContexts:[t]})),this.dispatchEvent(new Eo({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,ft.delay)(0).then(()=>n()).catch(()=>null)))}};nd=Ap;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ya{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ya{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Lo=window.FluidTopicsI18nService,ba=window.FluidTopicsCustomI18nService;var ad=v(w()),ps=class{highlightHtml(t,r,n){(0,ad.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new ps;var id=v(w());var hs=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=I.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i,s;if(t==null)return"";try{return id.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new hs;var sd=v(w());var nn=class{static get(t,r){var n,a;let i=I.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new sd.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var ms=class{urlToSearchRequest(t){return nn.get().parse(t)}searchRequestToUrl(t){return nn.get().serialize(t)}};window.FluidTopicsUrlService=new ms;var ur=v(w());var Hr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Hr.eventName="change";var gs=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},cd=new gs;var va=class e extends ur.WithEventBus{static build(){return new e(window.history,cd,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ur.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Hr(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,l])=>{let f=r(),u={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Hr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Hr.eventName,t)}currentItem(){return(0,ur.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ur.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,ur.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=va.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var ld=v(U());var dd=ld.css`
605
605
  `;var ud=v(U()),Me=v(K()),Ot=v(w());function fd(e,t){let{authenticationRequired:r,session:n}=I.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Ce=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},te=class extends Ot.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Ur.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Ot.CacheRegistry,this.cleanSessionDebouncer=new Ot.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return ud.html`
606
606
  <slot></slot>
607
607
  `}connectedCallback(){super.connectedCallback(),I.addEventListener($r.eventName,this.reloadConfiguration)}disconnectedCallback(){I.addEventListener($r.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,n,a,i,s,l,f;super.update(t),t.has("baseUrl")&&(I.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&I.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&I.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&I.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&I.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&I.actions.noCustom(this.noCustom),t.has("editorMode")&&I.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&I.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&I.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>Lo.addContext(u)),t.has("openExternalDocumentInNewTab")&&I.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&I.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&I.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(I.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),I.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),I.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&I.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&I.actions.availableContentLocales((f=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&f!==void 0?f:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>fd(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};te.elementDefinitions={};te.styles=dd;Ce([(0,Me.property)()],te.prototype,"baseUrl",void 0);Ce([(0,Me.property)()],te.prototype,"apiIntegrationIdentifier",void 0);Ce([(0,Me.property)()],te.prototype,"apiIntegrationAppVersion",void 0);Ce([(0,Me.property)()],te.prototype,"uiLocale",void 0);Ce([(0,Ot.jsonProperty)(null)],te.prototype,"availableUiLocales",void 0);Ce([(0,Ot.jsonProperty)(null)],te.prototype,"metadataConfiguration",void 0);Ce([(0,Me.property)({type:Boolean})],te.prototype,"editorMode",void 0);Ce([(0,Me.property)({type:Boolean})],te.prototype,"noCustom",void 0);Ce([(0,Me.property)({type:Boolean})],te.prototype,"openExternalDocumentInNewTab",void 0);Ce([(0,Me.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],te.prototype,"noCustomComponent",void 0);Ce([(0,Me.property)({type:Boolean})],te.prototype,"withManualResources",void 0);Ce([(0,Me.property)({type:Boolean})],te.prototype,"navigatorOnline",void 0);Ce([(0,Me.property)({type:Boolean})],te.prototype,"forcedOffline",void 0);Ce([(0,Me.property)({type:Object})],te.prototype,"apiProvider",void 0);Ce([(0,Me.property)({type:Boolean})],te.prototype,"authenticationRequired",void 0);Ce([(0,Ot.jsonProperty)([])],te.prototype,"messageContexts",void 0);Ce([(0,Ot.jsonProperty)(void 0)],te.prototype,"session",void 0);Ce([(0,Me.state)()],te.prototype,"localesConfiguration",void 0);Ce([(0,Me.state)()],te.prototype,"availableContentLocales",void 0);var pd=v(w());(0,pd.customElement)("ft-app-context")(te);var hd=v(K());var ys=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Ao=new ys;var Rp=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},sn=Symbol("i18nAttributes"),md=Symbol("i18nListAttributes"),gd=Symbol("i18nProperties"),xa=Symbol("i18nContexts"),an=Symbol("i18nUnsubs"),wo=(0,Ro.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?ba:Lo}i18n(i){let{context:s,key:l,message:f}=i,{custom:u,args:m,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let y=m??(g?g(this):[]);return this.getI18nService(u).resolveMessage(s,l,...y)}return f}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(Ao.isI18nKey(i)){let[l,f]=i.split(".");return this.i18n({custom:!0,context:l,key:f,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,f)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,f)=>{var u;return((u=f?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let f=this,u=(m,g,y)=>y?.context&&y.key&&i(m,g,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...m})}:y;(s=this[sn])===null||s===void 0||s.forEach((m,g)=>f[g]=u(m,g,f[g])),(l=this[md])===null||l===void 0||l.forEach((m,g)=>{var y;return f[g]=(y=f[g])===null||y===void 0?void 0:y.map(S=>u(m,g,S))})}updateI18nProperties(i){var s;(s=this[gd])===null||s===void 0||s.forEach((l,f)=>{i(l,f)&&(this[f]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let f=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[xa].set(f,{isCustomContext:l}),this[an].has(f)||this[an].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[xa].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[xa].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[an].forEach(i=>i()),this[an].clear()}}return t=xa,r=an,Rp([(0,hd.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Sa=class extends wo(Ro.FtLitElement){},Ca=class extends wo(Ro.FtLitElementRedux){};var yd=v(w());var bs=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?Ao.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},wp=new bs;var bd=(e,t)=>(r,n)=>{var a;r.constructor.createProperty(n,{type:Object,hasChanged:yd.hasChanged,converter:Ao,...t}),r[sn]=(a=r[sn])!==null&&a!==void 0?a:new Map,r[sn].set(n,e??{})};var Oa=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?ba:Lo}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a}),this.attributes=new Proxy({},{get:(n,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var vd=v(U());var xd=vd.css`
@@ -45,7 +45,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
45
45
  input::-webkit-search-results-decoration {
46
46
  display: none;
47
47
  }
48
- `;var Kd={};var Ns={};X(Ns,{ParametrizedLabelResolver:()=>fn});var fn=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,a;e=this.resolvePluralKey(e,r);let i=(a=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...r)}static replaceParameters(e,...r){return r.forEach((o,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let a=`${String(e)}[\\=${o}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=a=>r?.includes("date")?e.toLocaleDateString(a):r?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return o(document.documentElement.lang)}catch{return o()}}};var tc={};X(tc,{FtCommandQueue:()=>un,FtLitElementRedux:()=>$r,FtReduxStore:()=>ur,FtStateManager:()=>pa,ReduxWatcher:()=>ua,clearAllStores:()=>uh,isFtReduxStore:()=>ho,redux:()=>Gt,reduxEventListener:()=>_4,reduxReactive:()=>w4,watch:()=>R1,withRedux:()=>qd});var w4=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},Gt=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:Xe,attribute:!1,...e};v(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:c=>c[o],store:e.store})}},_4=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var un=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==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 ho(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var pn=Symbol("internalReduxEventsUnsubscribers"),sr=Symbol("internalStoresUnsubscribers"),Dr=Symbol("internalStores"),qd=Re(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Dr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Dr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Dr].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Dr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Dr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Dr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let f=this.getStore(s.store);f&&(s.store?this[sr].has(s.store):this[sr].size>0)&&(this[c]=s.selector(f.getState(),this))}})}subscribeToStore(s,c){var d;this[sr].set(s,c.subscribe(()=>this.updateFromStores())),this[pn].set(s,[]),ho(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||c.name===f.store)){let p=g=>this[h](g);c.addEventListener(f.eventName,p),this[pn].get(s).push(()=>c.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[sr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[sr].has(s)&&this[sr].get(s)(),this[sr].delete(s),(c=this[pn].get(s))===null||c===void 0||c.forEach(d=>d()),this[pn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=sr,r=Dr,o=pn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),$r=class extends qd(K){};function dt(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var a,i;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 Wt(t){return!!t&&!!t[pe]}function vt(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===D4}(t)||Array.isArray(t)||!!t[t1]||!!(!((e=t.constructor)===null||e===void 0)&&e[t1])||Us(t)||Fs(t))}function Br(t,e,r){r===void 0&&(r=!1),yo(t)===0?(r?Object.keys:go)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,a){return e(a,o,t)})}function yo(t){var e=t[pe];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Us(t)?2:Fs(t)?3:0}function mo(t,e){return yo(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function T4(t,e){return yo(t)===2?t.get(e):t[e]}function r1(t,e,r){var o=yo(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function o1(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Us(t){return I4&&t instanceof Map}function Fs(t){return z4&&t instanceof Set}function cr(t){return t.o||t.t}function Hs(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=i1(t);delete e[pe];for(var r=go(e),o=0;o<r.length;o++){var a=r[o],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Gs(t,e){return e===void 0&&(e=!1),Ws(t)||Wt(t)||!vt(t)||(yo(t)>1&&(t.set=t.add=t.clear=t.delete=N4),Object.freeze(t),e&&Br(t,function(r,o){return Gs(o,!0)},!0)),t}function N4(){dt(2)}function Ws(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function _t(t){var e=Bs[t];return e||dt(18,t),e}function k4(t,e){Bs[t]||(Bs[t]=e)}function zs(){return mn}function ks(t,e){e&&(_t("Patches"),t.u=[],t.s=[],t.v=e)}function sa(t){Ds(t),t.p.forEach(M4),t.p=null}function Ds(t){t===mn&&(mn=t.l)}function Zd(t){return mn={p:[],l:mn,h:t,m:!0,_:0}}function M4(t){var e=t[pe];e.i===0||e.i===1?e.j():e.g=!0}function Ms(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||_t("ES5").S(e,t,o),o?(r[pe].P&&(sa(e),dt(4)),vt(t)&&(t=ca(e,t),e.l||la(e,t)),e.u&&_t("Patches").M(r[pe].t,t,e.u,e.s)):t=ca(e,r,[]),sa(e),e.u&&e.v(e.u,e.s),t!==a1?t:void 0}function ca(t,e,r){if(Ws(e))return e;var o=e[pe];if(!o)return Br(e,function(c,d){return Yd(t,o,e,c,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return la(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Hs(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Br(i,function(c,d){return Yd(t,o,a,c,d,r,s)}),la(t,a,!1),r&&t.u&&_t("Patches").N(o,r,t.u,t.s)}return o.o}function Yd(t,e,r,o,a,i,s){if(Wt(a)){var c=ca(t,a,i&&e&&e.i!==3&&!mo(e.R,o)?i.concat(o):void 0);if(r1(r,o,c),!Wt(c))return;t.m=!1}else s&&r.add(a);if(vt(a)&&!Ws(a)){if(!t.h.D&&t._<1)return;ca(t,a),e&&e.A.l||la(t,a)}}function la(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Gs(e,r)}function Ps(t,e){var r=t[pe];return(r?cr(r):t)[e]}function Xd(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function lr(t){t.P||(t.P=!0,t.l&&lr(t.l))}function Is(t){t.o||(t.o=Hs(t.t))}function $s(t,e,r){var o=Us(e)?_t("MapSet").F(e,r):Fs(e)?_t("MapSet").T(e,r):t.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:zs(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,f=gn;s&&(d=[c],f=hn);var h=Proxy.revocable(d,f),p=h.revoke,g=h.proxy;return c.k=g,c.j=p,g}(e,r):_t("ES5").J(e,r);return(r?r.A:zs()).p.push(o),o}function P4(t){return Wt(t)||dt(22,t),function e(r){if(!vt(r))return r;var o,a=r[pe],i=yo(r);if(a){if(!a.P&&(a.i<4||!_t("ES5").K(a)))return a.t;a.I=!0,o=Qd(r,i),a.I=!1}else o=Qd(r,i);return Br(o,function(s,c){a&&T4(a.t,s)===c||r1(o,s,e(c))}),i===3?new Set(o):o}(t)}function Qd(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Hs(t)}function n1(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var f=this[pe];return gn.get(f,s)},set:function(f){var h=this[pe];gn.set(h,s,f)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][pe];if(!d.P)switch(d.i){case 5:o(d)&&lr(d);break;case 4:r(d)&&lr(d)}}}function r(s){for(var c=s.t,d=s.k,f=go(d),h=f.length-1;h>=0;h--){var p=f[h];if(p!==pe){var g=c[p];if(g===void 0&&!mo(c,p))return!0;var S=d[p],C=S&&S[pe];if(C?C.t!==g:!o1(S,g))return!0}}var R=!!c[pe];return f.length!==go(c).length+(R?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function a(s){s.g&&dt(3,JSON.stringify(cr(s)))}var i={};k4("ES5",{J:function(s,c){var d=Array.isArray(s),f=function(p,g){if(p){for(var S=Array(g.length),C=0;C<g.length;C++)Object.defineProperty(S,""+C,t(C,!0));return S}var R=i1(g);delete R[pe];for(var T=go(R),M=0;M<T.length;M++){var P=T[M];R[P]=t(P,p||!!R[P].enumerable)}return Object.create(Object.getPrototypeOf(g),R)}(d,s),h={i:d?5:4,A:c?c.A:zs(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,pe,{value:h,writable:!0}),f},S:function(s,c,d){d?Wt(c)&&c[pe].A===s&&e(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var p=h[pe];if(p){var g=p.t,S=p.k,C=p.R,R=p.i;if(R===4)Br(S,function(E){E!==pe&&(g[E]!==void 0||mo(g,E)?C[E]||f(S[E]):(C[E]=!0,lr(p)))}),Br(g,function(E){S[E]!==void 0||mo(S,E)||(C[E]=!1,lr(p))});else if(R===5){if(o(p)&&(lr(p),C.length=!0),S.length<g.length)for(var T=S.length;T<g.length;T++)C[T]=!1;else for(var M=g.length;M<S.length;M++)C[M]=!0;for(var P=Math.min(S.length,g.length),L=0;L<P;L++)S.hasOwnProperty(L)||(C[L]=!0),C[L]===void 0&&f(S[L])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Jd,mn,Vs=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",I4=typeof Map<"u",z4=typeof Set<"u",e1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",a1=Vs?Symbol.for("immer-nothing"):((Jd={})["immer-nothing"]=!0,Jd),t1=Vs?Symbol.for("immer-draftable"):"__$immer_draftable",pe=Vs?Symbol.for("immer-state"):"__$immer_state";var D4=""+Object.prototype.constructor,go=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,i1=Object.getOwnPropertyDescriptors||function(t){var e={};return go(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},Bs={},gn={get:function(t,e){if(e===pe)return t;var r=cr(t);if(!mo(r,e))return function(a,i,s){var c,d=Xd(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0}(t,r,e);var o=r[e];return t.I||!vt(o)?o:o===Ps(t.t,e)?(Is(t),t.o[e]=$s(t.A.h,o,t)):o},has:function(t,e){return e in cr(t)},ownKeys:function(t){return Reflect.ownKeys(cr(t))},set:function(t,e,r){var o=Xd(cr(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Ps(cr(t),e),i=a?.[pe];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(o1(r,a)&&(r!==void 0||mo(t.t,e)))return!0;Is(t),lr(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 Ps(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Is(t),lr(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=cr(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){dt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){dt(12)}},hn={};Br(gn,function(t,e){hn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),hn.deleteProperty=function(t,e){return hn.set.call(this,t,e,void 0)},hn.set=function(t,e,r){return gn.set.call(this,t[0],e,r,t[0])};var $4=function(){function t(r){var o=this;this.O=e1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(R){var T=this;R===void 0&&(R=c);for(var M=arguments.length,P=Array(M>1?M-1:0),L=1;L<M;L++)P[L-1]=arguments[L];return d.produce(R,function(E){var w;return(w=i).call.apply(w,[T,E].concat(P))})}}var f;if(typeof i!="function"&&dt(6),s!==void 0&&typeof s!="function"&&dt(7),vt(a)){var h=Zd(o),p=$s(o,a,void 0),g=!0;try{f=i(p),g=!1}finally{g?sa(h):Ds(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(R){return ks(h,s),Ms(R,h)},function(R){throw sa(h),R}):(ks(h,s),Ms(f,h))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===a1&&(f=void 0),o.D&&Gs(f,!0),s){var S=[],C=[];_t("Patches").M(a,f,S,C),s(S,C)}return f}dt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(f){for(var h=arguments.length,p=Array(h>1?h-1:0),g=1;g<h;g++)p[g-1]=arguments[g];return o.produceWithPatches(f,function(S){return a.apply(void 0,[S].concat(p))})};var s,c,d=o.produce(a,i,function(f,h){s=f,c=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(f){return[f,s,c]}):[d,s,c]},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){vt(r)||dt(8),Wt(r)&&(r=P4(r));var o=Zd(this),a=$s(this,r,void 0);return a[pe].C=!0,Ds(o),a},e.finishDraft=function(r,o){var a=r&&r[pe],i=a.A;return ks(i,o),Ms(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!e1&&dt(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=_t("Patches").$;return Wt(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},t}(),Je=new $4,B4=Je.produce,yS=Je.produceWithPatches.bind(Je),bS=Je.setAutoFreeze.bind(Je),vS=Je.setUseProxies.bind(Je),xS=Je.applyPatches.bind(Je),SS=Je.createDraft.bind(Je),CS=Je.finishDraft.bind(Je),da=B4;function Ur(t){"@babel/helpers - typeof";return Ur=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},Ur(t)}function s1(t,e){if(Ur(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Ur(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function c1(t){var e=s1(t,"string");return Ur(e)=="symbol"?e:e+""}function l1(t,e,r){return(e=c1(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d1(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function js(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?d1(Object(r),!0).forEach(function(o){l1(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d1(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Fe(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 f1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ks=function(){return Math.random().toString(36).substring(7).split("").join(".")},fa={INIT:"@@redux/INIT"+Ks(),REPLACE:"@@redux/REPLACE"+Ks(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ks()}};function U4(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 qs(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Fe(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Fe(1));return r(qs)(t,e)}if(typeof t!="function")throw new Error(Fe(2));var a=t,i=e,s=[],c=s,d=!1;function f(){c===s&&(c=s.slice())}function h(){if(d)throw new Error(Fe(3));return i}function p(R){if(typeof R!="function")throw new Error(Fe(4));if(d)throw new Error(Fe(5));var T=!0;return f(),c.push(R),function(){if(T){if(d)throw new Error(Fe(6));T=!1,f();var P=c.indexOf(R);c.splice(P,1),s=null}}}function g(R){if(!U4(R))throw new Error(Fe(7));if(typeof R.type>"u")throw new Error(Fe(8));if(d)throw new Error(Fe(9));try{d=!0,i=a(i,R)}finally{d=!1}for(var T=s=c,M=0;M<T.length;M++){var P=T[M];P()}return R}function S(R){if(typeof R!="function")throw new Error(Fe(10));a=R,g({type:fa.REPLACE})}function C(){var R,T=p;return R={subscribe:function(P){if(typeof P!="object"||P===null)throw new Error(Fe(11));function L(){P.next&&P.next(h())}L();var E=T(L);return{unsubscribe:E}}},R[f1]=function(){return this},R}return g({type:fa.INIT}),o={dispatch:g,subscribe:p,getState:h,replaceReducer:S},o[f1]=C,o}function F4(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:fa.INIT});if(typeof o>"u")throw new Error(Fe(12));if(typeof r(void 0,{type:fa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Fe(13))})}function u1(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,c;try{F4(r)}catch(d){c=d}return function(f,h){if(f===void 0&&(f={}),c)throw c;if(0)var p;for(var g=!1,S={},C=0;C<i.length;C++){var R=i[C],T=r[R],M=f[R],P=T(M,h);if(typeof P>"u"){var L=h&&h.type;throw new Error(Fe(14))}S[R]=P,g=g||P!==M}return g=g||i.length!==Object.keys(f).length,g?S:f}}function bo(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function p1(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(Fe(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=bo.apply(void 0,c)(a.dispatch),js(js({},a),{},{dispatch:i})}}}function h1(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var m1=h1();m1.withExtraArgument=h1;var Zs=m1;var x1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},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 o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),H4=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(f){return function(h){return d([f,h])}}function d(f){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,a=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){r.label=f[1];break}if(f[0]===6&&r.label<i[1]){r.label=i[1],i=f;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(f);break}i[2]&&r.ops.pop(),r.trys.pop();continue}f=e.call(t,r)}catch(h){f=[6,h],a=0}finally{o=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},vo=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},G4=Object.defineProperty,W4=Object.defineProperties,V4=Object.getOwnPropertyDescriptors,g1=Object.getOwnPropertySymbols,j4=Object.prototype.hasOwnProperty,K4=Object.prototype.propertyIsEnumerable,y1=function(t,e,r){return e in t?G4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},dr=function(t,e){for(var r in e||(e={}))j4.call(e,r)&&y1(t,r,e[r]);if(g1)for(var o=0,a=g1(e);o<a.length;o++){var r=a[o];K4.call(e,r)&&y1(t,r,e[r])}return t},Ys=function(t,e){return W4(t,V4(e))},q4=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(f){a(f)}},s=function(d){try{c(r.throw(d))}catch(f){a(f)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var Z4=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?bo:bo.apply(null,arguments)},US=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Y4(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}var X4=function(t){x1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,vo([void 0],r[0].concat(this)))):new(e.bind.apply(e,vo([void 0],r.concat(this))))},e}(Array),Q4=function(t){x1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,vo([void 0],r[0].concat(this)))):new(e.bind.apply(e,vo([void 0],r.concat(this))))},e}(Array);function Js(t){return vt(t)?da(t,function(){}):t}function J4(t){return typeof t=="boolean"}function eh(){return function(e){return th(e)}}function th(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,c=new X4;if(r&&(J4(r)?c.push(Zs):c.push(Zs.withExtraArgument(r.extraArgument))),0){if(a)var d;if(s)var f}return c}var Xs=!0;function S1(t){var e=eh(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,c=r.devTools,d=c===void 0?!0:c,f=r.preloadedState,h=f===void 0?void 0:f,p=r.enhancers,g=p===void 0?void 0:p,S;if(typeof a=="function")S=a;else if(Y4(a))S=u1(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(e),!Xs&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Xs&&C.some(function(E){return typeof E!="function"}))throw new Error("each middleware provided to configureStore must be a function");var R=p1.apply(void 0,C),T=bo;d&&(T=Z4(dr({trace:!Xs},typeof d=="object"&&d)));var M=new Q4(R),P=M;Array.isArray(g)?P=vo([R],g):typeof g=="function"&&(P=g(M));var L=T.apply(void 0,P);return qs(S,h,L)}function fr(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return dr(dr({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function C1(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function rh(t){return typeof t=="function"}function oh(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?C1(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(rh(t))d=function(){return Js(t())};else{var f=Js(t);d=function(){return f}}function h(p,g){p===void 0&&(p=d());var S=vo([i[g.type]],s.filter(function(C){var R=C.matcher;return R(g)}).map(function(C){var R=C.reducer;return R}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,R){if(R)if(Wt(C)){var T=C,M=R(T,g);return M===void 0?C:M}else{if(vt(C))return da(C,function(P){return R(P,g)});var M=R(C,g);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},p)}return h.getInitialState=d,h}function nh(t,e){return t+"/"+e}function E1(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:Js(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(h){var p=o[h],g=nh(e,h),S,C;"reducer"in p?(S=p.reducer,C=p.prepare):S=p,i[h]=S,s[g]=S,c[h]=C?fr(g,C):fr(g)});function d(){var h=typeof t.extraReducers=="function"?C1(t.extraReducers):[t.extraReducers],p=h[0],g=p===void 0?{}:p,S=h[1],C=S===void 0?[]:S,R=h[2],T=R===void 0?void 0:R,M=dr(dr({},g),s);return oh(r,function(P){for(var L in M)P.addCase(L,M[L]);for(var E=0,w=C;E<w.length;E++){var $=w[E];P.addMatcher($.matcher,$.reducer)}T&&P.addDefaultCase(T)})}var f;return{name:e,reducer:function(h,p){return f||(f=d()),f(h,p)},actions:c,caseReducers:i,getInitialState:function(){return f||(f=d()),f.getInitialState()}}}var ah="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ih=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=ah[Math.random()*64|0];return e},sh=["name","message","stack","code"],Qs=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),b1=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),ch=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=sh;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},WS=function(){function t(e,r,o){var a=fr(e+"/fulfilled",function(h,p,g,S){return{payload:h,meta:Ys(dr({},S||{}),{arg:g,requestId:p,requestStatus:"fulfilled"})}}),i=fr(e+"/pending",function(h,p,g){return{payload:void 0,meta:Ys(dr({},g||{}),{arg:p,requestId:h,requestStatus:"pending"})}}),s=fr(e+"/rejected",function(h,p,g,S,C){return{payload:S,error:(o&&o.serializeError||ch)(h||"Rejected"),meta:Ys(dr({},C||{}),{arg:g,requestId:p,rejectedWithValue:!!S,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!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 f(h){return function(p,g,S){var C=o?.idGenerator?o.idGenerator(h):ih(),R=new d,T,M=!1;function P(E){T=E,R.abort()}var L=function(){return q4(this,null,function(){var E,w,$,Z,J,Q,G;return H4(this,function(b){switch(b.label){case 0:return b.trys.push([0,4,,5]),Z=(E=o?.condition)==null?void 0:E.call(o,h,{getState:g,extra:S}),dh(Z)?[4,Z]:[3,2];case 1:Z=b.sent(),b.label=2;case 2:if(Z===!1||R.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,J=new Promise(function(A,U){return R.signal.addEventListener("abort",function(){return U({name:"AbortError",message:T||"Aborted"})})}),p(i(C,h,(w=o?.getPendingMeta)==null?void 0:w.call(o,{requestId:C,arg:h},{getState:g,extra:S}))),[4,Promise.race([J,Promise.resolve(r(h,{dispatch:p,getState:g,extra:S,requestId:C,signal:R.signal,abort:P,rejectWithValue:function(A,U){return new Qs(A,U)},fulfillWithValue:function(A,U){return new b1(A,U)}})).then(function(A){if(A instanceof Qs)throw A;return A instanceof b1?a(A.payload,C,h,A.meta):a(A,C,h)})])];case 3:return $=b.sent(),[3,5];case 4:return Q=b.sent(),$=Q instanceof Qs?s(null,C,h,Q.payload,Q.meta):s(Q,C,h),[3,5];case 5:return G=o&&!o.dispatchConditionRejection&&s.match($)&&$.meta.condition,G||p($),[2,$]}})})}();return Object.assign(L,{abort:P,requestId:C,arg:h,unwrap:function(){return L.then(lh)}})}}return Object.assign(f,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function lh(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function dh(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var O1="listener",L1="completed",A1="cancelled",VS="task-"+A1,jS="task-"+L1,KS=O1+"-"+A1,qS=O1+"-"+L1;var ec="listenerMiddleware";var ZS=fr(ec+"/add"),YS=fr(ec+"/removeAll"),XS=fr(ec+"/remove");var v1,QS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(v1||(v1=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},fh=function(t){return function(e){setTimeout(e,t)}},JS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:fh(10);n1();window.ftReduxStores||(window.ftReduxStores={});var ur=class t extends Ut{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(ho(i))return i;if(a==null)return;let s=E1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=S1({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=_r(s.getInitialState());for(let p of f.keeping)h[p]=(d??h)[p];return h}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...f.overwrites};return s.reducer(d,f)}});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new un;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,f=i[d];return f?(...h)=>{let p=f(...h.map(a));return this.reduxStore.dispatch(p),p}:h=>{this.setState({[d]:a(h)})}}}),this.eventBus=o??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 uh(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))ho(e)&&e.clear()}var ua=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}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);Xe(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 R1(t,e,r){return new ua(t,e,r).watch()}var pa=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 o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var nc={};X(nc,{scrollHelper:()=>ph});var rc,ha=new Map,oc=class{lock(e,r){if(r){let o=ha.get(r);if(o==null||o===e)return ha.set(r,e),r}}release(e,r){r&&ha.get(r)===e&&ha.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of Ai(e)){let s=i,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&a==null&&(a=s)}return(r=o??a)!==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 o,a;let i=0;for(;r&&r.offsetParent!==e.offsetParent;)i+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a: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 o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let a=this.getAbsoluteScrollOffset(o,e),i=a-o.clientHeight+e.clientHeight,s=a,c=rr(0,(s-o.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,c)*(i-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(rc=window.FluidTopicsScrollHelper)!==null&&rc!==void 0?rc:new oc;var ph=window.FluidTopicsScrollHelper;var ic={};X(ic,{SearchPlaceConverter:()=>Co,SearchPlaceQueryParams:()=>ne,isSearchPlaceQueryParams:()=>f2,serializeRequest:()=>yh});var mh=Ku(_1(),1);var T1;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(T1||(T1={}));var N1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(N1||(N1={}));var k1;(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"})(k1||(k1={}));var M1;(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"})(M1||(M1={}));var P1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(P1||(P1={}));var I1;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(I1||(I1={}));var z1;(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"})(z1||(z1={}));var D1;(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"})(D1||(D1={}));var $1;(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"})($1||($1={}));var B1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(B1||(B1={}));var U1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(U1||(U1={}));var F1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(F1||(F1={}));var H1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(H1||(H1={}));var G1;(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"})(G1||(G1={}));var Fr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Fr||(Fr={}));var W1;(function(t){t.ASC="ASC",t.DESC="DESC"})(W1||(W1={}));var V1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(V1||(V1={}));var ya;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(ya||(ya={}));var Q1=t=>Object.keys(ya).includes(t);var j1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(j1||(j1={}));var K1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(K1||(K1={}));var q1;(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"})(q1||(q1={}));var So;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(So||(So={}));var J1=t=>Object.keys(So).includes(t);var Z1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Z1||(Z1={}));var ac;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ac||(ac={}));var Y1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Y1||(Y1={}));var Le;(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"})(Le||(Le={}));var ft;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ft||(ft={}));var X1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(X1||(X1={}));var e2;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(e2||(e2={}));var t2;(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"})(t2||(t2={}));var r2;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(r2||(r2={}));var o2;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(o2||(o2={}));var n2;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(n2||(n2={}));var a2;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(a2||(a2={}));var i2;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(i2||(i2={}));var s2;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(s2||(s2={}));var hh={[Le.PERSONAL_BOOK_SHARE_USER]:[Le.PERSONAL_BOOK_USER],[Le.HTML_EXPORT_USER]:[Le.PERSONAL_BOOK_USER],[Le.PDF_EXPORT_USER]:[Le.PERSONAL_BOOK_USER],[Le.KHUB_ADMIN]:[Le.CONTENT_PUBLISHER],[Le.ADMIN]:[Le.KHUB_ADMIN,Le.USERS_ADMIN,Le.PORTAL_ADMIN,Le.BEHAVIOR_DATA_USER],[Le.GENERATIVE_AI_EXPORT_USER]:[Le.GENERATIVE_AI_USER]};function c2(t,e){return t===e||(hh[t]??[]).some(r=>c2(r,e))}function l2(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(o=>c2(o,e))}function gh(t){return`"${t}"`}function d2(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function yh(t,e){return new Co(t).serialize(e)}var ne;(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"})(ne||(ne={}));var bh=new Set(Object.values(ne));function f2(t){return bh.has(t)}var Co=class{constructor(e,r=20,o=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=a,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 o=r==null||r.trim().length===0,a=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,r=!1){var o,a,i,s,c,d,f,h,p,g,S;let C=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&C.append(ne.LOCALE,e.contentLocale):C.append(ne.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&C.append(ne.QUERY,e.query);let R=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(E=>E.valueFilter&&!E.valueFilter.negative))!==null&&i!==void 0?i:[];if(R.length>0){let E=R.map(w=>{var $,Z;let J=((Z=($=w.valueFilter)===null||$===void 0?void 0:$.values)!==null&&Z!==void 0?Z:[]).map(Q=>this.escapeFilters(Q)).map(Q=>gh(d2(Q))).join("_");return`${w.key}~${J}`}).join("*");C.append(ne.VALUE_FILTERS,E)}let T=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(E=>E.dateFilter))!==null&&c!==void 0?c:[];if(T.length>0){let E=T.map(w=>{var $;return`${w.key}~${($=w.dateFilter)===null||$===void 0?void 0:$.type.toLowerCase()}`}).join("*");C.append(ne.DATE_FILTERS,E)}let M=(f=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(E=>E.rangeFilter))!==null&&f!==void 0?f:[];if(M.length>0){let E=M.map(w=>{var $,Z;return`${w.key}~${($=w.rangeFilter)===null||$===void 0?void 0:$.from}_${(Z=w.rangeFilter)===null||Z===void 0?void 0:Z.to}`}).join("*");C.append(ne.RANGE_FILTERS,E)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&C.append(ne.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&C.append(ne.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&C.append(ne.SORT,e.sortId),!((h=e.paging)===null||h===void 0)&&h.perPage&&((g=(p=e.paging)===null||p===void 0?void 0:p.perPage)!==null&&g!==void 0?g:this.defaultPerPage)!=this.defaultPerPage&&C.append(ne.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&C.append(ne.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let P=(S=e.otherQueryParams)!==null&&S!==void 0?S:{};for(let E in P)C.append(E,P[E]);let L=new Array;return C.forEach((E,w)=>{L.push(this.encodeQueryString(w)+"="+this.encodeQueryString(E))}),encodeURI(L.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),a=this.fromURLSearchParams(o.slice(1).join("?")),i=o[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(e){var r,o,a,i,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(M){console.warn("Could not decode search request query params, fallback on raw value",M)}let d=new URLSearchParams(e),f=d.get(ne.LOCALE)==="all"?void 0:d.get(ne.LOCALE),h=((r=d.get(ne.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),p=(o=d.get(ne.SORT))===null||o===void 0?void 0:o.toLowerCase(),g=(a=d.get(ne.SCOPE))!==null&&a!==void 0?a:"default",S=+((i=d.get(ne.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),C=d.get(ne.KEYWORD_MATCH),R=C?C.toUpperCase()===Fr.MANDATORY?Fr.MANDATORY:Fr.OPTIONAL:void 0,T={};for(let M of d.keys())f2(M)||(T[M]=d.get(M));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(ne.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[g])!==null&&c!==void 0?c:"DEFAULT",virtualField:Q1(h)?h:"EVERYWHERE",sortId:p,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:rr(1,isNaN(S)?this.defaultPerPage:S,1e3)},keywordMatch:R,otherQueryParams:T}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(ne.FILTERS)&&(d=this.parseValueFilters((r=e.get(ne.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(ne.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(ne.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(ne.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(ne.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(ne.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}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(d2).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:So[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,o,a]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(o,a);return e}unescapeFilterValue(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replace(a,r);return e}parseLegacyPeriodFilter(e){if(J1(e))return[{key:"ft:lastEdition",dateFilter:{type:So[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}};var lc={};X(lc,{toFtFormComponent:()=>cc});var sc=Symbol("elementInternals"),cc=Re(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[sc].form}constructor(...o){super(o),this[sc]=this.attachInternals()}setFormValue(o){this[sc].setFormValue(o)}}return e});var dc={};X(dc,{DateFormatter:()=>Hr});var Hr=class{static format(e,r,o,a){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a)):this.getIntlDateTime(e,r,o,a)}static getMomentDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a){let i=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(i);if(!a)return s;let c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${c}`}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var uc={};X(uc,{ALL_KEYS_VALUE:()=>fc,SameWindowStorageEvent:()=>Eo});var fc="__all__",Eo=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==fc}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Eo(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Eo(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new Eo(fc))}});var hc={};X(hc,{FocusMainContentEvent:()=>pc});var pc=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var u2={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function vh(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function xh(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",vh);document.addEventListener("click",xh);var p2=I`
48
+ `;var Kd={};var Ns={};X(Ns,{ParametrizedLabelResolver:()=>fn});var fn=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,a;e=this.resolvePluralKey(e,r);let i=(a=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...r)}static replaceParameters(e,...r){return r.forEach((o,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let a=`${String(e)}[\\=${o}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=a=>r?.includes("date")?e.toLocaleDateString(a):r?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return o(document.documentElement.lang)}catch{return o()}}};var tc={};X(tc,{FtCommandQueue:()=>un,FtLitElementRedux:()=>$r,FtReduxStore:()=>ur,FtStateManager:()=>pa,ReduxWatcher:()=>ua,clearAllStores:()=>uh,isFtReduxStore:()=>ho,redux:()=>Gt,reduxEventListener:()=>_4,reduxReactive:()=>w4,watch:()=>R1,withRedux:()=>qd});var w4=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},Gt=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:Xe,attribute:!1,...e};v(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:c=>c[o],store:e.store})}},_4=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var un=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==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 ho(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var pn=Symbol("internalReduxEventsUnsubscribers"),sr=Symbol("internalStoresUnsubscribers"),Dr=Symbol("internalStores"),qd=Re(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Dr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Dr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Dr].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Dr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Dr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Dr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let f=this.getStore(s.store);f&&(s.store?this[sr].has(s.store):this[sr].size>0)&&(this[c]=s.selector(f.getState(),this))}})}subscribeToStore(s,c){var d;this[sr].set(s,c.subscribe(()=>this.updateFromStores())),this[pn].set(s,[]),ho(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||c.name===f.store)){let p=g=>this[h](g);c.addEventListener(f.eventName,p),this[pn].get(s).push(()=>c.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[sr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[sr].has(s)&&this[sr].get(s)(),this[sr].delete(s),(c=this[pn].get(s))===null||c===void 0||c.forEach(d=>d()),this[pn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=sr,r=Dr,o=pn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),$r=class extends qd(K){};function dt(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var a,i;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 Wt(t){return!!t&&!!t[pe]}function vt(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===D4}(t)||Array.isArray(t)||!!t[t1]||!!(!((e=t.constructor)===null||e===void 0)&&e[t1])||Us(t)||Fs(t))}function Br(t,e,r){r===void 0&&(r=!1),yo(t)===0?(r?Object.keys:go)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,a){return e(a,o,t)})}function yo(t){var e=t[pe];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Us(t)?2:Fs(t)?3:0}function mo(t,e){return yo(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function T4(t,e){return yo(t)===2?t.get(e):t[e]}function r1(t,e,r){var o=yo(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function o1(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Us(t){return I4&&t instanceof Map}function Fs(t){return z4&&t instanceof Set}function cr(t){return t.o||t.t}function Hs(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=i1(t);delete e[pe];for(var r=go(e),o=0;o<r.length;o++){var a=r[o],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Gs(t,e){return e===void 0&&(e=!1),Ws(t)||Wt(t)||!vt(t)||(yo(t)>1&&(t.set=t.add=t.clear=t.delete=N4),Object.freeze(t),e&&Br(t,function(r,o){return Gs(o,!0)},!0)),t}function N4(){dt(2)}function Ws(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function _t(t){var e=Bs[t];return e||dt(18,t),e}function k4(t,e){Bs[t]||(Bs[t]=e)}function zs(){return mn}function ks(t,e){e&&(_t("Patches"),t.u=[],t.s=[],t.v=e)}function sa(t){Ds(t),t.p.forEach(M4),t.p=null}function Ds(t){t===mn&&(mn=t.l)}function Zd(t){return mn={p:[],l:mn,h:t,m:!0,_:0}}function M4(t){var e=t[pe];e.i===0||e.i===1?e.j():e.g=!0}function Ms(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||_t("ES5").S(e,t,o),o?(r[pe].P&&(sa(e),dt(4)),vt(t)&&(t=ca(e,t),e.l||la(e,t)),e.u&&_t("Patches").M(r[pe].t,t,e.u,e.s)):t=ca(e,r,[]),sa(e),e.u&&e.v(e.u,e.s),t!==a1?t:void 0}function ca(t,e,r){if(Ws(e))return e;var o=e[pe];if(!o)return Br(e,function(c,d){return Yd(t,o,e,c,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return la(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Hs(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Br(i,function(c,d){return Yd(t,o,a,c,d,r,s)}),la(t,a,!1),r&&t.u&&_t("Patches").N(o,r,t.u,t.s)}return o.o}function Yd(t,e,r,o,a,i,s){if(Wt(a)){var c=ca(t,a,i&&e&&e.i!==3&&!mo(e.R,o)?i.concat(o):void 0);if(r1(r,o,c),!Wt(c))return;t.m=!1}else s&&r.add(a);if(vt(a)&&!Ws(a)){if(!t.h.D&&t._<1)return;ca(t,a),e&&e.A.l||la(t,a)}}function la(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Gs(e,r)}function Ps(t,e){var r=t[pe];return(r?cr(r):t)[e]}function Xd(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function lr(t){t.P||(t.P=!0,t.l&&lr(t.l))}function Is(t){t.o||(t.o=Hs(t.t))}function $s(t,e,r){var o=Us(e)?_t("MapSet").F(e,r):Fs(e)?_t("MapSet").T(e,r):t.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:zs(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,f=gn;s&&(d=[c],f=hn);var h=Proxy.revocable(d,f),p=h.revoke,g=h.proxy;return c.k=g,c.j=p,g}(e,r):_t("ES5").J(e,r);return(r?r.A:zs()).p.push(o),o}function P4(t){return Wt(t)||dt(22,t),function e(r){if(!vt(r))return r;var o,a=r[pe],i=yo(r);if(a){if(!a.P&&(a.i<4||!_t("ES5").K(a)))return a.t;a.I=!0,o=Qd(r,i),a.I=!1}else o=Qd(r,i);return Br(o,function(s,c){a&&T4(a.t,s)===c||r1(o,s,e(c))}),i===3?new Set(o):o}(t)}function Qd(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Hs(t)}function n1(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var f=this[pe];return gn.get(f,s)},set:function(f){var h=this[pe];gn.set(h,s,f)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][pe];if(!d.P)switch(d.i){case 5:o(d)&&lr(d);break;case 4:r(d)&&lr(d)}}}function r(s){for(var c=s.t,d=s.k,f=go(d),h=f.length-1;h>=0;h--){var p=f[h];if(p!==pe){var g=c[p];if(g===void 0&&!mo(c,p))return!0;var S=d[p],C=S&&S[pe];if(C?C.t!==g:!o1(S,g))return!0}}var R=!!c[pe];return f.length!==go(c).length+(R?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function a(s){s.g&&dt(3,JSON.stringify(cr(s)))}var i={};k4("ES5",{J:function(s,c){var d=Array.isArray(s),f=function(p,g){if(p){for(var S=Array(g.length),C=0;C<g.length;C++)Object.defineProperty(S,""+C,t(C,!0));return S}var R=i1(g);delete R[pe];for(var T=go(R),M=0;M<T.length;M++){var P=T[M];R[P]=t(P,p||!!R[P].enumerable)}return Object.create(Object.getPrototypeOf(g),R)}(d,s),h={i:d?5:4,A:c?c.A:zs(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,pe,{value:h,writable:!0}),f},S:function(s,c,d){d?Wt(c)&&c[pe].A===s&&e(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var p=h[pe];if(p){var g=p.t,S=p.k,C=p.R,R=p.i;if(R===4)Br(S,function(E){E!==pe&&(g[E]!==void 0||mo(g,E)?C[E]||f(S[E]):(C[E]=!0,lr(p)))}),Br(g,function(E){S[E]!==void 0||mo(S,E)||(C[E]=!1,lr(p))});else if(R===5){if(o(p)&&(lr(p),C.length=!0),S.length<g.length)for(var T=S.length;T<g.length;T++)C[T]=!1;else for(var M=g.length;M<S.length;M++)C[M]=!0;for(var P=Math.min(S.length,g.length),L=0;L<P;L++)S.hasOwnProperty(L)||(C[L]=!0),C[L]===void 0&&f(S[L])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Jd,mn,Vs=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",I4=typeof Map<"u",z4=typeof Set<"u",e1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",a1=Vs?Symbol.for("immer-nothing"):((Jd={})["immer-nothing"]=!0,Jd),t1=Vs?Symbol.for("immer-draftable"):"__$immer_draftable",pe=Vs?Symbol.for("immer-state"):"__$immer_state";var D4=""+Object.prototype.constructor,go=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,i1=Object.getOwnPropertyDescriptors||function(t){var e={};return go(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},Bs={},gn={get:function(t,e){if(e===pe)return t;var r=cr(t);if(!mo(r,e))return function(a,i,s){var c,d=Xd(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0}(t,r,e);var o=r[e];return t.I||!vt(o)?o:o===Ps(t.t,e)?(Is(t),t.o[e]=$s(t.A.h,o,t)):o},has:function(t,e){return e in cr(t)},ownKeys:function(t){return Reflect.ownKeys(cr(t))},set:function(t,e,r){var o=Xd(cr(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Ps(cr(t),e),i=a?.[pe];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(o1(r,a)&&(r!==void 0||mo(t.t,e)))return!0;Is(t),lr(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 Ps(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Is(t),lr(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=cr(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){dt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){dt(12)}},hn={};Br(gn,function(t,e){hn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),hn.deleteProperty=function(t,e){return hn.set.call(this,t,e,void 0)},hn.set=function(t,e,r){return gn.set.call(this,t[0],e,r,t[0])};var $4=function(){function t(r){var o=this;this.O=e1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(R){var T=this;R===void 0&&(R=c);for(var M=arguments.length,P=Array(M>1?M-1:0),L=1;L<M;L++)P[L-1]=arguments[L];return d.produce(R,function(E){var w;return(w=i).call.apply(w,[T,E].concat(P))})}}var f;if(typeof i!="function"&&dt(6),s!==void 0&&typeof s!="function"&&dt(7),vt(a)){var h=Zd(o),p=$s(o,a,void 0),g=!0;try{f=i(p),g=!1}finally{g?sa(h):Ds(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(R){return ks(h,s),Ms(R,h)},function(R){throw sa(h),R}):(ks(h,s),Ms(f,h))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===a1&&(f=void 0),o.D&&Gs(f,!0),s){var S=[],C=[];_t("Patches").M(a,f,S,C),s(S,C)}return f}dt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(f){for(var h=arguments.length,p=Array(h>1?h-1:0),g=1;g<h;g++)p[g-1]=arguments[g];return o.produceWithPatches(f,function(S){return a.apply(void 0,[S].concat(p))})};var s,c,d=o.produce(a,i,function(f,h){s=f,c=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(f){return[f,s,c]}):[d,s,c]},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){vt(r)||dt(8),Wt(r)&&(r=P4(r));var o=Zd(this),a=$s(this,r,void 0);return a[pe].C=!0,Ds(o),a},e.finishDraft=function(r,o){var a=r&&r[pe],i=a.A;return ks(i,o),Ms(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!e1&&dt(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=_t("Patches").$;return Wt(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},t}(),Je=new $4,B4=Je.produce,yS=Je.produceWithPatches.bind(Je),bS=Je.setAutoFreeze.bind(Je),vS=Je.setUseProxies.bind(Je),xS=Je.applyPatches.bind(Je),SS=Je.createDraft.bind(Je),CS=Je.finishDraft.bind(Je),da=B4;function Ur(t){"@babel/helpers - typeof";return Ur=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},Ur(t)}function s1(t,e){if(Ur(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Ur(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function c1(t){var e=s1(t,"string");return Ur(e)=="symbol"?e:e+""}function l1(t,e,r){return(e=c1(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d1(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function js(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?d1(Object(r),!0).forEach(function(o){l1(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d1(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Fe(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 f1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ks=function(){return Math.random().toString(36).substring(7).split("").join(".")},fa={INIT:"@@redux/INIT"+Ks(),REPLACE:"@@redux/REPLACE"+Ks(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ks()}};function U4(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 qs(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Fe(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Fe(1));return r(qs)(t,e)}if(typeof t!="function")throw new Error(Fe(2));var a=t,i=e,s=[],c=s,d=!1;function f(){c===s&&(c=s.slice())}function h(){if(d)throw new Error(Fe(3));return i}function p(R){if(typeof R!="function")throw new Error(Fe(4));if(d)throw new Error(Fe(5));var T=!0;return f(),c.push(R),function(){if(T){if(d)throw new Error(Fe(6));T=!1,f();var P=c.indexOf(R);c.splice(P,1),s=null}}}function g(R){if(!U4(R))throw new Error(Fe(7));if(typeof R.type>"u")throw new Error(Fe(8));if(d)throw new Error(Fe(9));try{d=!0,i=a(i,R)}finally{d=!1}for(var T=s=c,M=0;M<T.length;M++){var P=T[M];P()}return R}function S(R){if(typeof R!="function")throw new Error(Fe(10));a=R,g({type:fa.REPLACE})}function C(){var R,T=p;return R={subscribe:function(P){if(typeof P!="object"||P===null)throw new Error(Fe(11));function L(){P.next&&P.next(h())}L();var E=T(L);return{unsubscribe:E}}},R[f1]=function(){return this},R}return g({type:fa.INIT}),o={dispatch:g,subscribe:p,getState:h,replaceReducer:S},o[f1]=C,o}function F4(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:fa.INIT});if(typeof o>"u")throw new Error(Fe(12));if(typeof r(void 0,{type:fa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Fe(13))})}function u1(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,c;try{F4(r)}catch(d){c=d}return function(f,h){if(f===void 0&&(f={}),c)throw c;if(0)var p;for(var g=!1,S={},C=0;C<i.length;C++){var R=i[C],T=r[R],M=f[R],P=T(M,h);if(typeof P>"u"){var L=h&&h.type;throw new Error(Fe(14))}S[R]=P,g=g||P!==M}return g=g||i.length!==Object.keys(f).length,g?S:f}}function bo(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function p1(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(Fe(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=bo.apply(void 0,c)(a.dispatch),js(js({},a),{},{dispatch:i})}}}function h1(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var m1=h1();m1.withExtraArgument=h1;var Zs=m1;var x1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},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 o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),H4=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(f){return function(h){return d([f,h])}}function d(f){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,a=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){r.label=f[1];break}if(f[0]===6&&r.label<i[1]){r.label=i[1],i=f;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(f);break}i[2]&&r.ops.pop(),r.trys.pop();continue}f=e.call(t,r)}catch(h){f=[6,h],a=0}finally{o=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},vo=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},G4=Object.defineProperty,W4=Object.defineProperties,V4=Object.getOwnPropertyDescriptors,g1=Object.getOwnPropertySymbols,j4=Object.prototype.hasOwnProperty,K4=Object.prototype.propertyIsEnumerable,y1=function(t,e,r){return e in t?G4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},dr=function(t,e){for(var r in e||(e={}))j4.call(e,r)&&y1(t,r,e[r]);if(g1)for(var o=0,a=g1(e);o<a.length;o++){var r=a[o];K4.call(e,r)&&y1(t,r,e[r])}return t},Ys=function(t,e){return W4(t,V4(e))},q4=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(f){a(f)}},s=function(d){try{c(r.throw(d))}catch(f){a(f)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var Z4=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?bo:bo.apply(null,arguments)},US=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Y4(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}var X4=function(t){x1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,vo([void 0],r[0].concat(this)))):new(e.bind.apply(e,vo([void 0],r.concat(this))))},e}(Array),Q4=function(t){x1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,vo([void 0],r[0].concat(this)))):new(e.bind.apply(e,vo([void 0],r.concat(this))))},e}(Array);function Js(t){return vt(t)?da(t,function(){}):t}function J4(t){return typeof t=="boolean"}function eh(){return function(e){return th(e)}}function th(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,c=new X4;if(r&&(J4(r)?c.push(Zs):c.push(Zs.withExtraArgument(r.extraArgument))),0){if(a)var d;if(s)var f}return c}var Xs=!0;function S1(t){var e=eh(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,c=r.devTools,d=c===void 0?!0:c,f=r.preloadedState,h=f===void 0?void 0:f,p=r.enhancers,g=p===void 0?void 0:p,S;if(typeof a=="function")S=a;else if(Y4(a))S=u1(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(e),!Xs&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Xs&&C.some(function(E){return typeof E!="function"}))throw new Error("each middleware provided to configureStore must be a function");var R=p1.apply(void 0,C),T=bo;d&&(T=Z4(dr({trace:!Xs},typeof d=="object"&&d)));var M=new Q4(R),P=M;Array.isArray(g)?P=vo([R],g):typeof g=="function"&&(P=g(M));var L=T.apply(void 0,P);return qs(S,h,L)}function fr(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return dr(dr({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function C1(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function rh(t){return typeof t=="function"}function oh(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?C1(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(rh(t))d=function(){return Js(t())};else{var f=Js(t);d=function(){return f}}function h(p,g){p===void 0&&(p=d());var S=vo([i[g.type]],s.filter(function(C){var R=C.matcher;return R(g)}).map(function(C){var R=C.reducer;return R}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,R){if(R)if(Wt(C)){var T=C,M=R(T,g);return M===void 0?C:M}else{if(vt(C))return da(C,function(P){return R(P,g)});var M=R(C,g);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},p)}return h.getInitialState=d,h}function nh(t,e){return t+"/"+e}function E1(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:Js(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(h){var p=o[h],g=nh(e,h),S,C;"reducer"in p?(S=p.reducer,C=p.prepare):S=p,i[h]=S,s[g]=S,c[h]=C?fr(g,C):fr(g)});function d(){var h=typeof t.extraReducers=="function"?C1(t.extraReducers):[t.extraReducers],p=h[0],g=p===void 0?{}:p,S=h[1],C=S===void 0?[]:S,R=h[2],T=R===void 0?void 0:R,M=dr(dr({},g),s);return oh(r,function(P){for(var L in M)P.addCase(L,M[L]);for(var E=0,w=C;E<w.length;E++){var $=w[E];P.addMatcher($.matcher,$.reducer)}T&&P.addDefaultCase(T)})}var f;return{name:e,reducer:function(h,p){return f||(f=d()),f(h,p)},actions:c,caseReducers:i,getInitialState:function(){return f||(f=d()),f.getInitialState()}}}var ah="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ih=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=ah[Math.random()*64|0];return e},sh=["name","message","stack","code"],Qs=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),b1=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),ch=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=sh;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},WS=function(){function t(e,r,o){var a=fr(e+"/fulfilled",function(h,p,g,S){return{payload:h,meta:Ys(dr({},S||{}),{arg:g,requestId:p,requestStatus:"fulfilled"})}}),i=fr(e+"/pending",function(h,p,g){return{payload:void 0,meta:Ys(dr({},g||{}),{arg:p,requestId:h,requestStatus:"pending"})}}),s=fr(e+"/rejected",function(h,p,g,S,C){return{payload:S,error:(o&&o.serializeError||ch)(h||"Rejected"),meta:Ys(dr({},C||{}),{arg:g,requestId:p,rejectedWithValue:!!S,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!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 f(h){return function(p,g,S){var C=o?.idGenerator?o.idGenerator(h):ih(),R=new d,T,M=!1;function P(E){T=E,R.abort()}var L=function(){return q4(this,null,function(){var E,w,$,Z,J,Q,G;return H4(this,function(b){switch(b.label){case 0:return b.trys.push([0,4,,5]),Z=(E=o?.condition)==null?void 0:E.call(o,h,{getState:g,extra:S}),dh(Z)?[4,Z]:[3,2];case 1:Z=b.sent(),b.label=2;case 2:if(Z===!1||R.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,J=new Promise(function(A,U){return R.signal.addEventListener("abort",function(){return U({name:"AbortError",message:T||"Aborted"})})}),p(i(C,h,(w=o?.getPendingMeta)==null?void 0:w.call(o,{requestId:C,arg:h},{getState:g,extra:S}))),[4,Promise.race([J,Promise.resolve(r(h,{dispatch:p,getState:g,extra:S,requestId:C,signal:R.signal,abort:P,rejectWithValue:function(A,U){return new Qs(A,U)},fulfillWithValue:function(A,U){return new b1(A,U)}})).then(function(A){if(A instanceof Qs)throw A;return A instanceof b1?a(A.payload,C,h,A.meta):a(A,C,h)})])];case 3:return $=b.sent(),[3,5];case 4:return Q=b.sent(),$=Q instanceof Qs?s(null,C,h,Q.payload,Q.meta):s(Q,C,h),[3,5];case 5:return G=o&&!o.dispatchConditionRejection&&s.match($)&&$.meta.condition,G||p($),[2,$]}})})}();return Object.assign(L,{abort:P,requestId:C,arg:h,unwrap:function(){return L.then(lh)}})}}return Object.assign(f,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function lh(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function dh(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var O1="listener",L1="completed",A1="cancelled",VS="task-"+A1,jS="task-"+L1,KS=O1+"-"+A1,qS=O1+"-"+L1;var ec="listenerMiddleware";var ZS=fr(ec+"/add"),YS=fr(ec+"/removeAll"),XS=fr(ec+"/remove");var v1,QS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(v1||(v1=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},fh=function(t){return function(e){setTimeout(e,t)}},JS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:fh(10);n1();window.ftReduxStores||(window.ftReduxStores={});var ur=class t extends Ut{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(ho(i))return i;if(a==null)return;let s=E1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=S1({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=_r(s.getInitialState());for(let p of f.keeping)h[p]=(d??h)[p];return h}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...f.overwrites};return s.reducer(d,f)}});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new un;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,f=i[d];return f?(...h)=>{let p=f(...h.map(a));return this.reduxStore.dispatch(p),p}:h=>{this.setState({[d]:a(h)})}}}),this.eventBus=o??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 uh(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))ho(e)&&e.clear()}var ua=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}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);Xe(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 R1(t,e,r){return new ua(t,e,r).watch()}var pa=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 o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var nc={};X(nc,{scrollHelper:()=>ph});var rc,ha=new Map,oc=class{lock(e,r){if(r){let o=ha.get(r);if(o==null||o===e)return ha.set(r,e),r}}release(e,r){r&&ha.get(r)===e&&ha.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of Ai(e)){let s=i,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&a==null&&(a=s)}return(r=o??a)!==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 o,a;let i=0;for(;r&&r.offsetParent!==e.offsetParent;)i+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a: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 o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let a=this.getAbsoluteScrollOffset(o,e),i=a-o.clientHeight+e.clientHeight,s=a,c=rr(0,(s-o.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,c)*(i-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(rc=window.FluidTopicsScrollHelper)!==null&&rc!==void 0?rc:new oc;var ph=window.FluidTopicsScrollHelper;var ic={};X(ic,{SearchPlaceConverter:()=>Co,SearchPlaceQueryParams:()=>ne,isSearchPlaceQueryParams:()=>f2,serializeRequest:()=>yh});var mh=Ku(_1(),1);var T1;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(T1||(T1={}));var N1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(N1||(N1={}));var k1;(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"})(k1||(k1={}));var M1;(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"})(M1||(M1={}));var P1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(P1||(P1={}));var I1;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(I1||(I1={}));var z1;(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"})(z1||(z1={}));var D1;(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"})(D1||(D1={}));var $1;(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"})($1||($1={}));var B1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(B1||(B1={}));var U1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(U1||(U1={}));var F1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(F1||(F1={}));var H1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(H1||(H1={}));var G1;(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"})(G1||(G1={}));var Fr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Fr||(Fr={}));var W1;(function(t){t.ASC="ASC",t.DESC="DESC"})(W1||(W1={}));var V1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(V1||(V1={}));var ya;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(ya||(ya={}));var Q1=t=>Object.keys(ya).includes(t);var j1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(j1||(j1={}));var K1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(K1||(K1={}));var q1;(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"})(q1||(q1={}));var So;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(So||(So={}));var J1=t=>Object.keys(So).includes(t);var Z1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Z1||(Z1={}));var ac;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ac||(ac={}));var Y1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Y1||(Y1={}));var Le;(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"})(Le||(Le={}));var ft;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ft||(ft={}));var X1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(X1||(X1={}));var e2;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(e2||(e2={}));var t2;(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"})(t2||(t2={}));var r2;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(r2||(r2={}));var o2;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(o2||(o2={}));var n2;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(n2||(n2={}));var a2;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(a2||(a2={}));var i2;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(i2||(i2={}));var s2;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(s2||(s2={}));var hh={[Le.PERSONAL_BOOK_SHARE_USER]:[Le.PERSONAL_BOOK_USER],[Le.HTML_EXPORT_USER]:[Le.PERSONAL_BOOK_USER],[Le.PDF_EXPORT_USER]:[Le.PERSONAL_BOOK_USER],[Le.KHUB_ADMIN]:[Le.CONTENT_PUBLISHER],[Le.ADMIN]:[Le.KHUB_ADMIN,Le.USERS_ADMIN,Le.PORTAL_ADMIN,Le.BEHAVIOR_DATA_USER],[Le.GENERATIVE_AI_EXPORT_USER]:[Le.GENERATIVE_AI_USER]};function c2(t,e){return t===e||(hh[t]??[]).some(r=>c2(r,e))}function l2(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(o=>c2(o,e))}function gh(t){return`"${t}"`}function d2(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function yh(t,e){return new Co(t).serialize(e)}var ne;(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"})(ne||(ne={}));var bh=new Set(Object.values(ne));function f2(t){return bh.has(t)}var Co=class{constructor(e,r=20,o=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=a,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 o=r==null||r.trim().length===0,a=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,r=!1){var o,a,i,s,c,d,f,h,p,g,S;let C=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&C.append(ne.LOCALE,e.contentLocale):C.append(ne.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&C.append(ne.QUERY,e.query);let R=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(E=>E.valueFilter&&!E.valueFilter.negative))!==null&&i!==void 0?i:[];if(R.length>0){let E=R.map(w=>{var $,Z;let J=((Z=($=w.valueFilter)===null||$===void 0?void 0:$.values)!==null&&Z!==void 0?Z:[]).map(Q=>this.escapeFilters(Q)).map(Q=>gh(d2(Q))).join("_");return`${w.key}~${J}`}).join("*");C.append(ne.VALUE_FILTERS,E)}let T=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(E=>E.dateFilter))!==null&&c!==void 0?c:[];if(T.length>0){let E=T.map(w=>{var $;return`${w.key}~${($=w.dateFilter)===null||$===void 0?void 0:$.type.toLowerCase()}`}).join("*");C.append(ne.DATE_FILTERS,E)}let M=(f=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(E=>E.rangeFilter))!==null&&f!==void 0?f:[];if(M.length>0){let E=M.map(w=>{var $,Z;return`${w.key}~${($=w.rangeFilter)===null||$===void 0?void 0:$.from}_${(Z=w.rangeFilter)===null||Z===void 0?void 0:Z.to}`}).join("*");C.append(ne.RANGE_FILTERS,E)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&C.append(ne.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&C.append(ne.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&C.append(ne.SORT,e.sortId),!((h=e.paging)===null||h===void 0)&&h.perPage&&((g=(p=e.paging)===null||p===void 0?void 0:p.perPage)!==null&&g!==void 0?g:this.defaultPerPage)!=this.defaultPerPage&&C.append(ne.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&C.append(ne.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let P=(S=e.otherQueryParams)!==null&&S!==void 0?S:{};for(let E in P)C.append(E,P[E]);let L=new Array;return C.forEach((E,w)=>{L.push(this.encodeQueryString(w)+"="+this.encodeQueryString(E))}),encodeURI(L.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),a=this.fromURLSearchParams(o.slice(1).join("?")),i=o[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(e){var r,o,a,i,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(M){console.warn("Could not decode search request query params, fallback on raw value",M)}let d=new URLSearchParams(e),f=d.get(ne.LOCALE)==="all"?void 0:d.get(ne.LOCALE),h=((r=d.get(ne.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),p=(o=d.get(ne.SORT))===null||o===void 0?void 0:o.toLowerCase(),g=(a=d.get(ne.SCOPE))!==null&&a!==void 0?a:"default",S=+((i=d.get(ne.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),C=d.get(ne.KEYWORD_MATCH),R=C?C.toUpperCase()===Fr.MANDATORY?Fr.MANDATORY:Fr.OPTIONAL:void 0,T={};for(let M of d.keys())f2(M)||(T[M]=d.get(M));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(ne.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[g])!==null&&c!==void 0?c:"DEFAULT",virtualField:Q1(h)?h:"EVERYWHERE",sortId:p,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:rr(1,isNaN(S)?this.defaultPerPage:S,1e3)},keywordMatch:R,otherQueryParams:T}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(ne.FILTERS)&&(d=this.parseValueFilters((r=e.get(ne.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(ne.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(ne.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(ne.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(ne.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(ne.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}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(d2).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:So[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,o,a]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(o,a);return e}unescapeFilterValue(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replace(a,r);return e}parseLegacyPeriodFilter(e){if(J1(e))return[{key:"ft:lastEdition",dateFilter:{type:So[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}};var lc={};X(lc,{toFtFormComponent:()=>cc});var sc=Symbol("elementInternals"),cc=Re(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[sc].form}constructor(...o){super(o),this[sc]=this.attachInternals()}setFormValue(o){this[sc].setFormValue(o)}}return e});var dc={};X(dc,{DateFormatter:()=>Hr});var Hr=class{static format(e,r,o,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(e,r,o,a,!!i)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a,i){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?d:a?`${c} ${d}`:c}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var uc={};X(uc,{ALL_KEYS_VALUE:()=>fc,SameWindowStorageEvent:()=>Eo});var fc="__all__",Eo=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==fc}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Eo(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Eo(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new Eo(fc))}});var hc={};X(hc,{FocusMainContentEvent:()=>pc});var pc=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var u2={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function vh(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function xh(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",vh);document.addEventListener("click",xh);var p2=I`
49
49
  .sr-only {
50
50
  position:absolute;
51
51
  left:-10000px;
@@ -681,7 +681,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
681
681
  <div class="ft-ripple--background"></div>
682
682
  <div class="ft-ripple--effect"></div>
683
683
  </div>
684
- `}contentAvailableCallback(e){super.contentAvailableCallback(e),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(e){var r,o;super.update(e),e.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(o=this.target)===null||o===void 0||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var e,r;let o=(e=this.shadowRoot)===null||e===void 0?void 0:e.host.parentElement;o&&this.setupFor((r=this.target)!==null&&r!==void 0?r:o)}forceFocusUpdate(){var e;!((e=this.target)===null||e===void 0)&&e.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(e){if(this.setupDebouncer.cancel(),this.target===e)return;this.onDisconnect&&this.onDisconnect(),this.target=e,e.setAttribute("data-is-ft-ripple-target","true");let r=(...c)=>d=>{c.forEach(f=>window.addEventListener(f,this.endPress,{once:!0})),this.startPress(d)},o=r("mouseup","contextmenu"),a=r("touchend","touchcancel"),i=c=>{["Enter"," "].includes(c.key)&&r("keyup")(c)},s={passive:!0};e.addEventListener("mouseover",this.startHover,s),e.addEventListener("mousemove",this.moveRipple,s),e.addEventListener("mouseleave",this.endHover,s),e.addEventListener("mousedown",o,s),e.addEventListener("touchstart",a,s),e.addEventListener("touchmove",this.moveRipple,s),e.addEventListener("keydown",i,s),e.addEventListener("focus",this.startFocus,s),e.addEventListener("blur",this.endFocus,s),e.addEventListener("focusin",this.startFocus,s),e.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{e.removeAttribute("data-is-ft-ripple-target"),e.removeEventListener("mouseover",this.startHover,s),e.removeEventListener("mousemove",this.moveRipple,s),e.removeEventListener("mouseleave",this.endHover,s),e.removeEventListener("mousedown",o,s),e.removeEventListener("touchstart",a,s),e.removeEventListener("touchmove",this.moveRipple,s),e.removeEventListener("keydown",i,s),e.removeEventListener("focus",this.startFocus,s),e.removeEventListener("blur",this.endFocus,s),e.removeEventListener("focusin",this.startFocus,s),e.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(e){let r=e,o=e,a,i;return r.x!=null?{x:a,y:i}=r:o.touches!=null&&(a=o.touches[0].clientX,i=o.touches[0].clientY),{x:a,y:i}}isFocusVisible(e){return e instanceof HTMLElement?e.matches(":focus-visible"):!0}isIgnored(e){if(this.disabled)return!0;if(e!=null)for(let r of e.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};ae.elementDefinitions={};ae.styles=P2;qe([v({type:Boolean})],ae.prototype,"primary",void 0);qe([v({type:Boolean})],ae.prototype,"secondary",void 0);qe([v({type:Boolean})],ae.prototype,"unbounded",void 0);qe([v({type:Boolean})],ae.prototype,"activated",void 0);qe([v({type:Boolean})],ae.prototype,"selected",void 0);qe([v({type:Boolean})],ae.prototype,"disabled",void 0);qe([q()],ae.prototype,"hovered",void 0);qe([q()],ae.prototype,"focused",void 0);qe([q()],ae.prototype,"pressed",void 0);qe([q()],ae.prototype,"rippling",void 0);qe([q()],ae.prototype,"originX",void 0);qe([q()],ae.prototype,"originY",void 0);qe([V(".ft-ripple")],ae.prototype,"ripple",void 0);qe([V(".ft-ripple--effect")],ae.prototype,"rippleEffect",void 0);Y("ft-ripple")(ae);var _h="ft-app-info",Kr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Kr.eventName="authentication-change";var Th={session:(t,e)=>{Ge(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>H.dispatchEvent(new Kr(e.payload)),0))}},H=ur.get({name:_h,reducers:Th,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Sa=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},FL=Re(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(H)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>Hr.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Sa([v({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Sa([v({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Sa([Gt({store:H.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),Sa([Gt({store:H.name})],e.prototype,"uiLocale",void 0),e});var qr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=H.getState(),a=e??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let a=H.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var Ca=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:qr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):qr.await()}};var Ze=class extends Ca{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Ot,this.cache=e?a.commonCache:new Ot}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var Ea=class extends Ze{async listMySearches(){let{session:e}=H.getState();return l2(e,Le.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Oa=class extends Ze{async listMyBookmarks(){let e=H.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var La=class extends Ze{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=H.getState().session;return!!e?.sessionAuthenticated}};var Aa=class extends Ze{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=H.getState().session;return!!e?.sessionAuthenticated}};var Nh="ft-user-assets",kh={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(ft).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:o,asset:a}=e.payload;Ac(t,r,[...Lc(t,r),a]),j2(t,r,1,o),K2(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;Ac(t,r,Lc(t,r).map(a=>a.id===o.id?o:a)),K2(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;Ac(t,r,Lc(t,r).filter(i=>i.id!==a)),j2(t,r,-1,o)}},q2={[ft.SEARCHES]:"savedSearches",[ft.BOOKMARKS]:"bookmarks",[ft.BOOKS]:void 0,[ft.COLLECTIONS]:void 0},Lc=(t,e)=>{var r;let o=q2[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},Ac=(t,e,r)=>{let o=q2[e];o&&(t[o]=r)},j2=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===ft.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},K2=(t,e)=>{let r=t.assetLabels.map(a=>a.title),o=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...o)},tt=ur.get({name:Nh,reducers:kh,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ft).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Rc=class{constructor(e=new La,r=new Aa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=H.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Oa,this.savedSearchesService=new Ea,H.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=H.getState();Ge((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(),tt.actions.clearAssetCount(),tt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),tt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),tt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();tt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();tt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&tt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&tt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(tt.getState().assetCounts.bookmarkByMap).length!==0;e===ft.BOOKMARKS&&r&&tt.actions.clearBookmarkCountByMap(),tt.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;tt.actions.bookmarks(r)}}},Mh=new Rc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Mh);var wc=class{addCommand(e,r=!1){H.commands.add(e,r)}consumeCommand(e){return H.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new wc;var Z2,Po=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Ph=Symbol("clearAfterUnitTest"),Ra=class extends Qn(Ze){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Z2]=()=>{this.defaultMessages={},this.cache=new Ot,this.listeners={}},this.currentUiLocale=H.getState().uiLocale,H.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=H.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 o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};Ge(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new fn((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof tr)&&r&&console.error(a)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Po({loadedContexts:e})),this.dispatchEvent(new Po({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Po({loadedContexts:[e]})),this.dispatchEvent(new Po({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Xn(0).then(()=>o()).catch(()=>null)))}};Z2=Ph;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ra{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ra{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Io=window.FluidTopicsI18nService,wa=window.FluidTopicsCustomI18nService;var _c=class{highlightHtml(e,r,o){Rs(e,r,o)}};window.FluidTopicsHighlightHtmlService=new _c;var Tc=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=H.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var o,a,i;if(e==null)return"";try{return Hr.format(e,(o=r?.locale)!==null&&o!==void 0?o:H.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}catch(s){throw console.error(`Date ${JSON.stringify(e)} is not valid`,s),s}}};window.FluidTopicsDateService=new Tc;var vn=class{static get(e,r){var o,a;let i=H.getState(),{lang:s,region:c}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Co(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Nc=class{urlToSearchRequest(e){return vn.get().parse(e)}searchRequestToUrl(e){return vn.get().serialize(e)}};window.FluidTopicsUrlService=new Nc;var Zr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Zr.eventName="change";var kc=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))}},Y2=new kc;var _a=class t extends Ut{static build(){return new t(window.history,Y2,()=>window.location,!1)}constructor(e,r,o,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Ge(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Zr(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,c])=>{let d=r(),f={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(a,[f,s,c]),this.setCurrentState(f,!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 o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Zr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Zr.eventName,e)}currentItem(){return _r(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 _r(this.states[this.previousDifferentMajorPosition()])}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 _r(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 o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}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 o;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=_a.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var X2=I`
684
+ `}contentAvailableCallback(e){super.contentAvailableCallback(e),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(e){var r,o;super.update(e),e.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(o=this.target)===null||o===void 0||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var e,r;let o=(e=this.shadowRoot)===null||e===void 0?void 0:e.host.parentElement;o&&this.setupFor((r=this.target)!==null&&r!==void 0?r:o)}forceFocusUpdate(){var e;!((e=this.target)===null||e===void 0)&&e.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(e){if(this.setupDebouncer.cancel(),this.target===e)return;this.onDisconnect&&this.onDisconnect(),this.target=e,e.setAttribute("data-is-ft-ripple-target","true");let r=(...c)=>d=>{c.forEach(f=>window.addEventListener(f,this.endPress,{once:!0})),this.startPress(d)},o=r("mouseup","contextmenu"),a=r("touchend","touchcancel"),i=c=>{["Enter"," "].includes(c.key)&&r("keyup")(c)},s={passive:!0};e.addEventListener("mouseover",this.startHover,s),e.addEventListener("mousemove",this.moveRipple,s),e.addEventListener("mouseleave",this.endHover,s),e.addEventListener("mousedown",o,s),e.addEventListener("touchstart",a,s),e.addEventListener("touchmove",this.moveRipple,s),e.addEventListener("keydown",i,s),e.addEventListener("focus",this.startFocus,s),e.addEventListener("blur",this.endFocus,s),e.addEventListener("focusin",this.startFocus,s),e.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{e.removeAttribute("data-is-ft-ripple-target"),e.removeEventListener("mouseover",this.startHover,s),e.removeEventListener("mousemove",this.moveRipple,s),e.removeEventListener("mouseleave",this.endHover,s),e.removeEventListener("mousedown",o,s),e.removeEventListener("touchstart",a,s),e.removeEventListener("touchmove",this.moveRipple,s),e.removeEventListener("keydown",i,s),e.removeEventListener("focus",this.startFocus,s),e.removeEventListener("blur",this.endFocus,s),e.removeEventListener("focusin",this.startFocus,s),e.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(e){let r=e,o=e,a,i;return r.x!=null?{x:a,y:i}=r:o.touches!=null&&(a=o.touches[0].clientX,i=o.touches[0].clientY),{x:a,y:i}}isFocusVisible(e){return e instanceof HTMLElement?e.matches(":focus-visible"):!0}isIgnored(e){if(this.disabled)return!0;if(e!=null)for(let r of e.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};ae.elementDefinitions={};ae.styles=P2;qe([v({type:Boolean})],ae.prototype,"primary",void 0);qe([v({type:Boolean})],ae.prototype,"secondary",void 0);qe([v({type:Boolean})],ae.prototype,"unbounded",void 0);qe([v({type:Boolean})],ae.prototype,"activated",void 0);qe([v({type:Boolean})],ae.prototype,"selected",void 0);qe([v({type:Boolean})],ae.prototype,"disabled",void 0);qe([q()],ae.prototype,"hovered",void 0);qe([q()],ae.prototype,"focused",void 0);qe([q()],ae.prototype,"pressed",void 0);qe([q()],ae.prototype,"rippling",void 0);qe([q()],ae.prototype,"originX",void 0);qe([q()],ae.prototype,"originY",void 0);qe([V(".ft-ripple")],ae.prototype,"ripple",void 0);qe([V(".ft-ripple--effect")],ae.prototype,"rippleEffect",void 0);Y("ft-ripple")(ae);var _h="ft-app-info",Kr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Kr.eventName="authentication-change";var Th={session:(t,e)=>{Ge(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>H.dispatchEvent(new Kr(e.payload)),0))}},H=ur.get({name:_h,reducers:Th,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Sa=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},FL=Re(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(H)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>Hr.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Sa([v({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Sa([v({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Sa([Gt({store:H.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),Sa([Gt({store:H.name})],e.prototype,"uiLocale",void 0),e});var qr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=H.getState(),a=e??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let a=H.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var Ca=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:qr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):qr.await()}};var Ze=class extends Ca{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Ot,this.cache=e?a.commonCache:new Ot}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var Ea=class extends Ze{async listMySearches(){let{session:e}=H.getState();return l2(e,Le.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Oa=class extends Ze{async listMyBookmarks(){let e=H.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var La=class extends Ze{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=H.getState().session;return!!e?.sessionAuthenticated}};var Aa=class extends Ze{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=H.getState().session;return!!e?.sessionAuthenticated}};var Nh="ft-user-assets",kh={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(ft).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:o,asset:a}=e.payload;Ac(t,r,[...Lc(t,r),a]),j2(t,r,1,o),K2(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;Ac(t,r,Lc(t,r).map(a=>a.id===o.id?o:a)),K2(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;Ac(t,r,Lc(t,r).filter(i=>i.id!==a)),j2(t,r,-1,o)}},q2={[ft.SEARCHES]:"savedSearches",[ft.BOOKMARKS]:"bookmarks",[ft.BOOKS]:void 0,[ft.COLLECTIONS]:void 0},Lc=(t,e)=>{var r;let o=q2[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},Ac=(t,e,r)=>{let o=q2[e];o&&(t[o]=r)},j2=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===ft.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},K2=(t,e)=>{let r=t.assetLabels.map(a=>a.title),o=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...o)},tt=ur.get({name:Nh,reducers:kh,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ft).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Rc=class{constructor(e=new La,r=new Aa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=H.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Oa,this.savedSearchesService=new Ea,H.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=H.getState();Ge((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(),tt.actions.clearAssetCount(),tt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),tt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),tt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();tt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();tt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&tt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&tt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(tt.getState().assetCounts.bookmarkByMap).length!==0;e===ft.BOOKMARKS&&r&&tt.actions.clearBookmarkCountByMap(),tt.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;tt.actions.bookmarks(r)}}},Mh=new Rc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Mh);var wc=class{addCommand(e,r=!1){H.commands.add(e,r)}consumeCommand(e){return H.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new wc;var Z2,Po=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Ph=Symbol("clearAfterUnitTest"),Ra=class extends Qn(Ze){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Z2]=()=>{this.defaultMessages={},this.cache=new Ot,this.listeners={}},this.currentUiLocale=H.getState().uiLocale,H.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=H.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 o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};Ge(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new fn((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof tr)&&r&&console.error(a)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Po({loadedContexts:e})),this.dispatchEvent(new Po({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Po({loadedContexts:[e]})),this.dispatchEvent(new Po({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Xn(0).then(()=>o()).catch(()=>null)))}};Z2=Ph;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ra{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ra{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Io=window.FluidTopicsI18nService,wa=window.FluidTopicsCustomI18nService;var _c=class{highlightHtml(e,r,o){Rs(e,r,o)}};window.FluidTopicsHighlightHtmlService=new _c;var Tc=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=H.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var o,a,i,s;if(e==null)return"";try{return Hr.format(e,(o=r?.locale)!==null&&o!==void 0?o:H.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(c){throw console.error(`Date ${JSON.stringify(e)} is not valid`,c),c}}};window.FluidTopicsDateService=new Tc;var vn=class{static get(e,r){var o,a;let i=H.getState(),{lang:s,region:c}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Co(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Nc=class{urlToSearchRequest(e){return vn.get().parse(e)}searchRequestToUrl(e){return vn.get().serialize(e)}};window.FluidTopicsUrlService=new Nc;var Zr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Zr.eventName="change";var kc=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))}},Y2=new kc;var _a=class t extends Ut{static build(){return new t(window.history,Y2,()=>window.location,!1)}constructor(e,r,o,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Ge(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Zr(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,c])=>{let d=r(),f={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(a,[f,s,c]),this.setCurrentState(f,!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 o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Zr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Zr.eventName,e)}currentItem(){return _r(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 _r(this.states[this.previousDifferentMajorPosition()])}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 _r(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 o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}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 o;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=_a.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var X2=I`
685
685
  `;function Q2(t,e){let{authenticationRequired:r,session:o}=H.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var we=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},de=class extends K{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>qr.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Ot,this.cleanSessionDebouncer=new ye,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return k`
686
686
  <slot></slot>
687
687
  `}connectedCallback(){super.connectedCallback(),H.addEventListener(Kr.eventName,this.reloadConfiguration)}disconnectedCallback(){H.addEventListener(Kr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,o,a,i,s,c,d;super.update(e),e.has("baseUrl")&&(H.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&H.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&H.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&H.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&H.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&H.actions.noCustom(this.noCustom),e.has("editorMode")&&H.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&H.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&H.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(f=>Io.addContext(f)),e.has("openExternalDocumentInNewTab")&&H.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&H.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&H.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(H.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),H.actions.availableUiLocales((a=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&a!==void 0?a:[]),H.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&H.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&H.actions.availableContentLocales((d=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&d!==void 0?d:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Q2(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};de.elementDefinitions={};de.styles=X2;we([v()],de.prototype,"baseUrl",void 0);we([v()],de.prototype,"apiIntegrationIdentifier",void 0);we([v()],de.prototype,"apiIntegrationAppVersion",void 0);we([v()],de.prototype,"uiLocale",void 0);we([Pe(null)],de.prototype,"availableUiLocales",void 0);we([Pe(null)],de.prototype,"metadataConfiguration",void 0);we([v({type:Boolean})],de.prototype,"editorMode",void 0);we([v({type:Boolean})],de.prototype,"noCustom",void 0);we([v({type:Boolean})],de.prototype,"openExternalDocumentInNewTab",void 0);we([v({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],de.prototype,"noCustomComponent",void 0);we([v({type:Boolean})],de.prototype,"withManualResources",void 0);we([v({type:Boolean})],de.prototype,"navigatorOnline",void 0);we([v({type:Boolean})],de.prototype,"forcedOffline",void 0);we([v({type:Object})],de.prototype,"apiProvider",void 0);we([v({type:Boolean})],de.prototype,"authenticationRequired",void 0);we([Pe([])],de.prototype,"messageContexts",void 0);we([Pe(void 0)],de.prototype,"session",void 0);we([q()],de.prototype,"localesConfiguration",void 0);we([q()],de.prototype,"availableContentLocales",void 0);Y("ft-app-context")(de);var Mc=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,o]=e.split(".");return{context:r,key:o,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},zo=new Mc;var Ih=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},Sn=Symbol("i18nAttributes"),J2=Symbol("i18nListAttributes"),e0=Symbol("i18nProperties"),Ta=Symbol("i18nContexts"),xn=Symbol("i18nUnsubs"),Do=Re(Symbol("withI18n"),function(t){var e,r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?wa:Io}i18n(i){let{context:s,key:c,message:d}=i,{custom:f,args:h,argsProvider:p}=i;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,f);let g=h??(p?p(this):[]);return this.getI18nService(f).resolveMessage(s,c,...g)}return d}async awaitI18n(i){let{context:s,custom:c}=i;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(i)}customI18n(i,s){if(zo.isI18nKey(i)){let[c,d]=i.split(".");return this.i18n({custom:!0,context:c,key:d,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,c,d)=>i.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,c,d)=>{var f;return((f=d?.context)===null||f===void 0?void 0:f.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,c;let d=this,f=(h,p,g)=>g?.context&&g.key&&i(h,p,g)?{...g,message:this.i18n({context:g.context,key:g.key,custom:g.custom,...h})}:g;(s=this[Sn])===null||s===void 0||s.forEach((h,p)=>d[p]=f(h,p,d[p])),(c=this[J2])===null||c===void 0||c.forEach((h,p)=>{var g;return d[p]=(g=d[p])===null||g===void 0?void 0:g.map(S=>f(h,p,S))})}updateI18nProperties(i){var s;(s=this[e0])===null||s===void 0||s.forEach((c,d)=>{i(c,d)&&(this[d]=this.i18n(c))})}addI18nMessages(i,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,c)}addI18nContext(i,s,c){let d=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[Ta].set(d,{isCustomContext:c}),this[xn].has(d)||this[xn].set(d,this.getI18nService(c).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(c).prepareContext(d,s)}hasI18nContext(i){return this[Ta].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ta].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[xn].forEach(i=>i()),this[xn].clear()}}return e=Ta,r=xn,Ih([v({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),Na=class extends Do(K){},ka=class extends Do($r){};var Pc=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?zo.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},zh=new Pc;var t0=(t,e)=>(r,o)=>{var a;r.constructor.createProperty(o,{type:Object,hasChanged:Xe,converter:zo,...e}),r[Sn]=(a=r[Sn])!==null&&a!==void 0?a:new Map,r[Sn].set(o,t??{})};var Ma=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?wa:Io}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(o,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(o,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(o,a)=>()=>a}),this.attributes=new Proxy({},{get:(o,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var r0=I`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-locale-selector",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "Search locale selector for integrated fluid-topics search pages",
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.0.11",
23
- "@fluid-topics/ft-i18n": "2.0.11",
24
- "@fluid-topics/ft-icon": "2.0.11",
25
- "@fluid-topics/ft-search-context": "2.0.11",
26
- "@fluid-topics/ft-tooltip": "2.0.11",
27
- "@fluid-topics/ft-wc-utils": "2.0.11",
22
+ "@fluid-topics/ft-filter": "2.0.12",
23
+ "@fluid-topics/ft-i18n": "2.0.12",
24
+ "@fluid-topics/ft-icon": "2.0.12",
25
+ "@fluid-topics/ft-search-context": "2.0.12",
26
+ "@fluid-topics/ft-tooltip": "2.0.12",
27
+ "@fluid-topics/ft-wc-utils": "2.0.12",
28
28
  "lit": "3.1.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@fluid-topics/public-api": "1.0.117"
32
32
  },
33
- "gitHead": "aedc97fb65c7bafd16b7adef8218a58f59fea690"
33
+ "gitHead": "4811b3ed72672d41022c271d4a0d1db15b458aca"
34
34
  }