@fluid-topics/ftds-tabs 2.1.5 → 2.1.6

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.
@@ -1026,7 +1026,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
1026
1026
  position: relative;
1027
1027
  word-break: break-word;
1028
1028
  }
1029
- `;var ll=["top","right","bottom","left"],cl=["start","end"],Zn=ll.reduce((e,t)=>e.concat(t,t+"-"+cl[0],t+"-"+cl[1]),[]),Rr=Math.min,Je=Math.max,wr=Math.round;var Ce=e=>({x:e,y:e}),Cu={left:"right",right:"left",bottom:"top",top:"bottom"};function qn(e,t,o){return Je(e,Rr(t,o))}function uo(e,t){return typeof e=="function"?e(t):e}function Xt(e){return e.split("-")[0]}function et(e){return e.split("-")[1]}function Yn(e){return e==="x"?"y":"x"}function Xn(e){return e==="y"?"height":"width"}function fo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Qn(e){return Yn(fo(e))}function dl(e,t,o){o===void 0&&(o=!1);let n=et(e),a=Qn(e),i=Xn(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Kn(s)),[s,Kn(s)]}function ul(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Kn(e){let t=Xt(e);return Cu[t]+e.slice(t.length)}function Eu(e){return{top:0,right:0,bottom:0,left:0,...e}}function fl(e){return typeof e!="number"?Eu(e):{top:e,right:e,bottom:e,left:e}}function mt(e){let{x:t,y:o,width:n,height:a}=e;return{width:n,height:a,top:o,left:t,right:t+n,bottom:o+a,x:t,y:o}}function pl(e,t,o){let{reference:n,floating:a}=e,i=fo(t),s=Qn(t),l=Xn(s),u=Xt(t),p=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,b;switch(u){case"top":b={x:m,y:n.y-a.height};break;case"bottom":b={x:m,y:n.y+n.height};break;case"right":b={x:n.x+n.width,y:g};break;case"left":b={x:n.x-a.width,y:g};break;default:b={x:n.x,y:n.y}}switch(et(t)){case"start":b[s]-=y*(o&&p?-1:1);break;case"end":b[s]+=y*(o&&p?-1:1);break}return b}async function hl(e,t){var o;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:b=0}=uo(t,e),v=fl(b),E=l[y?g==="floating"?"reference":"floating":g],C=mt(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(E)))==null||o?E:E.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:m,strategy:u})),O=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),N=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},I=mt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:O,offsetParent:w,strategy:u}):O);return{top:(C.top-I.top+v.top)/N.y,bottom:(I.bottom-C.bottom+v.bottom)/N.y,left:(C.left-I.left+v.left)/N.x,right:(I.right-C.right+v.right)/N.x}}var Au=50,ml=async(e,t,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,l=s.detectOverflow?s:{...s,detectOverflow:hl},u=await(s.isRTL==null?void 0:s.isRTL(t)),p=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=pl(p,n,u),y=n,b=0,v={};for(let x=0;x<i.length;x++){let E=i[x];if(!E)continue;let{name:C,fn:O}=E,{x:w,y:N,data:I,reset:D}=await O({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:v,rects:p,platform:l,elements:{reference:e,floating:t}});m=w??m,g=N??g,v[C]={...v[C],...I},D&&b<Au&&(b++,typeof D=="object"&&(D.placement&&(y=D.placement),D.rects&&(p=D.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):D.rects),{x:m,y:g}=pl(p,y,u)),x=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:v}};function Lu(e,t,o){return(e?[...o.filter(a=>et(a)===e),...o.filter(a=>et(a)!==e)]:o.filter(a=>Xt(a)===a)).filter(a=>e?et(a)===e||(t?ul(a)!==a:!1):!0)}var gl=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:p}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Zn,autoAlignment:b=!0,...v}=uo(e,t),x=g!==void 0||y===Zn?Lu(g||null,b,y):y,E=await u.detectOverflow(t,v),C=((o=s.autoPlacement)==null?void 0:o.index)||0,O=x[C];if(O==null)return{};let w=dl(O,i,await(u.isRTL==null?void 0:u.isRTL(p.floating)));if(l!==O)return{reset:{placement:x[0]}};let N=[E[Xt(O)],E[w[0]],E[w[1]]],I=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:O,overflows:N}],D=x[C+1];if(D)return{data:{index:C+1,overflows:I},reset:{placement:D}};let Oe=I.map(re=>{let ce=et(re.placement);return[re.placement,ce&&m?re.overflows.slice(0,2).reduce((oe,ct)=>oe+ct,0):re.overflows[0],re.overflows]}).sort((re,ce)=>re[1]-ce[1]),Re=((a=Oe.filter(re=>re[2].slice(0,et(re[0])?2:3).every(ce=>ce<=0))[0])==null?void 0:a[0])||Oe[0][0];return Re!==l?{data:{index:C+1,overflows:I},reset:{placement:Re}}:{}}}};var yl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:C=>{let{x:O,y:w}=C;return{x:O,y:w}}},...p}=uo(e,t),m={x:o,y:n},g=await i.detectOverflow(t,p),y=fo(Xt(a)),b=Yn(y),v=m[b],x=m[y];if(s){let C=b==="y"?"top":"left",O=b==="y"?"bottom":"right",w=v+g[C],N=v-g[O];v=qn(w,v,N)}if(l){let C=y==="y"?"top":"left",O=y==="y"?"bottom":"right",w=x+g[C],N=x-g[O];x=qn(w,x,N)}let E=u.fn({...t,[b]:v,[y]:x});return{...E,data:{x:E.x-o,y:E.y-n,enabled:{[b]:s,[y]:l}}}}}};function ho(){return typeof window<"u"}function yt(e){return vl(e)?(e.nodeName||"").toLowerCase():"#document"}function J(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _e(e){var t;return(t=(vl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vl(e){return ho()?e instanceof Node||e instanceof J(e).Node:!1}function ue(e){return ho()?e instanceof Element||e instanceof J(e).Element:!1}function Ne(e){return ho()?e instanceof HTMLElement||e instanceof J(e).HTMLElement:!1}function bl(e){return!ho()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof J(e).ShadowRoot}function Qt(e){let{overflow:t,overflowX:o,overflowY:n,display:a}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&a!=="inline"&&a!=="contents"}function xl(e){return/^(table|td|th)$/.test(yt(e))}function _r(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Ou=/transform|translate|scale|rotate|perspective|filter/,Ru=/paint|layout|strict|content/,gt=e=>!!e&&e!=="none",Jn;function Jt(e){let t=ue(e)?fe(e):e;return gt(t.transform)||gt(t.translate)||gt(t.scale)||gt(t.rotate)||gt(t.perspective)||!mo()&&(gt(t.backdropFilter)||gt(t.filter))||Ou.test(t.willChange||"")||Ru.test(t.contain||"")}function Sl(e){let t=He(e);for(;Ne(t)&&!bt(t);){if(Jt(t))return t;if(_r(t))return null;t=He(t)}return null}function mo(){return Jn==null&&(Jn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jn}function bt(e){return/^(html|body|#document)$/.test(yt(e))}function fe(e){return J(e).getComputedStyle(e)}function Nr(e){return ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function He(e){if(yt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||bl(e)&&e.host||_e(e);return bl(t)?t.host:t}function Cl(e){let t=He(e);return bt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ne(t)&&Qt(t)?t:Cl(t)}function po(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=Cl(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=J(a);if(i){let l=go(s);return t.concat(s,s.visualViewport||[],Qt(a)?a:[],l&&o?po(l):[])}else return t.concat(a,po(a,[],o))}function go(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ol(e){let t=fe(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Ne(e),i=a?e.offsetWidth:o,s=a?e.offsetHeight:n,l=wr(o)!==i||wr(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function Rl(e){return ue(e)?e:e.contextElement}function er(e){let t=Rl(e);if(!Ne(t))return Ce(1);let o=t.getBoundingClientRect(),{width:n,height:a,$:i}=Ol(t),s=(i?wr(o.width):o.width)/n,l=(i?wr(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var wu=Ce(0);function wl(e){let t=J(e);return!mo()||!t.visualViewport?wu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _u(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==J(e)?!1:t}function Mr(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),i=Rl(e),s=Ce(1);t&&(n?ue(n)&&(s=er(n)):s=er(e));let l=_u(i,o,n)?wl(i):Ce(0),u=(a.left+l.x)/s.x,p=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=J(i),b=n&&ue(n)?J(n):n,v=y,x=go(v);for(;x&&n&&b!==v;){let E=er(x),C=x.getBoundingClientRect(),O=fe(x),w=C.left+(x.clientLeft+parseFloat(O.paddingLeft))*E.x,N=C.top+(x.clientTop+parseFloat(O.paddingTop))*E.y;u*=E.x,p*=E.y,m*=E.x,g*=E.y,u+=w,p+=N,v=J(x),x=go(v)}}return mt({width:m,height:g,x:u,y:p})}function yo(e,t){let o=Nr(e).scrollLeft;return t?t.left+o:Mr(_e(e)).left+o}function _l(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-yo(e,o),a=o.top+t.scrollTop;return{x:n,y:a}}function Nu(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e,i=a==="fixed",s=_e(n),l=t?_r(t.floating):!1;if(n===s||l&&i)return o;let u={scrollLeft:0,scrollTop:0},p=Ce(1),m=Ce(0),g=Ne(n);if((g||!g&&!i)&&((yt(n)!=="body"||Qt(s))&&(u=Nr(n)),g)){let b=Mr(n);p=er(n),m.x=b.x+n.clientLeft,m.y=b.y+n.clientTop}let y=s&&!g&&!i?_l(s,u):Ce(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-u.scrollLeft*p.x+m.x+y.x,y:o.y*p.y-u.scrollTop*p.y+m.y+y.y}}function Mu(e){return Array.from(e.getClientRects())}function ku(e){let t=_e(e),o=Nr(e),n=e.ownerDocument.body,a=Je(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Je(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+yo(e),l=-o.scrollTop;return fe(n).direction==="rtl"&&(s+=Je(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var El=25;function zu(e,t){let o=J(e),n=_e(e),a=o.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let m=mo();(!m||m&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let p=yo(n);if(p<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),b=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,v=Math.abs(n.clientWidth-g.clientWidth-b);v<=El&&(i-=v)}else p<=El&&(i+=p);return{width:i,height:s,x:l,y:u}}function Tu(e,t){let o=Mr(e,!0,t==="fixed"),n=o.top+e.clientTop,a=o.left+e.clientLeft,i=Ne(e)?er(e):Ce(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,u=a*i.x,p=n*i.y;return{width:s,height:l,x:u,y:p}}function Al(e,t,o){let n;if(t==="viewport")n=zu(e,o);else if(t==="document")n=ku(_e(e));else if(ue(t))n=Tu(t,o);else{let a=wl(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return mt(n)}function Nl(e,t){let o=He(e);return o===t||!ue(o)||bt(o)?!1:fe(o).position==="fixed"||Nl(o,t)}function Iu(e,t){let o=t.get(e);if(o)return o;let n=po(e,[],!1).filter(l=>ue(l)&&yt(l)!=="body"),a=null,i=fe(e).position==="fixed",s=i?He(e):e;for(;ue(s)&&!bt(s);){let l=fe(s),u=Jt(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Qt(s)&&!u&&Nl(e,s))?n=n.filter(m=>m!==s):a=l,s=He(s)}return t.set(e,n),n}function Pu(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e,s=[...o==="clippingAncestors"?_r(t)?[]:Iu(t,this._c):[].concat(o),n],l=Al(t,s[0],a),u=l.top,p=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let b=Al(t,s[y],a);u=Je(b.top,u),p=Rr(b.right,p),m=Rr(b.bottom,m),g=Je(b.left,g)}return{width:p-g,height:m-u,x:g,y:u}}function Du(e){let{width:t,height:o}=Ol(e);return{width:t,height:o}}function Uu(e,t,o){let n=Ne(t),a=_e(t),i=o==="fixed",s=Mr(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=Ce(0);function p(){u.x=yo(a)}if(n||!n&&!i)if((yt(t)!=="body"||Qt(a))&&(l=Nr(t)),n){let b=Mr(t,!0,i,t);u.x=b.x+t.clientLeft,u.y=b.y+t.clientTop}else a&&p();i&&!n&&a&&p();let m=a&&!n&&!i?_l(a,l):Ce(0),g=s.left+l.scrollLeft-u.x-m.x,y=s.top+l.scrollTop-u.y-m.y;return{x:g,y,width:s.width,height:s.height}}function ea(e){return fe(e).position==="static"}function Ll(e,t){if(!Ne(e)||fe(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return _e(e)===o&&(o=o.ownerDocument.body),o}function Ml(e,t){let o=J(e);if(_r(e))return o;if(!Ne(e)){let a=He(e);for(;a&&!bt(a);){if(ue(a)&&!ea(a))return a;a=He(a)}return o}let n=Ll(e,t);for(;n&&xl(n)&&ea(n);)n=Ll(n,t);return n&&bt(n)&&ea(n)&&!Jt(n)?o:n||Sl(e)||o}var Bu=async function(e){let t=this.getOffsetParent||Ml,o=this.getDimensions,n=await o(e.floating);return{reference:Uu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Gu(e){return fe(e).direction==="rtl"}var bo={convertOffsetParentRelativeRectToViewportRelativeRect:Nu,getDocumentElement:_e,getClippingRect:Pu,getOffsetParent:Ml,getElementRects:Bu,getClientRects:Mu,getDimensions:Du,getScale:er,isElement:ue,isRTL:Gu};var kl=gl,zl=yl;var Tl=(e,t,o)=>{let n=new Map,a={platform:bo,...o},i={...a.platform,_c:n};return ml(e,t,{...a,platform:i})};function Il(e){return Fu(e)}function ta(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Fu(e){for(let t=e;t;t=ta(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=ta(e);t;t=ta(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||Jt(o)||t.tagName==="BODY"))return t}return null}async function Pl(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},Tl(e,t,{strategy:n.strategy,platform:{...bo,getOffsetParent:a=>bo.getOffsetParent(a,Il)},middleware:[zl({crossAxis:!0}),kl({allowedPlacements:[n.placement]})]})}var fr=L(T());var Ra=L(Y());var Dl=L(Y(),1);var ra=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function Ul(e,t){return(0,Dl.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return kr(e);try{return JSON.parse(o)}catch{return kr(e)}},toAttribute:o=>JSON.stringify(o)},hasChanged:zr,...t??{}})}function Hu(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!vo(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(!vo(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 a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(o=i.length,o!==a(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!vo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function vo(e,t){try{return Hu(e,t)}catch{return!1}}function zr(e,t){return!vo(e,t)}function kr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function xo(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var Bl=L(Y(),1);var oa=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:zr,attribute:!1,...t};(0,Bl.property)(i)(o,n);let s=o.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 So=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var vt=L(Y(),1);var Co=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>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 Fl=L(W(),1);var Eo=globalThis,$u=Eo.ShadowRoot&&(Eo.ShadyCSS===void 0||Eo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Gl=(e,t)=>{if($u)e.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),a=Eo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Ao=class extends Fl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Gl(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){ra(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function Hl(e,t,...o){var n;let a=e.querySelector(t);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var rr=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Vl,$l=Symbol("constructorPrototype"),Wl=Symbol("constructorName"),Kl=Symbol("exportpartsDebouncer"),jl=Symbol("dynamicDependenciesLoaded"),tr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};tr.eventName="exportparts-updated";var Me=class extends Ao{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Vl]=new Co(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Kl].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[Wl]=this.constructor.name,this[$l]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Wl]&&Object.setPrototypeOf(this,this[$l])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[jl]||(o[jl]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(tr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(tr.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 tr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=Hl(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.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 o,n,a,i,s,l;let u=y=>y!=null&&y.trim().length>0,p=t.filter(u).map(y=>y.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let b=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],v=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(E=>E.split(":")[1]))!==null&&l!==void 0?l:[],x=[...b,...v].filter(u).map(E=>E.trim());for(let E of x)m.add(E)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>p.map(b=>`${y}:${b}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};Vl=Kl;rr([(0,vt.property)()],Me.prototype,"exportpartsPrefix",void 0);rr([Ul([])],Me.prototype,"exportpartsPrefixes",void 0);rr([(0,vt.property)({reflect:!0})],Me.prototype,"exportparts",void 0);rr([(0,vt.property)()],Me.prototype,"customStylesheet",void 0);rr([(0,vt.property)()],Me.prototype,"elementToFocus",void 0);rr([(0,vt.state)()],Me.prototype,"useAdoptedStyleSheets",void 0);function Lo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Tr=Symbol("internalReduxEventsUnsubscribers"),tt=Symbol("internalStoresUnsubscribers"),xt=Symbol("internalStores"),Wu=xo(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[xt].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[xt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[xt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[xt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[tt].has(s.store):this[tt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var u;this[tt].set(s,l.subscribe(()=>this.updateFromStores())),this[Tr].set(s,[]),Lo(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=y=>this[m](y);l.addEventListener(p.eventName,g),this[Tr].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[tt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[tt].has(s)&&this[tt].get(s)(),this[tt].delete(s),(l=this[Tr].get(s))===null||l===void 0||l.forEach(u=>u()),this[Tr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=tt,o=xt,n=Tr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Zl=class extends Wu(Me){};function pe(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function $e(e){return!!e&&!!e[U]}function Ee(e){var t;return!!e&&((function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Qu})(e)||Array.isArray(e)||!!e[t2]||!!(!((t=e.constructor)===null||t===void 0)&&t[t2])||fa(e)||pa(e))}function St(e,t,o){o===void 0&&(o=!1),ar(e)===0?(o?Object.keys:nr)(e).forEach((function(n){o&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,a){return t(a,n,e)}))}function ar(e){var t=e[U];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:fa(e)?2:pa(e)?3:0}function or(e,t){return ar(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ju(e,t){return ar(e)===2?e.get(t):e[t]}function r2(e,t,o){var n=ar(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function o2(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function fa(e){return Yu&&e instanceof Map}function pa(e){return Xu&&e instanceof Set}function rt(e){return e.o||e.t}function ha(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=i2(e);delete t[U];for(var o=nr(t),n=0;n<o.length;n++){var a=o[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 ma(e,t){return t===void 0&&(t=!1),ga(e)||$e(e)||!Ee(e)||(ar(e)>1&&(e.set=e.add=e.clear=e.delete=Vu),Object.freeze(e),t&&St(e,(function(o,n){return ma(n,!0)}),!0)),e}function Vu(){pe(2)}function ga(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ke(e){var t=ua[e];return t||pe(18,e),t}function Ku(e,t){ua[e]||(ua[e]=t)}function ca(){return Pr}function na(e,t){t&&(ke("Patches"),e.u=[],e.s=[],e.v=t)}function Oo(e){la(e),e.p.forEach(Zu),e.p=null}function la(e){e===Pr&&(Pr=e.l)}function ql(e){return Pr={p:[],l:Pr,h:e,m:!0,_:0}}function Zu(e){var t=e[U];t.i===0||t.i===1?t.j():t.g=!0}function aa(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||ke("ES5").S(t,e,n),n?(o[U].P&&(Oo(t),pe(4)),Ee(e)&&(e=Ro(t,e),t.l||wo(t,e)),t.u&&ke("Patches").M(o[U].t,e,t.u,t.s)):e=Ro(t,o,[]),Oo(t),t.u&&t.v(t.u,t.s),e!==a2?e:void 0}function Ro(e,t,o){if(ga(t))return t;var n=t[U];if(!n)return St(t,(function(l,u){return Yl(e,n,t,l,u,o)}),!0),t;if(n.A!==e)return t;if(!n.P)return wo(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=ha(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),St(i,(function(l,u){return Yl(e,n,a,l,u,o,s)})),wo(e,a,!1),o&&e.u&&ke("Patches").N(n,o,e.u,e.s)}return n.o}function Yl(e,t,o,n,a,i,s){if($e(a)){var l=Ro(e,a,i&&t&&t.i!==3&&!or(t.R,n)?i.concat(n):void 0);if(r2(o,n,l),!$e(l))return;e.m=!1}else s&&o.add(a);if(Ee(a)&&!ga(a)){if(!e.h.D&&e._<1)return;Ro(e,a),t&&t.A.l||wo(e,a)}}function wo(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&ma(t,o)}function ia(e,t){var o=e[U];return(o?rt(o):e)[t]}function Xl(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ot(e){e.P||(e.P=!0,e.l&&ot(e.l))}function sa(e){e.o||(e.o=ha(e.t))}function da(e,t,o){var n=fa(t)?ke("MapSet").F(t,o):pa(t)?ke("MapSet").T(t,o):e.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:ca(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=Dr;s&&(u=[l],p=Ir);var m=Proxy.revocable(u,p),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y})(t,o):ke("ES5").J(t,o);return(o?o.A:ca()).p.push(n),n}function qu(e){return $e(e)||pe(22,e),(function t(o){if(!Ee(o))return o;var n,a=o[U],i=ar(o);if(a){if(!a.P&&(a.i<4||!ke("ES5").K(a)))return a.t;a.I=!0,n=Ql(o,i),a.I=!1}else n=Ql(o,i);return St(n,(function(s,l){a&&ju(a.t,s)===l||r2(n,s,t(l))})),i===3?new Set(n):n})(e)}function Ql(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ha(e)}function n2(){function e(s,l){var u=i[s];return u?u.enumerable=l:i[s]=u={configurable:!0,enumerable:l,get:function(){var p=this[U];return Dr.get(p,s)},set:function(p){var m=this[U];Dr.set(m,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][U];if(!u.P)switch(u.i){case 5:n(u)&&ot(u);break;case 4:o(u)&&ot(u)}}}function o(s){for(var l=s.t,u=s.k,p=nr(u),m=p.length-1;m>=0;m--){var g=p[m];if(g!==U){var y=l[g];if(y===void 0&&!or(l,g))return!0;var b=u[g],v=b&&b[U];if(v?v.t!==y:!o2(b,y))return!0}}var x=!!l[U];return p.length!==nr(l).length+(x?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&pe(3,JSON.stringify(rt(s)))}var i={};Ku("ES5",{J:function(s,l){var u=Array.isArray(s),p=(function(g,y){if(g){for(var b=Array(y.length),v=0;v<y.length;v++)Object.defineProperty(b,""+v,e(v,!0));return b}var x=i2(y);delete x[U];for(var E=nr(x),C=0;C<E.length;C++){var O=E[C];x[O]=e(O,g||!!x[O].enumerable)}return Object.create(Object.getPrototypeOf(y),x)})(u,s),m={i:u?5:4,A:l?l.A:ca(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,U,{value:m,writable:!0}),p},S:function(s,l,u){u?$e(l)&&l[U].A===s&&t(s.p):(s.u&&(function p(m){if(m&&typeof m=="object"){var g=m[U];if(g){var y=g.t,b=g.k,v=g.R,x=g.i;if(x===4)St(b,(function(N){N!==U&&(y[N]!==void 0||or(y,N)?v[N]||p(b[N]):(v[N]=!0,ot(g)))})),St(y,(function(N){b[N]!==void 0||or(b,N)||(v[N]=!1,ot(g))}));else if(x===5){if(n(g)&&(ot(g),v.length=!0),b.length<y.length)for(var E=b.length;E<y.length;E++)v[E]=!1;else for(var C=y.length;C<b.length;C++)v[C]=!0;for(var O=Math.min(b.length,y.length),w=0;w<O;w++)b.hasOwnProperty(w)||(v[w]=!0),v[w]===void 0&&p(b[w])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Jl,Pr,ya=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Yu=typeof Map<"u",Xu=typeof Set<"u",e2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",a2=ya?Symbol.for("immer-nothing"):((Jl={})["immer-nothing"]=!0,Jl),t2=ya?Symbol.for("immer-draftable"):"__$immer_draftable",U=ya?Symbol.for("immer-state"):"__$immer_state";var Qu=""+Object.prototype.constructor,nr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,i2=Object.getOwnPropertyDescriptors||function(e){var t={};return nr(e).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)})),t},ua={},Dr={get:function(e,t){if(t===U)return e;var o=rt(e);if(!or(o,t))return(function(a,i,s){var l,u=Xl(i,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0})(e,o,t);var n=o[t];return e.I||!Ee(n)?n:n===ia(e.t,t)?(sa(e),e.o[t]=da(e.A.h,n,e)):n},has:function(e,t){return t in rt(e)},ownKeys:function(e){return Reflect.ownKeys(rt(e))},set:function(e,t,o){var n=Xl(rt(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=ia(rt(e),t),i=a?.[U];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(o2(o,a)&&(o!==void 0||or(e.t,t)))return!0;sa(e),ot(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return ia(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,sa(e),ot(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=rt(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){pe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){pe(12)}},Ir={};St(Dr,(function(e,t){Ir[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ir.deleteProperty=function(e,t){return Ir.set.call(this,e,t,void 0)},Ir.set=function(e,t,o){return Dr.set.call(this,e[0],t,o,e[0])};var Ju=(function(){function e(o){var n=this;this.O=e2,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=n;return function(x){var E=this;x===void 0&&(x=l);for(var C=arguments.length,O=Array(C>1?C-1:0),w=1;w<C;w++)O[w-1]=arguments[w];return u.produce(x,(function(N){var I;return(I=i).call.apply(I,[E,N].concat(O))}))}}var p;if(typeof i!="function"&&pe(6),s!==void 0&&typeof s!="function"&&pe(7),Ee(a)){var m=ql(n),g=da(n,a,void 0),y=!0;try{p=i(g),y=!1}finally{y?Oo(m):la(m)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(x){return na(m,s),aa(x,m)}),(function(x){throw Oo(m),x})):(na(m,s),aa(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===a2&&(p=void 0),n.D&&ma(p,!0),s){var b=[],v=[];ke("Patches").M(a,p,b,v),s(b,v)}return p}pe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){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(p,(function(b){return a.apply(void 0,[b].concat(g))}))};var s,l,u=n.produce(a,i,(function(p,m){s=p,l=m}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(p){return[p,s,l]})):[u,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){Ee(o)||pe(8),$e(o)&&(o=qu(o));var n=ql(this),a=da(this,o,void 0);return a[U].C=!0,la(n),a},t.finishDraft=function(o,n){var a=o&&o[U],i=a.A;return na(i,n),aa(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!e2&&pe(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var s=ke("Patches").$;return $e(o)?s(o,n):this.produce(o,(function(l){return s(l,n)}))},e})(),ae=new Ju,ef=ae.produce,Bh=ae.produceWithPatches.bind(ae),Gh=ae.setAutoFreeze.bind(ae),Fh=ae.setUseProxies.bind(ae),Hh=ae.applyPatches.bind(ae),$h=ae.createDraft.bind(ae),Wh=ae.finishDraft.bind(ae),_o=ef;function Ct(e){"@babel/helpers - typeof";return Ct=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},Ct(e)}function s2(e,t){if(Ct(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(Ct(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function c2(e){var t=s2(e,"string");return Ct(t)=="symbol"?t:t+""}function l2(e,t,o){return(t=c2(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function d2(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function ba(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?d2(Object(o),!0).forEach(function(n){l2(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):d2(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function Z(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 u2=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),va=function(){return Math.random().toString(36).substring(7).split("").join(".")},No={INIT:"@@redux/INIT"+va(),REPLACE:"@@redux/REPLACE"+va(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+va()}};function tf(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 xa(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Z(1));return o(xa)(e,t)}if(typeof e!="function")throw new Error(Z(2));var a=e,i=t,s=[],l=s,u=!1;function p(){l===s&&(l=s.slice())}function m(){if(u)throw new Error(Z(3));return i}function g(x){if(typeof x!="function")throw new Error(Z(4));if(u)throw new Error(Z(5));var E=!0;return p(),l.push(x),function(){if(E){if(u)throw new Error(Z(6));E=!1,p();var O=l.indexOf(x);l.splice(O,1),s=null}}}function y(x){if(!tf(x))throw new Error(Z(7));if(typeof x.type>"u")throw new Error(Z(8));if(u)throw new Error(Z(9));try{u=!0,i=a(i,x)}finally{u=!1}for(var E=s=l,C=0;C<E.length;C++){var O=E[C];O()}return x}function b(x){if(typeof x!="function")throw new Error(Z(10));a=x,y({type:No.REPLACE})}function v(){var x,E=g;return x={subscribe:function(O){if(typeof O!="object"||O===null)throw new Error(Z(11));function w(){O.next&&O.next(m())}w();var N=E(w);return{unsubscribe:N}}},x[u2]=function(){return this},x}return y({type:No.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:b},n[u2]=v,n}function rf(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:No.INIT});if(typeof n>"u")throw new Error(Z(12));if(typeof o(void 0,{type:No.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Z(13))})}function f2(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(o[a]=e[a])}var i=Object.keys(o),s,l;try{rf(o)}catch(u){l=u}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var y=!1,b={},v=0;v<i.length;v++){var x=i[v],E=o[x],C=p[x],O=E(C,m);if(typeof O>"u"){var w=m&&m.type;throw new Error(Z(14))}b[x]=O,y=y||O!==C}return y=y||i.length!==Object.keys(p).length,y?b:p}}function ir(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];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 p2(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Z(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return i=ir.apply(void 0,l)(a.dispatch),ba(ba({},a),{},{dispatch:i})}}}function h2(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 m2=h2();m2.withExtraArgument=h2;var Sa=m2;var x2=(function(){var e=function(t,o){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,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}})(),of=function(e,t){var o={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(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(m){p=[6,m],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},sr=function(e,t){for(var o=0,n=t.length,a=e.length;o<n;o++,a++)e[a]=t[o];return e},nf=Object.defineProperty,af=Object.defineProperties,sf=Object.getOwnPropertyDescriptors,g2=Object.getOwnPropertySymbols,cf=Object.prototype.hasOwnProperty,lf=Object.prototype.propertyIsEnumerable,y2=function(e,t,o){return t in e?nf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},nt=function(e,t){for(var o in t||(t={}))cf.call(t,o)&&y2(e,o,t[o]);if(g2)for(var n=0,a=g2(t);n<a.length;n++){var o=a[n];lf.call(t,o)&&y2(e,o,t[o])}return e},Ca=function(e,t){return af(e,sf(t))},df=function(e,t,o){return new Promise(function(n,a){var i=function(u){try{l(o.next(u))}catch(p){a(p)}},s=function(u){try{l(o.throw(u))}catch(p){a(p)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};l((o=o.apply(e,t)).next())})};var uf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ir:ir.apply(null,arguments)},cm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function ff(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}function at(e,t){function o(){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 nt(nt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}var pf=(function(e){x2(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||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 o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,sr([void 0],o[0].concat(this)))):new(t.bind.apply(t,sr([void 0],o.concat(this))))},t})(Array),hf=(function(e){x2(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||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 o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,sr([void 0],o[0].concat(this)))):new(t.bind.apply(t,sr([void 0],o.concat(this))))},t})(Array);function La(e){return Ee(e)?_o(e,function(){}):e}function mf(e){return typeof e=="boolean"}function gf(){return function(t){return yf(t)}}function yf(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=e.actionCreatorCheck,u=l===void 0?!0:l,p=new pf;if(o&&(mf(o)?p.push(Sa):p.push(Sa.withExtraArgument(o.extraArgument))),0){if(a)var m;if(s)var g;if(u)var y}return p}var Ea=!0;function S2(e){var t=gf(),o=e||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?t():i,l=o.devTools,u=l===void 0?!0:l,p=o.preloadedState,m=p===void 0?void 0:p,g=o.enhancers,y=g===void 0?void 0:g,b;if(typeof a=="function")b=a;else if(ff(a))b=f2(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 v=s;if(typeof v=="function"&&(v=v(t),!Ea&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ea&&v.some(function(N){return typeof N!="function"}))throw new Error("each middleware provided to configureStore must be a function");var x=p2.apply(void 0,v),E=ir;u&&(E=uf(nt({trace:!Ea},typeof u=="object"&&u)));var C=new hf(x),O=C;Array.isArray(y)?O=sr([x],y):typeof y=="function"&&(O=y(C));var w=E.apply(void 0,O);return xa(b,m,w)}function C2(e){var t={},o=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,o,n]}function bf(e){return typeof e=="function"}function vf(e,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?C2(t):[t,o,n],i=a[0],s=a[1],l=a[2],u;if(bf(e))u=function(){return La(e())};else{var p=La(e);u=function(){return p}}function m(g,y){g===void 0&&(g=u());var b=sr([i[y.type]],s.filter(function(v){var x=v.matcher;return x(y)}).map(function(v){var x=v.reducer;return x}));return b.filter(function(v){return!!v}).length===0&&(b=[l]),b.reduce(function(v,x){if(x)if($e(v)){var E=v,C=x(E,y);return C===void 0?v:C}else{if(Ee(v))return _o(v,function(O){return x(O,y)});var C=x(v,y);if(C===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return C}return v},g)}return m.getInitialState=u,m}function xf(e,t){return e+"/"+t}function E2(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:La(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=xf(t,m),b,v;"reducer"in g?(b=g.reducer,v=g.prepare):b=g,i[m]=b,s[y]=b,l[m]=v?at(y,v):at(y)});function u(){var m=typeof e.extraReducers=="function"?C2(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,b=m[1],v=b===void 0?[]:b,x=m[2],E=x===void 0?void 0:x,C=nt(nt({},y),s);return vf(o,function(O){for(var w in C)O.addCase(w,C[w]);for(var N=0,I=v;N<I.length;N++){var D=I[N];O.addMatcher(D.matcher,D.reducer)}E&&O.addDefaultCase(E)})}var p;return{name:t,reducer:function(m,g){return p||(p=u()),p(m,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Sf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Cf=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=Sf[Math.random()*64|0];return t},Ef=["name","message","stack","code"],Aa=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),b2=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),Af=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=Ef;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},fm=(function(){function e(t,o,n){var a=at(t+"/fulfilled",function(m,g,y,b){return{payload:m,meta:Ca(nt({},b||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=at(t+"/pending",function(m,g,y){return{payload:void 0,meta:Ca(nt({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=at(t+"/rejected",function(m,g,y,b,v){return{payload:b,error:(n&&n.serializeError||Af)(m||"Rejected"),meta:Ca(nt({},v||{}),{arg:y,requestId:g,rejectedWithValue:!!b,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,u=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 p(m){return function(g,y,b){var v=n?.idGenerator?n.idGenerator(m):Cf(),x=new u,E,C=!1;function O(N){E=N,x.abort()}var w=(function(){return df(this,null,function(){var N,I,D,Oe,st,Re,re;return of(this,function(ce){switch(ce.label){case 0:return ce.trys.push([0,4,,5]),Oe=(N=n?.condition)==null?void 0:N.call(n,m,{getState:y,extra:b}),Of(Oe)?[4,Oe]:[3,2];case 1:Oe=ce.sent(),ce.label=2;case 2:if(Oe===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return C=!0,st=new Promise(function(oe,ct){return x.signal.addEventListener("abort",function(){return ct({name:"AbortError",message:E||"Aborted"})})}),g(i(v,m,(I=n?.getPendingMeta)==null?void 0:I.call(n,{requestId:v,arg:m},{getState:y,extra:b}))),[4,Promise.race([st,Promise.resolve(o(m,{dispatch:g,getState:y,extra:b,requestId:v,signal:x.signal,abort:O,rejectWithValue:function(oe,ct){return new Aa(oe,ct)},fulfillWithValue:function(oe,ct){return new b2(oe,ct)}})).then(function(oe){if(oe instanceof Aa)throw oe;return oe instanceof b2?a(oe.payload,v,m,oe.meta):a(oe,v,m)})])];case 3:return D=ce.sent(),[3,5];case 4:return Re=ce.sent(),D=Re instanceof Aa?s(null,v,m,Re.payload,Re.meta):s(Re,v,m),[3,5];case 5:return re=n&&!n.dispatchConditionRejection&&s.match(D)&&D.meta.condition,re||g(D),[2,D]}})})})();return Object.assign(w,{abort:O,requestId:v,arg:m,unwrap:function(){return w.then(Lf)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e})();function Lf(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Of(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var A2="listener",L2="completed",O2="cancelled",pm="task-"+O2,hm="task-"+L2,mm=A2+"-"+O2,gm=A2+"-"+L2;var Oa="listenerMiddleware";var ym=at(Oa+"/add"),bm=at(Oa+"/removeAll"),vm=at(Oa+"/remove");var v2,xm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(v2||(v2=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Rf=function(e){return function(t){setTimeout(t,e)}},Sm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Rf(10);n2();var wf=xo(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),Mo=class extends wf(Object){};window.ftReduxStores||(window.ftReduxStores={});var R2=class e extends Mo{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Lo(i))return i;if(a==null)return;let s=E2({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=S2({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=kr(s.getInitialState());for(let g of p.keeping)m[g]=(u??m)[g];return m}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return s.reducer(u,p)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new So;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let u=s,p=i[u];return p?(...m)=>{let g=p(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[u]: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 ko=class{static format(t,o,n,a,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,o,n,a,!!i)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var zo=L(T()),_f="ft-app-info",cr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};cr.eventName="authentication-change";var Ur=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ur.eventName="ui-locale-changed";var Nf={session:(e,t)=>{(0,zo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>z.dispatchEvent(new cr(t.payload)),0))}},z=zo.FtReduxStore.get({name:_f,reducers:Nf,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var w2=L(T()),To=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},qm=(0,w2.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(z)}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=>ko.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return To([(0,Ra.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),To([(0,Ra.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),To([oa({store:z.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),To([oa({store:z.name})],t.prototype,"uiLocale",void 0),t});var _2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(_2||(_2={}));var N2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(N2||(N2={}));var M2;(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"})(M2||(M2={}));var k2;(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"})(k2||(k2={}));var z2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(z2||(z2={}));var T2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(T2||(T2={}));var I2;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(I2||(I2={}));var P2;(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"})(P2||(P2={}));var D2;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(D2||(D2={}));var U2;(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"})(U2||(U2={}));var B2;(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"})(B2||(B2={}));var G2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(G2||(G2={}));var F2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(F2||(F2={}));var H2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(H2||(H2={}));var $2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})($2||($2={}));var W2;(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"})(W2||(W2={}));var j2;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(j2||(j2={}));var V2;(function(e){e.ASC="ASC",e.DESC="DESC"})(V2||(V2={}));var K2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(K2||(K2={}));var Z2;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Z2||(Z2={}));var q2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(q2||(q2={}));var Y2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Y2||(Y2={}));var X2;(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"})(X2||(X2={}));var Q2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Q2||(Q2={}));var J2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(J2||(J2={}));var e1;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(e1||(e1={}));var t1;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(t1||(t1={}));var H;(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"})(H||(H={}));var he;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(he||(he={}));var r1;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(r1||(r1={}));var o1;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(o1||(o1={}));var n1;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(n1||(n1={}));var a1;(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"})(a1||(a1={}));var i1;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(i1||(i1={}));var s1;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(s1||(s1={}));var c1;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(c1||(c1={}));var l1;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(l1||(l1={}));var d1;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(d1||(d1={}));var u1;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(u1||(u1={}));var f1;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(f1||(f1={}));var p1;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(p1||(p1={}));var Mf={[H.PERSONAL_BOOK_SHARE_USER]:[H.PERSONAL_BOOK_USER],[H.HTML_EXPORT_USER]:[H.PERSONAL_BOOK_USER],[H.PDF_EXPORT_USER]:[H.PERSONAL_BOOK_USER],[H.KHUB_ADMIN]:[H.CONTENT_PUBLISHER],[H.ADMIN]:[H.KHUB_ADMIN,H.USERS_ADMIN,H.PORTAL_ADMIN,H.BEHAVIOR_DATA_USER],[H.GENERATIVE_AI_EXPORT_USER]:[H.GENERATIVE_AI_USER]};function h1(e,t){return e===t||(Mf[e]??[]).some(o=>h1(o,t))}function m1(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=>h1(n,t))}var Bo=L(T());var wa=L(T());var Et=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=z.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=z.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var lr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Et.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Et.await()}};var ie=class extends lr{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new wa.CacheRegistry,this.cache=t?a.commonCache:new wa.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Io=class extends ie{async listMySearches(){let{session:t}=z.getState();return m1(t,H.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Po=class extends ie{async listMyBookmarks(){let t=z.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Do=class extends ie{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=z.getState().session;return!!t?.sessionAuthenticated}};var Uo=class extends ie{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=z.getState().session;return!!t?.sessionAuthenticated}};var kf="ft-user-assets",zf={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(he).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;Na(e,o,[..._a(e,o),a]),g1(e,o,1,n),y1(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;Na(e,o,_a(e,o).map(a=>a.id===n.id?n:a)),y1(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;Na(e,o,_a(e,o).filter(i=>i.id!==a)),g1(e,o,-1,n)}},b1={[he.SEARCHES]:"savedSearches",[he.BOOKMARKS]:"bookmarks",[he.BOOKS]:void 0,[he.COLLECTIONS]:void 0},_a=(e,t)=>{var o;let n=b1[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},Na=(e,t,o)=>{let n=b1[t];n&&(e[n]=o)},g1=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===he.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},y1=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},X=Bo.FtReduxStore.get({name:kf,reducers:zf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(he).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ma=class{constructor(t=new Do,o=new Uo){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Po,this.savedSearchesService=new Io,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=z.getState();(0,Bo.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),X.actions.clearAssetCount(),X.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),X.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),X.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();X.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();X.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&X.getState().assetCounts.allAsset[t]!==o.count&&X.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&X.getState().assetCounts.bookmarkByMap[t]!==o.count&&X.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(X.getState().assetCounts.bookmarkByMap).length!==0;t===he.BOOKMARKS&&o&&X.actions.clearBookmarkCountByMap(),X.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;X.actions.bookmarks(o)}}},Tf=new Ma;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Tf);var ka=class{addCommand(t,o=!1){z.commands.add(t,o)}consumeCommand(t){return z.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ka;var me=L(T());var v1,dr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},If=Symbol("clearAfterUnitTest"),Go=class extends(0,me.withEventBus)(ie){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[v1]=()=>{this.defaultMessages={},this.cache=new me.CacheRegistry,this.listeners={}},this.currentUiLocale=z.getState().uiLocale,z.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=z.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,me.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new me.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(a){!(a instanceof me.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new dr({loadedContexts:t})),this.dispatchEvent(new dr({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new dr({loadedContexts:[t]})),this.dispatchEvent(new dr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,me.delay)(0).then(()=>n()).catch(()=>null)))}};v1=If;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Go{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Go{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Br=window.FluidTopicsI18nService,za=window.FluidTopicsCustomI18nService;var x1=L(T()),Ta=class{highlightHtml(t,o,n){(0,x1.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Ta;var S1=L(T());var Ia=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=z.getState().metadataConfiguration)===null||o===void 0?void 0:o.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,o){var n,a,i,s;if(t==null)return"";try{return S1.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:z.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1,(s=o?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new Ia;var C1=L(T());var Gr=class{static get(t,o){var n,a;let i=z.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 C1.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var Pa=class{urlToSearchRequest(t){return Gr.get().parse(t)}searchRequestToUrl(t){return Gr.get().serialize(t)}};window.FluidTopicsUrlService=new Pa;var We=L(T());var At=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};At.eventName="change";var Da=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},E1=new Da;var Fo=class e extends We.WithEventBus{static build(){return new e(window.history,E1,()=>window.location,!1)}constructor(t,o,n,a){var i,s;super(),this.history=t,this.historyStorage=o,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,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,We.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new At(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[i,s,l])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(At.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(At.eventName,t)}currentItem(){return(0,We.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,We.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,We.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,We.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let 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,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let a=o??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=Fo.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var A1=L(W());var L1=A1.css`
1029
+ `;var ll=["top","right","bottom","left"],cl=["start","end"],Zn=ll.reduce((e,t)=>e.concat(t,t+"-"+cl[0],t+"-"+cl[1]),[]),Rr=Math.min,Je=Math.max,wr=Math.round;var Ce=e=>({x:e,y:e}),Cu={left:"right",right:"left",bottom:"top",top:"bottom"};function qn(e,t,o){return Je(e,Rr(t,o))}function uo(e,t){return typeof e=="function"?e(t):e}function Xt(e){return e.split("-")[0]}function et(e){return e.split("-")[1]}function Yn(e){return e==="x"?"y":"x"}function Xn(e){return e==="y"?"height":"width"}function fo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Qn(e){return Yn(fo(e))}function dl(e,t,o){o===void 0&&(o=!1);let n=et(e),a=Qn(e),i=Xn(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Kn(s)),[s,Kn(s)]}function ul(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Kn(e){let t=Xt(e);return Cu[t]+e.slice(t.length)}function Eu(e){return{top:0,right:0,bottom:0,left:0,...e}}function fl(e){return typeof e!="number"?Eu(e):{top:e,right:e,bottom:e,left:e}}function mt(e){let{x:t,y:o,width:n,height:a}=e;return{width:n,height:a,top:o,left:t,right:t+n,bottom:o+a,x:t,y:o}}function pl(e,t,o){let{reference:n,floating:a}=e,i=fo(t),s=Qn(t),l=Xn(s),u=Xt(t),p=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,b;switch(u){case"top":b={x:m,y:n.y-a.height};break;case"bottom":b={x:m,y:n.y+n.height};break;case"right":b={x:n.x+n.width,y:g};break;case"left":b={x:n.x-a.width,y:g};break;default:b={x:n.x,y:n.y}}switch(et(t)){case"start":b[s]-=y*(o&&p?-1:1);break;case"end":b[s]+=y*(o&&p?-1:1);break}return b}async function hl(e,t){var o;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:b=0}=uo(t,e),v=fl(b),E=l[y?g==="floating"?"reference":"floating":g],C=mt(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(E)))==null||o?E:E.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:m,strategy:u})),O=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),N=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},I=mt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:O,offsetParent:w,strategy:u}):O);return{top:(C.top-I.top+v.top)/N.y,bottom:(I.bottom-C.bottom+v.bottom)/N.y,left:(C.left-I.left+v.left)/N.x,right:(I.right-C.right+v.right)/N.x}}var Au=50,ml=async(e,t,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,l=s.detectOverflow?s:{...s,detectOverflow:hl},u=await(s.isRTL==null?void 0:s.isRTL(t)),p=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=pl(p,n,u),y=n,b=0,v={};for(let x=0;x<i.length;x++){let E=i[x];if(!E)continue;let{name:C,fn:O}=E,{x:w,y:N,data:I,reset:D}=await O({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:v,rects:p,platform:l,elements:{reference:e,floating:t}});m=w??m,g=N??g,v[C]={...v[C],...I},D&&b<Au&&(b++,typeof D=="object"&&(D.placement&&(y=D.placement),D.rects&&(p=D.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):D.rects),{x:m,y:g}=pl(p,y,u)),x=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:v}};function Lu(e,t,o){return(e?[...o.filter(a=>et(a)===e),...o.filter(a=>et(a)!==e)]:o.filter(a=>Xt(a)===a)).filter(a=>e?et(a)===e||(t?ul(a)!==a:!1):!0)}var gl=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:p}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Zn,autoAlignment:b=!0,...v}=uo(e,t),x=g!==void 0||y===Zn?Lu(g||null,b,y):y,E=await u.detectOverflow(t,v),C=((o=s.autoPlacement)==null?void 0:o.index)||0,O=x[C];if(O==null)return{};let w=dl(O,i,await(u.isRTL==null?void 0:u.isRTL(p.floating)));if(l!==O)return{reset:{placement:x[0]}};let N=[E[Xt(O)],E[w[0]],E[w[1]]],I=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:O,overflows:N}],D=x[C+1];if(D)return{data:{index:C+1,overflows:I},reset:{placement:D}};let Oe=I.map(re=>{let ce=et(re.placement);return[re.placement,ce&&m?re.overflows.slice(0,2).reduce((oe,ct)=>oe+ct,0):re.overflows[0],re.overflows]}).sort((re,ce)=>re[1]-ce[1]),Re=((a=Oe.filter(re=>re[2].slice(0,et(re[0])?2:3).every(ce=>ce<=0))[0])==null?void 0:a[0])||Oe[0][0];return Re!==l?{data:{index:C+1,overflows:I},reset:{placement:Re}}:{}}}};var yl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:C=>{let{x:O,y:w}=C;return{x:O,y:w}}},...p}=uo(e,t),m={x:o,y:n},g=await i.detectOverflow(t,p),y=fo(Xt(a)),b=Yn(y),v=m[b],x=m[y];if(s){let C=b==="y"?"top":"left",O=b==="y"?"bottom":"right",w=v+g[C],N=v-g[O];v=qn(w,v,N)}if(l){let C=y==="y"?"top":"left",O=y==="y"?"bottom":"right",w=x+g[C],N=x-g[O];x=qn(w,x,N)}let E=u.fn({...t,[b]:v,[y]:x});return{...E,data:{x:E.x-o,y:E.y-n,enabled:{[b]:s,[y]:l}}}}}};function ho(){return typeof window<"u"}function yt(e){return vl(e)?(e.nodeName||"").toLowerCase():"#document"}function J(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _e(e){var t;return(t=(vl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vl(e){return ho()?e instanceof Node||e instanceof J(e).Node:!1}function ue(e){return ho()?e instanceof Element||e instanceof J(e).Element:!1}function Ne(e){return ho()?e instanceof HTMLElement||e instanceof J(e).HTMLElement:!1}function bl(e){return!ho()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof J(e).ShadowRoot}function Qt(e){let{overflow:t,overflowX:o,overflowY:n,display:a}=fe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&a!=="inline"&&a!=="contents"}function xl(e){return/^(table|td|th)$/.test(yt(e))}function _r(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Ou=/transform|translate|scale|rotate|perspective|filter/,Ru=/paint|layout|strict|content/,gt=e=>!!e&&e!=="none",Jn;function Jt(e){let t=ue(e)?fe(e):e;return gt(t.transform)||gt(t.translate)||gt(t.scale)||gt(t.rotate)||gt(t.perspective)||!mo()&&(gt(t.backdropFilter)||gt(t.filter))||Ou.test(t.willChange||"")||Ru.test(t.contain||"")}function Sl(e){let t=He(e);for(;Ne(t)&&!bt(t);){if(Jt(t))return t;if(_r(t))return null;t=He(t)}return null}function mo(){return Jn==null&&(Jn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jn}function bt(e){return/^(html|body|#document)$/.test(yt(e))}function fe(e){return J(e).getComputedStyle(e)}function Nr(e){return ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function He(e){if(yt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||bl(e)&&e.host||_e(e);return bl(t)?t.host:t}function Cl(e){let t=He(e);return bt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ne(t)&&Qt(t)?t:Cl(t)}function po(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=Cl(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=J(a);if(i){let l=go(s);return t.concat(s,s.visualViewport||[],Qt(a)?a:[],l&&o?po(l):[])}else return t.concat(a,po(a,[],o))}function go(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ol(e){let t=fe(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Ne(e),i=a?e.offsetWidth:o,s=a?e.offsetHeight:n,l=wr(o)!==i||wr(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function Rl(e){return ue(e)?e:e.contextElement}function er(e){let t=Rl(e);if(!Ne(t))return Ce(1);let o=t.getBoundingClientRect(),{width:n,height:a,$:i}=Ol(t),s=(i?wr(o.width):o.width)/n,l=(i?wr(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var wu=Ce(0);function wl(e){let t=J(e);return!mo()||!t.visualViewport?wu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _u(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==J(e)?!1:t}function Mr(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),i=Rl(e),s=Ce(1);t&&(n?ue(n)&&(s=er(n)):s=er(e));let l=_u(i,o,n)?wl(i):Ce(0),u=(a.left+l.x)/s.x,p=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=J(i),b=n&&ue(n)?J(n):n,v=y,x=go(v);for(;x&&n&&b!==v;){let E=er(x),C=x.getBoundingClientRect(),O=fe(x),w=C.left+(x.clientLeft+parseFloat(O.paddingLeft))*E.x,N=C.top+(x.clientTop+parseFloat(O.paddingTop))*E.y;u*=E.x,p*=E.y,m*=E.x,g*=E.y,u+=w,p+=N,v=J(x),x=go(v)}}return mt({width:m,height:g,x:u,y:p})}function yo(e,t){let o=Nr(e).scrollLeft;return t?t.left+o:Mr(_e(e)).left+o}function _l(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-yo(e,o),a=o.top+t.scrollTop;return{x:n,y:a}}function Nu(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e,i=a==="fixed",s=_e(n),l=t?_r(t.floating):!1;if(n===s||l&&i)return o;let u={scrollLeft:0,scrollTop:0},p=Ce(1),m=Ce(0),g=Ne(n);if((g||!g&&!i)&&((yt(n)!=="body"||Qt(s))&&(u=Nr(n)),g)){let b=Mr(n);p=er(n),m.x=b.x+n.clientLeft,m.y=b.y+n.clientTop}let y=s&&!g&&!i?_l(s,u):Ce(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-u.scrollLeft*p.x+m.x+y.x,y:o.y*p.y-u.scrollTop*p.y+m.y+y.y}}function Mu(e){return Array.from(e.getClientRects())}function ku(e){let t=_e(e),o=Nr(e),n=e.ownerDocument.body,a=Je(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Je(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+yo(e),l=-o.scrollTop;return fe(n).direction==="rtl"&&(s+=Je(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var El=25;function zu(e,t){let o=J(e),n=_e(e),a=o.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let m=mo();(!m||m&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let p=yo(n);if(p<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),b=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,v=Math.abs(n.clientWidth-g.clientWidth-b);v<=El&&(i-=v)}else p<=El&&(i+=p);return{width:i,height:s,x:l,y:u}}function Tu(e,t){let o=Mr(e,!0,t==="fixed"),n=o.top+e.clientTop,a=o.left+e.clientLeft,i=Ne(e)?er(e):Ce(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,u=a*i.x,p=n*i.y;return{width:s,height:l,x:u,y:p}}function Al(e,t,o){let n;if(t==="viewport")n=zu(e,o);else if(t==="document")n=ku(_e(e));else if(ue(t))n=Tu(t,o);else{let a=wl(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return mt(n)}function Nl(e,t){let o=He(e);return o===t||!ue(o)||bt(o)?!1:fe(o).position==="fixed"||Nl(o,t)}function Iu(e,t){let o=t.get(e);if(o)return o;let n=po(e,[],!1).filter(l=>ue(l)&&yt(l)!=="body"),a=null,i=fe(e).position==="fixed",s=i?He(e):e;for(;ue(s)&&!bt(s);){let l=fe(s),u=Jt(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Qt(s)&&!u&&Nl(e,s))?n=n.filter(m=>m!==s):a=l,s=He(s)}return t.set(e,n),n}function Pu(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e,s=[...o==="clippingAncestors"?_r(t)?[]:Iu(t,this._c):[].concat(o),n],l=Al(t,s[0],a),u=l.top,p=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let b=Al(t,s[y],a);u=Je(b.top,u),p=Rr(b.right,p),m=Rr(b.bottom,m),g=Je(b.left,g)}return{width:p-g,height:m-u,x:g,y:u}}function Du(e){let{width:t,height:o}=Ol(e);return{width:t,height:o}}function Uu(e,t,o){let n=Ne(t),a=_e(t),i=o==="fixed",s=Mr(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=Ce(0);function p(){u.x=yo(a)}if(n||!n&&!i)if((yt(t)!=="body"||Qt(a))&&(l=Nr(t)),n){let b=Mr(t,!0,i,t);u.x=b.x+t.clientLeft,u.y=b.y+t.clientTop}else a&&p();i&&!n&&a&&p();let m=a&&!n&&!i?_l(a,l):Ce(0),g=s.left+l.scrollLeft-u.x-m.x,y=s.top+l.scrollTop-u.y-m.y;return{x:g,y,width:s.width,height:s.height}}function ea(e){return fe(e).position==="static"}function Ll(e,t){if(!Ne(e)||fe(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return _e(e)===o&&(o=o.ownerDocument.body),o}function Ml(e,t){let o=J(e);if(_r(e))return o;if(!Ne(e)){let a=He(e);for(;a&&!bt(a);){if(ue(a)&&!ea(a))return a;a=He(a)}return o}let n=Ll(e,t);for(;n&&xl(n)&&ea(n);)n=Ll(n,t);return n&&bt(n)&&ea(n)&&!Jt(n)?o:n||Sl(e)||o}var Bu=async function(e){let t=this.getOffsetParent||Ml,o=this.getDimensions,n=await o(e.floating);return{reference:Uu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Gu(e){return fe(e).direction==="rtl"}var bo={convertOffsetParentRelativeRectToViewportRelativeRect:Nu,getDocumentElement:_e,getClippingRect:Pu,getOffsetParent:Ml,getElementRects:Bu,getClientRects:Mu,getDimensions:Du,getScale:er,isElement:ue,isRTL:Gu};var kl=gl,zl=yl;var Tl=(e,t,o)=>{let n=new Map,a={platform:bo,...o},i={...a.platform,_c:n};return ml(e,t,{...a,platform:i})};function Il(e){return Fu(e)}function ta(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Fu(e){for(let t=e;t;t=ta(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=ta(e);t;t=ta(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||Jt(o)||t.tagName==="BODY"))return t}return null}async function Pl(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},Tl(e,t,{strategy:n.strategy,platform:{...bo,getOffsetParent:a=>bo.getOffsetParent(a,Il)},middleware:[zl({crossAxis:!0}),kl({allowedPlacements:[n.placement]})]})}var fr=L(T());var Ra=L(Y());var Dl=L(Y(),1);var ra=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function Ul(e,t){return(0,Dl.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return kr(e);try{return JSON.parse(o)}catch{return kr(e)}},toAttribute:o=>JSON.stringify(o)},hasChanged:zr,...t??{}})}function Hu(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!vo(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(!vo(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 a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(o=i.length,o!==a(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!vo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function vo(e,t){try{return Hu(e,t)}catch{return!1}}function zr(e,t){return!vo(e,t)}function kr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function xo(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var Bl=L(Y(),1);var oa=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:zr,attribute:!1,...t};(0,Bl.property)(i)(o,n);let s=o.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 So=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var vt=L(Y(),1);var Co=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>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 Fl=L(W(),1);var Eo=globalThis,$u=Eo.ShadowRoot&&(Eo.ShadyCSS===void 0||Eo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Gl=(e,t)=>{if($u)e.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),a=Eo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Ao=class extends Fl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Gl(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){ra(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function Hl(e,t,...o){var n;let a=e.querySelector(t);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var rr=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Vl,$l=Symbol("constructorPrototype"),Wl=Symbol("constructorName"),Kl=Symbol("exportpartsDebouncer"),jl=Symbol("dynamicDependenciesLoaded"),tr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};tr.eventName="exportparts-updated";var Me=class extends Ao{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Vl]=new Co(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Kl].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[Wl]=this.constructor.name,this[$l]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Wl]&&Object.setPrototypeOf(this,this[$l])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[jl]||(o[jl]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(tr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(tr.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 tr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=Hl(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.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 o,n,a,i,s,l;let u=y=>y!=null&&y.trim().length>0,p=t.filter(u).map(y=>y.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let b=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],v=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(E=>E.split(":")[1]))!==null&&l!==void 0?l:[],x=[...b,...v].filter(u).map(E=>E.trim());for(let E of x)m.add(E)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>p.map(b=>`${y}:${b}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};Vl=Kl;rr([(0,vt.property)()],Me.prototype,"exportpartsPrefix",void 0);rr([Ul([])],Me.prototype,"exportpartsPrefixes",void 0);rr([(0,vt.property)({reflect:!0})],Me.prototype,"exportparts",void 0);rr([(0,vt.property)()],Me.prototype,"customStylesheet",void 0);rr([(0,vt.property)()],Me.prototype,"elementToFocus",void 0);rr([(0,vt.state)()],Me.prototype,"useAdoptedStyleSheets",void 0);function Lo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Tr=Symbol("internalReduxEventsUnsubscribers"),tt=Symbol("internalStoresUnsubscribers"),xt=Symbol("internalStores"),Wu=xo(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[xt].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[xt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[xt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[xt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[tt].has(s.store):this[tt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var u;this[tt].set(s,l.subscribe(()=>this.updateFromStores())),this[Tr].set(s,[]),Lo(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=y=>this[m](y);l.addEventListener(p.eventName,g),this[Tr].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[tt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[tt].has(s)&&this[tt].get(s)(),this[tt].delete(s),(l=this[Tr].get(s))===null||l===void 0||l.forEach(u=>u()),this[Tr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=tt,o=xt,n=Tr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Zl=class extends Wu(Me){};function pe(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function $e(e){return!!e&&!!e[U]}function Ee(e){var t;return!!e&&((function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Qu})(e)||Array.isArray(e)||!!e[t2]||!!(!((t=e.constructor)===null||t===void 0)&&t[t2])||fa(e)||pa(e))}function St(e,t,o){o===void 0&&(o=!1),ar(e)===0?(o?Object.keys:nr)(e).forEach((function(n){o&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,a){return t(a,n,e)}))}function ar(e){var t=e[U];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:fa(e)?2:pa(e)?3:0}function or(e,t){return ar(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ju(e,t){return ar(e)===2?e.get(t):e[t]}function r2(e,t,o){var n=ar(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function o2(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function fa(e){return Yu&&e instanceof Map}function pa(e){return Xu&&e instanceof Set}function rt(e){return e.o||e.t}function ha(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=i2(e);delete t[U];for(var o=nr(t),n=0;n<o.length;n++){var a=o[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 ma(e,t){return t===void 0&&(t=!1),ga(e)||$e(e)||!Ee(e)||(ar(e)>1&&(e.set=e.add=e.clear=e.delete=Vu),Object.freeze(e),t&&St(e,(function(o,n){return ma(n,!0)}),!0)),e}function Vu(){pe(2)}function ga(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ke(e){var t=ua[e];return t||pe(18,e),t}function Ku(e,t){ua[e]||(ua[e]=t)}function ca(){return Pr}function na(e,t){t&&(ke("Patches"),e.u=[],e.s=[],e.v=t)}function Oo(e){la(e),e.p.forEach(Zu),e.p=null}function la(e){e===Pr&&(Pr=e.l)}function ql(e){return Pr={p:[],l:Pr,h:e,m:!0,_:0}}function Zu(e){var t=e[U];t.i===0||t.i===1?t.j():t.g=!0}function aa(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||ke("ES5").S(t,e,n),n?(o[U].P&&(Oo(t),pe(4)),Ee(e)&&(e=Ro(t,e),t.l||wo(t,e)),t.u&&ke("Patches").M(o[U].t,e,t.u,t.s)):e=Ro(t,o,[]),Oo(t),t.u&&t.v(t.u,t.s),e!==a2?e:void 0}function Ro(e,t,o){if(ga(t))return t;var n=t[U];if(!n)return St(t,(function(l,u){return Yl(e,n,t,l,u,o)}),!0),t;if(n.A!==e)return t;if(!n.P)return wo(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=ha(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),St(i,(function(l,u){return Yl(e,n,a,l,u,o,s)})),wo(e,a,!1),o&&e.u&&ke("Patches").N(n,o,e.u,e.s)}return n.o}function Yl(e,t,o,n,a,i,s){if($e(a)){var l=Ro(e,a,i&&t&&t.i!==3&&!or(t.R,n)?i.concat(n):void 0);if(r2(o,n,l),!$e(l))return;e.m=!1}else s&&o.add(a);if(Ee(a)&&!ga(a)){if(!e.h.D&&e._<1)return;Ro(e,a),t&&t.A.l||wo(e,a)}}function wo(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&ma(t,o)}function ia(e,t){var o=e[U];return(o?rt(o):e)[t]}function Xl(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ot(e){e.P||(e.P=!0,e.l&&ot(e.l))}function sa(e){e.o||(e.o=ha(e.t))}function da(e,t,o){var n=fa(t)?ke("MapSet").F(t,o):pa(t)?ke("MapSet").T(t,o):e.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:ca(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=Dr;s&&(u=[l],p=Ir);var m=Proxy.revocable(u,p),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y})(t,o):ke("ES5").J(t,o);return(o?o.A:ca()).p.push(n),n}function qu(e){return $e(e)||pe(22,e),(function t(o){if(!Ee(o))return o;var n,a=o[U],i=ar(o);if(a){if(!a.P&&(a.i<4||!ke("ES5").K(a)))return a.t;a.I=!0,n=Ql(o,i),a.I=!1}else n=Ql(o,i);return St(n,(function(s,l){a&&ju(a.t,s)===l||r2(n,s,t(l))})),i===3?new Set(n):n})(e)}function Ql(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ha(e)}function n2(){function e(s,l){var u=i[s];return u?u.enumerable=l:i[s]=u={configurable:!0,enumerable:l,get:function(){var p=this[U];return Dr.get(p,s)},set:function(p){var m=this[U];Dr.set(m,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][U];if(!u.P)switch(u.i){case 5:n(u)&&ot(u);break;case 4:o(u)&&ot(u)}}}function o(s){for(var l=s.t,u=s.k,p=nr(u),m=p.length-1;m>=0;m--){var g=p[m];if(g!==U){var y=l[g];if(y===void 0&&!or(l,g))return!0;var b=u[g],v=b&&b[U];if(v?v.t!==y:!o2(b,y))return!0}}var x=!!l[U];return p.length!==nr(l).length+(x?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&pe(3,JSON.stringify(rt(s)))}var i={};Ku("ES5",{J:function(s,l){var u=Array.isArray(s),p=(function(g,y){if(g){for(var b=Array(y.length),v=0;v<y.length;v++)Object.defineProperty(b,""+v,e(v,!0));return b}var x=i2(y);delete x[U];for(var E=nr(x),C=0;C<E.length;C++){var O=E[C];x[O]=e(O,g||!!x[O].enumerable)}return Object.create(Object.getPrototypeOf(y),x)})(u,s),m={i:u?5:4,A:l?l.A:ca(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,U,{value:m,writable:!0}),p},S:function(s,l,u){u?$e(l)&&l[U].A===s&&t(s.p):(s.u&&(function p(m){if(m&&typeof m=="object"){var g=m[U];if(g){var y=g.t,b=g.k,v=g.R,x=g.i;if(x===4)St(b,(function(N){N!==U&&(y[N]!==void 0||or(y,N)?v[N]||p(b[N]):(v[N]=!0,ot(g)))})),St(y,(function(N){b[N]!==void 0||or(b,N)||(v[N]=!1,ot(g))}));else if(x===5){if(n(g)&&(ot(g),v.length=!0),b.length<y.length)for(var E=b.length;E<y.length;E++)v[E]=!1;else for(var C=y.length;C<b.length;C++)v[C]=!0;for(var O=Math.min(b.length,y.length),w=0;w<O;w++)b.hasOwnProperty(w)||(v[w]=!0),v[w]===void 0&&p(b[w])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Jl,Pr,ya=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Yu=typeof Map<"u",Xu=typeof Set<"u",e2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",a2=ya?Symbol.for("immer-nothing"):((Jl={})["immer-nothing"]=!0,Jl),t2=ya?Symbol.for("immer-draftable"):"__$immer_draftable",U=ya?Symbol.for("immer-state"):"__$immer_state";var Qu=""+Object.prototype.constructor,nr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,i2=Object.getOwnPropertyDescriptors||function(e){var t={};return nr(e).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)})),t},ua={},Dr={get:function(e,t){if(t===U)return e;var o=rt(e);if(!or(o,t))return(function(a,i,s){var l,u=Xl(i,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0})(e,o,t);var n=o[t];return e.I||!Ee(n)?n:n===ia(e.t,t)?(sa(e),e.o[t]=da(e.A.h,n,e)):n},has:function(e,t){return t in rt(e)},ownKeys:function(e){return Reflect.ownKeys(rt(e))},set:function(e,t,o){var n=Xl(rt(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=ia(rt(e),t),i=a?.[U];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(o2(o,a)&&(o!==void 0||or(e.t,t)))return!0;sa(e),ot(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return ia(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,sa(e),ot(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=rt(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){pe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){pe(12)}},Ir={};St(Dr,(function(e,t){Ir[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ir.deleteProperty=function(e,t){return Ir.set.call(this,e,t,void 0)},Ir.set=function(e,t,o){return Dr.set.call(this,e[0],t,o,e[0])};var Ju=(function(){function e(o){var n=this;this.O=e2,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=n;return function(x){var E=this;x===void 0&&(x=l);for(var C=arguments.length,O=Array(C>1?C-1:0),w=1;w<C;w++)O[w-1]=arguments[w];return u.produce(x,(function(N){var I;return(I=i).call.apply(I,[E,N].concat(O))}))}}var p;if(typeof i!="function"&&pe(6),s!==void 0&&typeof s!="function"&&pe(7),Ee(a)){var m=ql(n),g=da(n,a,void 0),y=!0;try{p=i(g),y=!1}finally{y?Oo(m):la(m)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(x){return na(m,s),aa(x,m)}),(function(x){throw Oo(m),x})):(na(m,s),aa(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===a2&&(p=void 0),n.D&&ma(p,!0),s){var b=[],v=[];ke("Patches").M(a,p,b,v),s(b,v)}return p}pe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){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(p,(function(b){return a.apply(void 0,[b].concat(g))}))};var s,l,u=n.produce(a,i,(function(p,m){s=p,l=m}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(p){return[p,s,l]})):[u,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){Ee(o)||pe(8),$e(o)&&(o=qu(o));var n=ql(this),a=da(this,o,void 0);return a[U].C=!0,la(n),a},t.finishDraft=function(o,n){var a=o&&o[U],i=a.A;return na(i,n),aa(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!e2&&pe(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var s=ke("Patches").$;return $e(o)?s(o,n):this.produce(o,(function(l){return s(l,n)}))},e})(),ae=new Ju,ef=ae.produce,Bh=ae.produceWithPatches.bind(ae),Gh=ae.setAutoFreeze.bind(ae),Fh=ae.setUseProxies.bind(ae),Hh=ae.applyPatches.bind(ae),$h=ae.createDraft.bind(ae),Wh=ae.finishDraft.bind(ae),_o=ef;function Ct(e){"@babel/helpers - typeof";return Ct=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},Ct(e)}function s2(e,t){if(Ct(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(Ct(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function c2(e){var t=s2(e,"string");return Ct(t)=="symbol"?t:t+""}function l2(e,t,o){return(t=c2(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function d2(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function ba(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?d2(Object(o),!0).forEach(function(n){l2(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):d2(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function Z(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 u2=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),va=function(){return Math.random().toString(36).substring(7).split("").join(".")},No={INIT:"@@redux/INIT"+va(),REPLACE:"@@redux/REPLACE"+va(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+va()}};function tf(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 xa(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Z(1));return o(xa)(e,t)}if(typeof e!="function")throw new Error(Z(2));var a=e,i=t,s=[],l=s,u=!1;function p(){l===s&&(l=s.slice())}function m(){if(u)throw new Error(Z(3));return i}function g(x){if(typeof x!="function")throw new Error(Z(4));if(u)throw new Error(Z(5));var E=!0;return p(),l.push(x),function(){if(E){if(u)throw new Error(Z(6));E=!1,p();var O=l.indexOf(x);l.splice(O,1),s=null}}}function y(x){if(!tf(x))throw new Error(Z(7));if(typeof x.type>"u")throw new Error(Z(8));if(u)throw new Error(Z(9));try{u=!0,i=a(i,x)}finally{u=!1}for(var E=s=l,C=0;C<E.length;C++){var O=E[C];O()}return x}function b(x){if(typeof x!="function")throw new Error(Z(10));a=x,y({type:No.REPLACE})}function v(){var x,E=g;return x={subscribe:function(O){if(typeof O!="object"||O===null)throw new Error(Z(11));function w(){O.next&&O.next(m())}w();var N=E(w);return{unsubscribe:N}}},x[u2]=function(){return this},x}return y({type:No.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:b},n[u2]=v,n}function rf(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:No.INIT});if(typeof n>"u")throw new Error(Z(12));if(typeof o(void 0,{type:No.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Z(13))})}function f2(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(o[a]=e[a])}var i=Object.keys(o),s,l;try{rf(o)}catch(u){l=u}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var y=!1,b={},v=0;v<i.length;v++){var x=i[v],E=o[x],C=p[x],O=E(C,m);if(typeof O>"u"){var w=m&&m.type;throw new Error(Z(14))}b[x]=O,y=y||O!==C}return y=y||i.length!==Object.keys(p).length,y?b:p}}function ir(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];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 p2(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Z(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return i=ir.apply(void 0,l)(a.dispatch),ba(ba({},a),{},{dispatch:i})}}}function h2(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 m2=h2();m2.withExtraArgument=h2;var Sa=m2;var x2=(function(){var e=function(t,o){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,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}})(),of=function(e,t){var o={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(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(m){p=[6,m],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},sr=function(e,t){for(var o=0,n=t.length,a=e.length;o<n;o++,a++)e[a]=t[o];return e},nf=Object.defineProperty,af=Object.defineProperties,sf=Object.getOwnPropertyDescriptors,g2=Object.getOwnPropertySymbols,cf=Object.prototype.hasOwnProperty,lf=Object.prototype.propertyIsEnumerable,y2=function(e,t,o){return t in e?nf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},nt=function(e,t){for(var o in t||(t={}))cf.call(t,o)&&y2(e,o,t[o]);if(g2)for(var n=0,a=g2(t);n<a.length;n++){var o=a[n];lf.call(t,o)&&y2(e,o,t[o])}return e},Ca=function(e,t){return af(e,sf(t))},df=function(e,t,o){return new Promise(function(n,a){var i=function(u){try{l(o.next(u))}catch(p){a(p)}},s=function(u){try{l(o.throw(u))}catch(p){a(p)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};l((o=o.apply(e,t)).next())})};var uf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ir:ir.apply(null,arguments)},cm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function ff(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}function at(e,t){function o(){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 nt(nt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}var pf=(function(e){x2(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||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 o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,sr([void 0],o[0].concat(this)))):new(t.bind.apply(t,sr([void 0],o.concat(this))))},t})(Array),hf=(function(e){x2(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||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 o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,sr([void 0],o[0].concat(this)))):new(t.bind.apply(t,sr([void 0],o.concat(this))))},t})(Array);function La(e){return Ee(e)?_o(e,function(){}):e}function mf(e){return typeof e=="boolean"}function gf(){return function(t){return yf(t)}}function yf(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=e.actionCreatorCheck,u=l===void 0?!0:l,p=new pf;if(o&&(mf(o)?p.push(Sa):p.push(Sa.withExtraArgument(o.extraArgument))),0){if(a)var m;if(s)var g;if(u)var y}return p}var Ea=!0;function S2(e){var t=gf(),o=e||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?t():i,l=o.devTools,u=l===void 0?!0:l,p=o.preloadedState,m=p===void 0?void 0:p,g=o.enhancers,y=g===void 0?void 0:g,b;if(typeof a=="function")b=a;else if(ff(a))b=f2(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 v=s;if(typeof v=="function"&&(v=v(t),!Ea&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ea&&v.some(function(N){return typeof N!="function"}))throw new Error("each middleware provided to configureStore must be a function");var x=p2.apply(void 0,v),E=ir;u&&(E=uf(nt({trace:!Ea},typeof u=="object"&&u)));var C=new hf(x),O=C;Array.isArray(y)?O=sr([x],y):typeof y=="function"&&(O=y(C));var w=E.apply(void 0,O);return xa(b,m,w)}function C2(e){var t={},o=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,o,n]}function bf(e){return typeof e=="function"}function vf(e,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?C2(t):[t,o,n],i=a[0],s=a[1],l=a[2],u;if(bf(e))u=function(){return La(e())};else{var p=La(e);u=function(){return p}}function m(g,y){g===void 0&&(g=u());var b=sr([i[y.type]],s.filter(function(v){var x=v.matcher;return x(y)}).map(function(v){var x=v.reducer;return x}));return b.filter(function(v){return!!v}).length===0&&(b=[l]),b.reduce(function(v,x){if(x)if($e(v)){var E=v,C=x(E,y);return C===void 0?v:C}else{if(Ee(v))return _o(v,function(O){return x(O,y)});var C=x(v,y);if(C===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return C}return v},g)}return m.getInitialState=u,m}function xf(e,t){return e+"/"+t}function E2(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:La(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=xf(t,m),b,v;"reducer"in g?(b=g.reducer,v=g.prepare):b=g,i[m]=b,s[y]=b,l[m]=v?at(y,v):at(y)});function u(){var m=typeof e.extraReducers=="function"?C2(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,b=m[1],v=b===void 0?[]:b,x=m[2],E=x===void 0?void 0:x,C=nt(nt({},y),s);return vf(o,function(O){for(var w in C)O.addCase(w,C[w]);for(var N=0,I=v;N<I.length;N++){var D=I[N];O.addMatcher(D.matcher,D.reducer)}E&&O.addDefaultCase(E)})}var p;return{name:t,reducer:function(m,g){return p||(p=u()),p(m,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Sf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Cf=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=Sf[Math.random()*64|0];return t},Ef=["name","message","stack","code"],Aa=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),b2=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),Af=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=Ef;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},fm=(function(){function e(t,o,n){var a=at(t+"/fulfilled",function(m,g,y,b){return{payload:m,meta:Ca(nt({},b||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=at(t+"/pending",function(m,g,y){return{payload:void 0,meta:Ca(nt({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=at(t+"/rejected",function(m,g,y,b,v){return{payload:b,error:(n&&n.serializeError||Af)(m||"Rejected"),meta:Ca(nt({},v||{}),{arg:y,requestId:g,rejectedWithValue:!!b,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,u=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 p(m){return function(g,y,b){var v=n?.idGenerator?n.idGenerator(m):Cf(),x=new u,E,C=!1;function O(N){E=N,x.abort()}var w=(function(){return df(this,null,function(){var N,I,D,Oe,st,Re,re;return of(this,function(ce){switch(ce.label){case 0:return ce.trys.push([0,4,,5]),Oe=(N=n?.condition)==null?void 0:N.call(n,m,{getState:y,extra:b}),Of(Oe)?[4,Oe]:[3,2];case 1:Oe=ce.sent(),ce.label=2;case 2:if(Oe===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return C=!0,st=new Promise(function(oe,ct){return x.signal.addEventListener("abort",function(){return ct({name:"AbortError",message:E||"Aborted"})})}),g(i(v,m,(I=n?.getPendingMeta)==null?void 0:I.call(n,{requestId:v,arg:m},{getState:y,extra:b}))),[4,Promise.race([st,Promise.resolve(o(m,{dispatch:g,getState:y,extra:b,requestId:v,signal:x.signal,abort:O,rejectWithValue:function(oe,ct){return new Aa(oe,ct)},fulfillWithValue:function(oe,ct){return new b2(oe,ct)}})).then(function(oe){if(oe instanceof Aa)throw oe;return oe instanceof b2?a(oe.payload,v,m,oe.meta):a(oe,v,m)})])];case 3:return D=ce.sent(),[3,5];case 4:return Re=ce.sent(),D=Re instanceof Aa?s(null,v,m,Re.payload,Re.meta):s(Re,v,m),[3,5];case 5:return re=n&&!n.dispatchConditionRejection&&s.match(D)&&D.meta.condition,re||g(D),[2,D]}})})})();return Object.assign(w,{abort:O,requestId:v,arg:m,unwrap:function(){return w.then(Lf)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e})();function Lf(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Of(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var A2="listener",L2="completed",O2="cancelled",pm="task-"+O2,hm="task-"+L2,mm=A2+"-"+O2,gm=A2+"-"+L2;var Oa="listenerMiddleware";var ym=at(Oa+"/add"),bm=at(Oa+"/removeAll"),vm=at(Oa+"/remove");var v2,xm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(v2||(v2=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Rf=function(e){return function(t){setTimeout(t,e)}},Sm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Rf(10);n2();var wf=xo(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),Mo=class extends wf(Object){};window.ftReduxStores||(window.ftReduxStores={});var R2=class e extends Mo{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Lo(i))return i;if(a==null)return;let s=E2({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=S2({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=kr(s.getInitialState());for(let g of p.keeping)m[g]=(u??m)[g];return m}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return s.reducer(u,p)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new So;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let u=s,p=i[u];return p?(...m)=>{let g=p(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[u]: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 ko=class{static format(t,o,n,a,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,o,n,a,!!i)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var zo=L(T()),_f="ft-app-info",cr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};cr.eventName="authentication-change";var Ur=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ur.eventName="ui-locale-changed";var Nf={session:(e,t)=>{(0,zo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>z.dispatchEvent(new cr(t.payload)),0))}},z=zo.FtReduxStore.get({name:_f,reducers:Nf,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var w2=L(T()),To=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},qm=(0,w2.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(z)}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=>ko.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return To([(0,Ra.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),To([(0,Ra.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),To([oa({store:z.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),To([oa({store:z.name})],t.prototype,"uiLocale",void 0),t});var _2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(_2||(_2={}));var N2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(N2||(N2={}));var M2;(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"})(M2||(M2={}));var k2;(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"})(k2||(k2={}));var z2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(z2||(z2={}));var T2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(T2||(T2={}));var I2;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(I2||(I2={}));var P2;(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"})(P2||(P2={}));var D2;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(D2||(D2={}));var U2;(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"})(U2||(U2={}));var B2;(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"})(B2||(B2={}));var G2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(G2||(G2={}));var F2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(F2||(F2={}));var H2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(H2||(H2={}));var $2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})($2||($2={}));var W2;(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"})(W2||(W2={}));var j2;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(j2||(j2={}));var V2;(function(e){e.ASC="ASC",e.DESC="DESC"})(V2||(V2={}));var K2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(K2||(K2={}));var Z2;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Z2||(Z2={}));var q2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(q2||(q2={}));var Y2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Y2||(Y2={}));var X2;(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"})(X2||(X2={}));var Q2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Q2||(Q2={}));var J2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(J2||(J2={}));var e1;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(e1||(e1={}));var t1;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(t1||(t1={}));var H;(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"})(H||(H={}));var he;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(he||(he={}));var r1;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(r1||(r1={}));var o1;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(o1||(o1={}));var n1;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(n1||(n1={}));var a1;(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.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(a1||(a1={}));var i1;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(i1||(i1={}));var s1;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(s1||(s1={}));var c1;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(c1||(c1={}));var l1;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(l1||(l1={}));var d1;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(d1||(d1={}));var u1;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(u1||(u1={}));var f1;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(f1||(f1={}));var p1;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(p1||(p1={}));var Mf={[H.PERSONAL_BOOK_SHARE_USER]:[H.PERSONAL_BOOK_USER],[H.HTML_EXPORT_USER]:[H.PERSONAL_BOOK_USER],[H.PDF_EXPORT_USER]:[H.PERSONAL_BOOK_USER],[H.KHUB_ADMIN]:[H.CONTENT_PUBLISHER],[H.ADMIN]:[H.KHUB_ADMIN,H.USERS_ADMIN,H.PORTAL_ADMIN,H.BEHAVIOR_DATA_USER],[H.GENERATIVE_AI_EXPORT_USER]:[H.GENERATIVE_AI_USER]};function h1(e,t){return e===t||(Mf[e]??[]).some(o=>h1(o,t))}function m1(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=>h1(n,t))}var Bo=L(T());var wa=L(T());var Et=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=z.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=z.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var lr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Et.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Et.await()}};var ie=class extends lr{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new wa.CacheRegistry,this.cache=t?a.commonCache:new wa.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Io=class extends ie{async listMySearches(){let{session:t}=z.getState();return m1(t,H.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Po=class extends ie{async listMyBookmarks(){let t=z.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Do=class extends ie{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=z.getState().session;return!!t?.sessionAuthenticated}};var Uo=class extends ie{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=z.getState().session;return!!t?.sessionAuthenticated}};var kf="ft-user-assets",zf={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(he).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;Na(e,o,[..._a(e,o),a]),g1(e,o,1,n),y1(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;Na(e,o,_a(e,o).map(a=>a.id===n.id?n:a)),y1(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;Na(e,o,_a(e,o).filter(i=>i.id!==a)),g1(e,o,-1,n)}},b1={[he.SEARCHES]:"savedSearches",[he.BOOKMARKS]:"bookmarks",[he.BOOKS]:void 0,[he.COLLECTIONS]:void 0},_a=(e,t)=>{var o;let n=b1[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},Na=(e,t,o)=>{let n=b1[t];n&&(e[n]=o)},g1=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===he.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},y1=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},X=Bo.FtReduxStore.get({name:kf,reducers:zf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(he).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ma=class{constructor(t=new Do,o=new Uo){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Po,this.savedSearchesService=new Io,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=z.getState();(0,Bo.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),X.actions.clearAssetCount(),X.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),X.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),X.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();X.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();X.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&X.getState().assetCounts.allAsset[t]!==o.count&&X.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&X.getState().assetCounts.bookmarkByMap[t]!==o.count&&X.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(X.getState().assetCounts.bookmarkByMap).length!==0;t===he.BOOKMARKS&&o&&X.actions.clearBookmarkCountByMap(),X.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;X.actions.bookmarks(o)}}},Tf=new Ma;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Tf);var ka=class{addCommand(t,o=!1){z.commands.add(t,o)}consumeCommand(t){return z.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ka;var me=L(T());var v1,dr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},If=Symbol("clearAfterUnitTest"),Go=class extends(0,me.withEventBus)(ie){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[v1]=()=>{this.defaultMessages={},this.cache=new me.CacheRegistry,this.listeners={}},this.currentUiLocale=z.getState().uiLocale,z.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=z.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,me.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new me.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(a){!(a instanceof me.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new dr({loadedContexts:t})),this.dispatchEvent(new dr({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new dr({loadedContexts:[t]})),this.dispatchEvent(new dr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,me.delay)(0).then(()=>n()).catch(()=>null)))}};v1=If;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Go{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Go{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Br=window.FluidTopicsI18nService,za=window.FluidTopicsCustomI18nService;var x1=L(T()),Ta=class{highlightHtml(t,o,n){(0,x1.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Ta;var S1=L(T());var Ia=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=z.getState().metadataConfiguration)===null||o===void 0?void 0:o.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,o){var n,a,i,s;if(t==null)return"";try{return S1.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:z.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1,(s=o?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new Ia;var C1=L(T());var Gr=class{static get(t,o){var n,a;let i=z.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 C1.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var Pa=class{urlToSearchRequest(t){return Gr.get().parse(t)}searchRequestToUrl(t){return Gr.get().serialize(t)}};window.FluidTopicsUrlService=new Pa;var We=L(T());var At=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};At.eventName="change";var Da=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},E1=new Da;var Fo=class e extends We.WithEventBus{static build(){return new e(window.history,E1,()=>window.location,!1)}constructor(t,o,n,a){var i,s;super(),this.history=t,this.historyStorage=o,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,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,We.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new At(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[i,s,l])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(At.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(At.eventName,t)}currentItem(){return(0,We.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,We.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,We.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,We.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let 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,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let a=o??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=Fo.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var A1=L(W());var L1=A1.css`
1030
1030
  `;var w1=L(W()),se=L(Y()),Rt=L(T());var Lt=L(T());function O1(e,t){let{authenticationRequired:o,session:n}=z.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Ho=class extends lr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Ua=class e extends Lt.FtStateManager{static build(t){return new e(z,t)}constructor(t,o){super(),this.store=t,this.cache=new Lt.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new Ho,this.cleanSessionDebouncer=new Lt.Debouncer,this.reloadDebouncer=new Lt.Debouncer(500),this.apiProvider=o??(()=>Et.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(cr.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},o.idleTimeoutInMillis),o});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let o=await this.cache.get("availableContentLocales",()=>O1(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=o.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){var o,n,a,i,s;this.localesConfiguration=t,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((o=this.localesConfiguration.availableUiLocales)!==null&&o!==void 0?o:[]),this.store.actions.searchInAllLanguagesAllowed((n=this.localesConfiguration.allLanguagesAllowed)!==null&&n!==void 0?n:!1),this.store.actions.searchLanguageSetsUiLanguage((a=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&a!==void 0?a:!1),this.store.actions.uiLanguageSetsSearchLanguage((i=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&i!==void 0?i:!1),this.store.actions.uiLanguageSetsReaderLanguage((s=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&s!==void 0?s:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(o=>{o.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ur(o)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},R1=Ua.build();var Ot=class extends Event{constructor(t,o,n,a){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=o,this.callback=n,this.subscribe=a??!1}};var Fr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let o=this.pendingContextRequests.get(t.context);if(o===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=o;for(let{elementRef:a,callbackRef:i}of n){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new Ot(t.context,s,l,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let o=t.contextTarget??t.composedPath()[0],n=t.callback,a=this.pendingContextRequests.get(t.context);a===void 0&&this.pendingContextRequests.set(t.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(o);i===void 0&&a.callbacks.set(o,i=new WeakSet),i.has(n)||(i.add(n),a.requests.push({elementRef:new WeakRef(o),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var q=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},G=class extends Rt.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=R1,this.contextRoot=new Fr}render(){return w1.html`
1031
1031
  <slot></slot>
1032
1032
  `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var o;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Br.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((o=this.stateManager)===null||o===void 0||o.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};G.elementDefinitions={};G.styles=L1;q([(0,se.property)()],G.prototype,"baseUrl",void 0);q([(0,se.property)()],G.prototype,"apiIntegrationIdentifier",void 0);q([(0,se.property)()],G.prototype,"apiIntegrationAppVersion",void 0);q([(0,se.property)()],G.prototype,"uiLocale",void 0);q([(0,Rt.jsonProperty)(null)],G.prototype,"availableUiLocales",void 0);q([(0,Rt.jsonProperty)(null)],G.prototype,"metadataConfiguration",void 0);q([(0,se.property)({type:Boolean})],G.prototype,"editorMode",void 0);q([(0,se.property)({type:Boolean})],G.prototype,"noCustom",void 0);q([(0,se.property)({type:Boolean})],G.prototype,"openExternalDocumentInNewTab",void 0);q([(0,se.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],G.prototype,"noCustomComponent",void 0);q([(0,se.property)({type:Boolean})],G.prototype,"withManualResources",void 0);q([(0,se.property)({type:Boolean})],G.prototype,"navigatorOnline",void 0);q([(0,se.property)({type:Boolean})],G.prototype,"forcedOffline",void 0);q([(0,se.property)({type:Boolean})],G.prototype,"authenticationRequired",void 0);q([(0,Rt.jsonProperty)([])],G.prototype,"messageContexts",void 0);q([(0,Rt.jsonProperty)(void 0)],G.prototype,"session",void 0);var N1=L(T());var _1={"ft-app-context":G};(0,N1.customElements)(_1);var M1=L(Y());var Ba=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[o,n]=t.split(".");return{context:o,key:n,custom:o!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},ur=new Ba;var Uf=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},$r=Symbol("i18nAttributes"),k1=Symbol("i18nListAttributes"),z1=Symbol("i18nProperties"),$o=Symbol("i18nContexts"),Hr=Symbol("i18nUnsubs"),T1=(0,fr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?za:Br}i18n(i){let{context:s,key:l,message:u}=i,{custom:p,args:m,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let y=m??(g?g(this):[]);return this.getI18nService(p).resolveMessage(s,l,...y)}return u}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(ur.isI18nKey(i)){let[l,u]=i.split(".");return this.i18n({custom:!0,context:l,key:u,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,u)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let u=this,p=(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[$r])===null||s===void 0||s.forEach((m,g)=>u[g]=p(m,g,u[g])),(l=this[k1])===null||l===void 0||l.forEach((m,g)=>{var y;return u[g]=(y=u[g])===null||y===void 0?void 0:y.map(b=>p(m,g,b))})}updateI18nProperties(i){var s;(s=this[z1])===null||s===void 0||s.forEach((l,u)=>{i(l,u)&&(this[u]=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 u=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[$o].set(u,{isCustomContext:l}),this[Hr].has(u)||this[Hr].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,s)}hasI18nContext(i){return this[$o].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[$o].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Hr].forEach(i=>i()),this[Hr].clear()}}return t=$o,o=Hr,Uf([(0,M1.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Wo=class extends T1(fr.FtLitElement){},jo=class extends T1(fr.FtLitElementRedux){};var I1=L(T());var Ga=class{fromAttribute(t){if(!t)return[];try{let o=JSON.parse(t);return Array.isArray(o)?o.map(n=>typeof n=="string"?ur.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Bf=new Ga;var P1=(e,t)=>(o,n)=>{var a;o.constructor.createProperty(n,{type:Object,hasChanged:I1.hasChanged,converter:ur,...t}),o[$r]=(a=o[$r])!==null&&a!==void 0?a:new Map,o[$r].set(n,e??{})};var D1=L(W());var U1=D1.css`
@@ -44,7 +44,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
44
44
  input::-webkit-search-results-decoration {
45
45
  display: none;
46
46
  }
47
- `;var pl={};var fi={};H(fi,{ParametrizedLabelResolver:()=>fo});var fo=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 zi={};H(zi,{FtCommandQueue:()=>po,FtLitElementRedux:()=>zt,FtReduxStore:()=>Ft,FtStateManager:()=>bo,ReduxWatcher:()=>sn,clearAllStores:()=>Vu,isFtReduxStore:()=>ur,redux:()=>dr,reduxEventListener:()=>lu,reduxReactive:()=>cu,watch:()=>Ku,withRedux:()=>hl});var cu=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},dr=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:qe,attribute:!1,...e};R(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})}},lu=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var po=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 ur(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ho=Symbol("internalReduxEventsUnsubscribers"),ut=Symbol("internalStoresUnsubscribers"),Pt=Symbol("internalStores"),hl=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[Pt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Pt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Pt].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Pt].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Pt].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Pt].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 u=this.getStore(s.store);u&&(s.store?this[ut].has(s.store):this[ut].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[ut].set(s,c.subscribe(()=>this.updateFromStores())),this[ho].set(s,[]),ur(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||c.name===u.store)){let h=y=>this[m](y);c.addEventListener(u.eventName,h),this[ho].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ut].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[ut].has(s)&&this[ut].get(s)(),this[ut].delete(s),(c=this[ho].get(s))===null||c===void 0||c.forEach(d=>d()),this[ho].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=ut,r=Pt,o=ho,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),zt=class extends hl(G){};function Re(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 Je(t){return!!t&&!!t[Z]}function ke(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)===yu})(t)||Array.isArray(t)||!!t[Sl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Sl])||Si(t)||Ei(t))}function Dt(t,e,r){r===void 0&&(r=!1),hr(t)===0?(r?Object.keys:pr)(t).forEach((function(o){r&&typeof o=="symbol"||e(o,t[o],t)})):t.forEach((function(o,a){return e(a,o,t)}))}function hr(t){var e=t[Z];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Si(t)?2:Ei(t)?3:0}function fr(t,e){return hr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function du(t,e){return hr(t)===2?t.get(e):t[e]}function El(t,e,r){var o=hr(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function Cl(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Si(t){return mu&&t instanceof Map}function Ei(t){return gu&&t instanceof Set}function ft(t){return t.o||t.t}function Ci(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Ol(t);delete e[Z];for(var r=pr(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 Ai(t,e){return e===void 0&&(e=!1),Li(t)||Je(t)||!ke(t)||(hr(t)>1&&(t.set=t.add=t.clear=t.delete=uu),Object.freeze(t),e&&Dt(t,(function(r,o){return Ai(o,!0)}),!0)),t}function uu(){Re(2)}function Li(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ve(t){var e=xi[t];return e||Re(18,t),e}function fu(t,e){xi[t]||(xi[t]=e)}function yi(){return go}function pi(t,e){e&&(Ve("Patches"),t.u=[],t.s=[],t.v=e)}function tn(t){bi(t),t.p.forEach(pu),t.p=null}function bi(t){t===go&&(go=t.l)}function ml(t){return go={p:[],l:go,h:t,m:!0,_:0}}function pu(t){var e=t[Z];e.i===0||e.i===1?e.j():e.g=!0}function hi(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||Ve("ES5").S(e,t,o),o?(r[Z].P&&(tn(e),Re(4)),ke(t)&&(t=rn(e,t),e.l||on(e,t)),e.u&&Ve("Patches").M(r[Z].t,t,e.u,e.s)):t=rn(e,r,[]),tn(e),e.u&&e.v(e.u,e.s),t!==Ll?t:void 0}function rn(t,e,r){if(Li(e))return e;var o=e[Z];if(!o)return Dt(e,(function(c,d){return gl(t,o,e,c,d,r)}),!0),e;if(o.A!==t)return e;if(!o.P)return on(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Ci(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Dt(i,(function(c,d){return gl(t,o,a,c,d,r,s)})),on(t,a,!1),r&&t.u&&Ve("Patches").N(o,r,t.u,t.s)}return o.o}function gl(t,e,r,o,a,i,s){if(Je(a)){var c=rn(t,a,i&&e&&e.i!==3&&!fr(e.R,o)?i.concat(o):void 0);if(El(r,o,c),!Je(c))return;t.m=!1}else s&&r.add(a);if(ke(a)&&!Li(a)){if(!t.h.D&&t._<1)return;rn(t,a),e&&e.A.l||on(t,a)}}function on(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Ai(e,r)}function mi(t,e){var r=t[Z];return(r?ft(r):t)[e]}function yl(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 pt(t){t.P||(t.P=!0,t.l&&pt(t.l))}function gi(t){t.o||(t.o=Ci(t.t))}function vi(t,e,r){var o=Si(e)?Ve("MapSet").F(e,r):Ei(e)?Ve("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:yi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,u=yo;s&&(d=[c],u=mo);var m=Proxy.revocable(d,u),h=m.revoke,y=m.proxy;return c.k=y,c.j=h,y})(e,r):Ve("ES5").J(e,r);return(r?r.A:yi()).p.push(o),o}function hu(t){return Je(t)||Re(22,t),(function e(r){if(!ke(r))return r;var o,a=r[Z],i=hr(r);if(a){if(!a.P&&(a.i<4||!Ve("ES5").K(a)))return a.t;a.I=!0,o=bl(r,i),a.I=!1}else o=bl(r,i);return Dt(o,(function(s,c){a&&du(a.t,s)===c||El(o,s,e(c))})),i===3?new Set(o):o})(t)}function bl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ci(t)}function Al(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var u=this[Z];return yo.get(u,s)},set:function(u){var m=this[Z];yo.set(m,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][Z];if(!d.P)switch(d.i){case 5:o(d)&&pt(d);break;case 4:r(d)&&pt(d)}}}function r(s){for(var c=s.t,d=s.k,u=pr(d),m=u.length-1;m>=0;m--){var h=u[m];if(h!==Z){var y=c[h];if(y===void 0&&!fr(c,h))return!0;var b=d[h],v=b&&b[Z];if(v?v.t!==y:!Cl(b,y))return!0}}var S=!!c[Z];return u.length!==pr(c).length+(S?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 u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&Re(3,JSON.stringify(ft(s)))}var i={};fu("ES5",{J:function(s,c){var d=Array.isArray(s),u=(function(h,y){if(h){for(var b=Array(y.length),v=0;v<y.length;v++)Object.defineProperty(b,""+v,t(v,!0));return b}var S=Ol(y);delete S[Z];for(var A=pr(S),L=0;L<A.length;L++){var w=A[L];S[w]=t(w,h||!!S[w].enumerable)}return Object.create(Object.getPrototypeOf(y),S)})(d,s),m={i:d?5:4,A:c?c.A:yi(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,Z,{value:m,writable:!0}),u},S:function(s,c,d){d?Je(c)&&c[Z].A===s&&e(s.p):(s.u&&(function u(m){if(m&&typeof m=="object"){var h=m[Z];if(h){var y=h.t,b=h.k,v=h.R,S=h.i;if(S===4)Dt(b,(function(x){x!==Z&&(y[x]!==void 0||fr(y,x)?v[x]||u(b[x]):(v[x]=!0,pt(h)))})),Dt(y,(function(x){b[x]!==void 0||fr(b,x)||(v[x]=!1,pt(h))}));else if(S===5){if(o(h)&&(pt(h),v.length=!0),b.length<y.length)for(var A=b.length;A<y.length;A++)v[A]=!1;else for(var L=y.length;L<b.length;L++)v[L]=!0;for(var w=Math.min(b.length,y.length),E=0;E<w;E++)b.hasOwnProperty(E)||(v[E]=!0),v[E]===void 0&&u(b[E])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var vl,go,Oi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",mu=typeof Map<"u",gu=typeof Set<"u",xl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ll=Oi?Symbol.for("immer-nothing"):((vl={})["immer-nothing"]=!0,vl),Sl=Oi?Symbol.for("immer-draftable"):"__$immer_draftable",Z=Oi?Symbol.for("immer-state"):"__$immer_state";var yu=""+Object.prototype.constructor,pr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ol=Object.getOwnPropertyDescriptors||function(t){var e={};return pr(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},xi={},yo={get:function(t,e){if(e===Z)return t;var r=ft(t);if(!fr(r,e))return(function(a,i,s){var c,d=yl(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||!ke(o)?o:o===mi(t.t,e)?(gi(t),t.o[e]=vi(t.A.h,o,t)):o},has:function(t,e){return e in ft(t)},ownKeys:function(t){return Reflect.ownKeys(ft(t))},set:function(t,e,r){var o=yl(ft(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=mi(ft(t),e),i=a?.[Z];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Cl(r,a)&&(r!==void 0||fr(t.t,e)))return!0;gi(t),pt(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 mi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,gi(t),pt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=ft(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){Re(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Re(12)}},mo={};Dt(yo,(function(t,e){mo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),mo.deleteProperty=function(t,e){return mo.set.call(this,t,e,void 0)},mo.set=function(t,e,r){return yo.set.call(this,t[0],e,r,t[0])};var bu=(function(){function t(r){var o=this;this.O=xl,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(S){var A=this;S===void 0&&(S=c);for(var L=arguments.length,w=Array(L>1?L-1:0),E=1;E<L;E++)w[E-1]=arguments[E];return d.produce(S,(function(x){var C;return(C=i).call.apply(C,[A,x].concat(w))}))}}var u;if(typeof i!="function"&&Re(6),s!==void 0&&typeof s!="function"&&Re(7),ke(a)){var m=ml(o),h=vi(o,a,void 0),y=!0;try{u=i(h),y=!1}finally{y?tn(m):bi(m)}return typeof Promise<"u"&&u instanceof Promise?u.then((function(S){return pi(m,s),hi(S,m)}),(function(S){throw tn(m),S})):(pi(m,s),hi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Ll&&(u=void 0),o.D&&Ai(u,!0),s){var b=[],v=[];Ve("Patches").M(a,u,b,v),s(b,v)}return u}Re(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,h=Array(m>1?m-1:0),y=1;y<m;y++)h[y-1]=arguments[y];return o.produceWithPatches(u,(function(b){return a.apply(void 0,[b].concat(h))}))};var s,c,d=o.produce(a,i,(function(u,m){s=u,c=m}));return typeof Promise<"u"&&d instanceof Promise?d.then((function(u){return[u,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){ke(r)||Re(8),Je(r)&&(r=hu(r));var o=ml(this),a=vi(this,r,void 0);return a[Z].C=!0,bi(o),a},e.finishDraft=function(r,o){var a=r&&r[Z],i=a.A;return pi(i,o),hi(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!xl&&Re(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=Ve("Patches").$;return Je(r)?s(r,o):this.produce(r,(function(c){return s(c,o)}))},t})(),ve=new bu,vu=ve.produce,wg=ve.produceWithPatches.bind(ve),_g=ve.setAutoFreeze.bind(ve),Ng=ve.setUseProxies.bind(ve),Mg=ve.applyPatches.bind(ve),Tg=ve.createDraft.bind(ve),kg=ve.finishDraft.bind(ve),nn=vu;function Ut(t){"@babel/helpers - typeof";return Ut=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},Ut(t)}function Rl(t,e){if(Ut(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Ut(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wl(t){var e=Rl(t,"string");return Ut(e)=="symbol"?e:e+""}function _l(t,e,r){return(e=wl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nl(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 Ri(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nl(Object(r),!0).forEach(function(o){_l(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nl(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function ce(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 Ml=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),wi=function(){return Math.random().toString(36).substring(7).split("").join(".")},an={INIT:"@@redux/INIT"+wi(),REPLACE:"@@redux/REPLACE"+wi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+wi()}};function xu(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 _i(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ce(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ce(1));return r(_i)(t,e)}if(typeof t!="function")throw new Error(ce(2));var a=t,i=e,s=[],c=s,d=!1;function u(){c===s&&(c=s.slice())}function m(){if(d)throw new Error(ce(3));return i}function h(S){if(typeof S!="function")throw new Error(ce(4));if(d)throw new Error(ce(5));var A=!0;return u(),c.push(S),function(){if(A){if(d)throw new Error(ce(6));A=!1,u();var w=c.indexOf(S);c.splice(w,1),s=null}}}function y(S){if(!xu(S))throw new Error(ce(7));if(typeof S.type>"u")throw new Error(ce(8));if(d)throw new Error(ce(9));try{d=!0,i=a(i,S)}finally{d=!1}for(var A=s=c,L=0;L<A.length;L++){var w=A[L];w()}return S}function b(S){if(typeof S!="function")throw new Error(ce(10));a=S,y({type:an.REPLACE})}function v(){var S,A=h;return S={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(ce(11));function E(){w.next&&w.next(m())}E();var x=A(E);return{unsubscribe:x}}},S[Ml]=function(){return this},S}return y({type:an.INIT}),o={dispatch:y,subscribe:h,getState:m,replaceReducer:b},o[Ml]=v,o}function Su(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:an.INIT});if(typeof o>"u")throw new Error(ce(12));if(typeof r(void 0,{type:an.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ce(13))})}function Tl(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{Su(r)}catch(d){c=d}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var h;for(var y=!1,b={},v=0;v<i.length;v++){var S=i[v],A=r[S],L=u[S],w=A(L,m);if(typeof w>"u"){var E=m&&m.type;throw new Error(ce(14))}b[S]=w,y=y||w!==L}return y=y||i.length!==Object.keys(u).length,y?b:u}}function mr(){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 kl(){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(ce(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=mr.apply(void 0,c)(a.dispatch),Ri(Ri({},a),{},{dispatch:i})}}}function Il(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 Pl=Il();Pl.withExtraArgument=Il;var Ni=Pl;var Bl=(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)}})(),Eu=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(u){return function(m){return d([u,m])}}function d(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=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=e.call(t,r)}catch(m){u=[6,m],a=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},gr=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},Cu=Object.defineProperty,Au=Object.defineProperties,Lu=Object.getOwnPropertyDescriptors,zl=Object.getOwnPropertySymbols,Ou=Object.prototype.hasOwnProperty,Ru=Object.prototype.propertyIsEnumerable,Dl=function(t,e,r){return e in t?Cu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},ht=function(t,e){for(var r in e||(e={}))Ou.call(e,r)&&Dl(t,r,e[r]);if(zl)for(var o=0,a=zl(e);o<a.length;o++){var r=a[o];Ru.call(e,r)&&Dl(t,r,e[r])}return t},Mi=function(t,e){return Au(t,Lu(e))},wu=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(u){a(u)}},s=function(d){try{c(r.throw(d))}catch(u){a(u)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var _u=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?mr:mr.apply(null,arguments)},Xg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Nu(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function mt(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 ht(ht({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}var Mu=(function(t){Bl(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,gr([void 0],r[0].concat(this)))):new(e.bind.apply(e,gr([void 0],r.concat(this))))},e})(Array),Tu=(function(t){Bl(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,gr([void 0],r[0].concat(this)))):new(e.bind.apply(e,gr([void 0],r.concat(this))))},e})(Array);function Ii(t){return ke(t)?nn(t,function(){}):t}function ku(t){return typeof t=="boolean"}function Iu(){return function(e){return Pu(e)}}function Pu(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=t.actionCreatorCheck,d=c===void 0?!0:c,u=new Mu;if(r&&(ku(r)?u.push(Ni):u.push(Ni.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var h;if(d)var y}return u}var Ti=!0;function Hl(t){var e=Iu(),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,u=r.preloadedState,m=u===void 0?void 0:u,h=r.enhancers,y=h===void 0?void 0:h,b;if(typeof a=="function")b=a;else if(Nu(a))b=Tl(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 v=s;if(typeof v=="function"&&(v=v(e),!Ti&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ti&&v.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=kl.apply(void 0,v),A=mr;d&&(A=_u(ht({trace:!Ti},typeof d=="object"&&d)));var L=new Tu(S),w=L;Array.isArray(y)?w=gr([S],y):typeof y=="function"&&(w=y(L));var E=A.apply(void 0,w);return _i(b,m,E)}function $l(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(!c)throw new Error("`builder.addCase` cannot be called with an empty action type");if(c in e)throw new Error("`builder.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 zu(t){return typeof t=="function"}function Du(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?$l(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(zu(t))d=function(){return Ii(t())};else{var u=Ii(t);d=function(){return u}}function m(h,y){h===void 0&&(h=d());var b=gr([i[y.type]],s.filter(function(v){var S=v.matcher;return S(y)}).map(function(v){var S=v.reducer;return S}));return b.filter(function(v){return!!v}).length===0&&(b=[c]),b.reduce(function(v,S){if(S)if(Je(v)){var A=v,L=S(A,y);return L===void 0?v:L}else{if(ke(v))return nn(v,function(w){return S(w,y)});var L=S(v,y);if(L===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return L}return v},h)}return m.getInitialState=d,m}function Uu(t,e){return t+"/"+e}function Gl(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:Ii(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(m){var h=o[m],y=Uu(e,m),b,v;"reducer"in h?(b=h.reducer,v=h.prepare):b=h,i[m]=b,s[y]=b,c[m]=v?mt(y,v):mt(y)});function d(){var m=typeof t.extraReducers=="function"?$l(t.extraReducers):[t.extraReducers],h=m[0],y=h===void 0?{}:h,b=m[1],v=b===void 0?[]:b,S=m[2],A=S===void 0?void 0:S,L=ht(ht({},y),s);return Du(r,function(w){for(var E in L)w.addCase(E,L[E]);for(var x=0,C=v;x<C.length;x++){var _=C[x];w.addMatcher(_.matcher,_.reducer)}A&&w.addDefaultCase(A)})}var u;return{name:e,reducer:function(m,h){return u||(u=d()),u(m,h)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var Fu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Bu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Fu[Math.random()*64|0];return e},Hu=["name","message","stack","code"],ki=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Ul=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),$u=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Hu;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},t9=(function(){function t(e,r,o){var a=mt(e+"/fulfilled",function(m,h,y,b){return{payload:m,meta:Mi(ht({},b||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),i=mt(e+"/pending",function(m,h,y){return{payload:void 0,meta:Mi(ht({},y||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=mt(e+"/rejected",function(m,h,y,b,v){return{payload:b,error:(o&&o.serializeError||$u)(m||"Rejected"),meta:Mi(ht({},v||{}),{arg:y,requestId:h,rejectedWithValue:!!b,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,d=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(h,y,b){var v=o?.idGenerator?o.idGenerator(m):Bu(),S=new d,A,L=!1;function w(x){A=x,S.abort()}var E=(function(){return wu(this,null,function(){var x,C,_,z,V,B,M;return Eu(this,function(I){switch(I.label){case 0:return I.trys.push([0,4,,5]),z=(x=o?.condition)==null?void 0:x.call(o,m,{getState:y,extra:b}),Wu(z)?[4,z]:[3,2];case 1:z=I.sent(),I.label=2;case 2:if(z===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return L=!0,V=new Promise(function($,Q){return S.signal.addEventListener("abort",function(){return Q({name:"AbortError",message:A||"Aborted"})})}),h(i(v,m,(C=o?.getPendingMeta)==null?void 0:C.call(o,{requestId:v,arg:m},{getState:y,extra:b}))),[4,Promise.race([V,Promise.resolve(r(m,{dispatch:h,getState:y,extra:b,requestId:v,signal:S.signal,abort:w,rejectWithValue:function($,Q){return new ki($,Q)},fulfillWithValue:function($,Q){return new Ul($,Q)}})).then(function($){if($ instanceof ki)throw $;return $ instanceof Ul?a($.payload,v,m,$.meta):a($,v,m)})])];case 3:return _=I.sent(),[3,5];case 4:return B=I.sent(),_=B instanceof ki?s(null,v,m,B.payload,B.meta):s(B,v,m),[3,5];case 5:return M=o&&!o.dispatchConditionRejection&&s.match(_)&&_.meta.condition,M||h(_),[2,_]}})})})();return Object.assign(E,{abort:w,requestId:v,arg:m,unwrap:function(){return E.then(Gu)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function Gu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Wu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Wl="listener",jl="completed",Vl="cancelled",r9="task-"+Vl,o9="task-"+jl,n9=Wl+"-"+Vl,a9=Wl+"-"+jl;var Pi="listenerMiddleware";var i9=mt(Pi+"/add"),s9=mt(Pi+"/removeAll"),c9=mt(Pi+"/remove");var Fl,l9=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Fl||(Fl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},ju=function(t){return function(e){setTimeout(e,t)}},d9=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ju(10);Al();window.ftReduxStores||(window.ftReduxStores={});var Ft=class t extends Ye{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(ur(i))return i;if(a==null)return;let s=Gl({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=Hl({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=Me(s.getInitialState());for(let h of u.keeping)m[h]=(d??m)[h];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...u.overwrites};return s.reducer(d,u)}});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 po;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,u=i[d];return u?(...m)=>{let h=u(...m.map(a));return this.reduxStore.dispatch(h),h}:m=>{this.setState({[d]:a(m)})}}}),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 Vu(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))ur(e)&&e.clear()}var sn=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);qe(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 Ku(t,e,r){return new sn(t,e,r).watch()}var bo=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 Fi={};H(Fi,{scrollHelper:()=>Zu});var Di,cn=new Map,Ui=class{lock(e,r){if(r){let o=cn.get(r);if(o==null||o===e)return cn.set(r,e),r}}release(e,r){r&&cn.get(r)===e&&cn.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of ca(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=Rt(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=(Di=window.FluidTopicsScrollHelper)!==null&&Di!==void 0?Di:new Ui;var Zu=window.FluidTopicsScrollHelper;var Hi={};H(Hi,{SearchPlaceConverter:()=>vr,SearchPlaceQueryParams:()=>F,isSearchPlaceQueryParams:()=>I1,serializeRequest:()=>Xu});var Kl;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Kl||(Kl={}));var Zl;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Zl||(Zl={}));var ql;(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"})(ql||(ql={}));var Yl;(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"})(Yl||(Yl={}));var Xl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Xl||(Xl={}));var Jl;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Jl||(Jl={}));var Ql;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Ql||(Ql={}));var e1;(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"})(e1||(e1={}));var t1;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(t1||(t1={}));var r1;(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"})(r1||(r1={}));var o1;(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"})(o1||(o1={}));var n1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(n1||(n1={}));var a1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(a1||(a1={}));var i1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(i1||(i1={}));var s1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(s1||(s1={}));var c1;(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"})(c1||(c1={}));var yr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(yr||(yr={}));var l1;(function(t){t.ASC="ASC",t.DESC="DESC"})(l1||(l1={}));var d1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(d1||(d1={}));var Bi;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Bi||(Bi={}));var b1=t=>Object.keys(Bi).includes(t);var u1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(u1||(u1={}));var f1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(f1||(f1={}));var p1;(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"})(p1||(p1={}));var br;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(br||(br={}));var v1=t=>Object.keys(br).includes(t);var h1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(h1||(h1={}));var m1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(m1||(m1={}));var g1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(g1||(g1={}));var J;(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"})(J||(J={}));var we;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(we||(we={}));var y1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(y1||(y1={}));var x1;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(x1||(x1={}));var S1;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(S1||(S1={}));var E1;(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"})(E1||(E1={}));var C1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(C1||(C1={}));var A1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(A1||(A1={}));var L1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(L1||(L1={}));var O1;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(O1||(O1={}));var R1;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(R1||(R1={}));var w1;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(w1||(w1={}));var _1;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(_1||(_1={}));var N1;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(N1||(N1={}));var qu={[J.PERSONAL_BOOK_SHARE_USER]:[J.PERSONAL_BOOK_USER],[J.HTML_EXPORT_USER]:[J.PERSONAL_BOOK_USER],[J.PDF_EXPORT_USER]:[J.PERSONAL_BOOK_USER],[J.KHUB_ADMIN]:[J.CONTENT_PUBLISHER],[J.ADMIN]:[J.KHUB_ADMIN,J.USERS_ADMIN,J.PORTAL_ADMIN,J.BEHAVIOR_DATA_USER],[J.GENERATIVE_AI_EXPORT_USER]:[J.GENERATIVE_AI_USER]};function M1(t,e){return t===e||(qu[t]??[]).some(r=>M1(r,e))}function T1(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=>M1(o,e))}function Yu(t){return`"${t}"`}function k1(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Xu(t,e){return new vr(t).serialize(e)}var F;(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"})(F||(F={}));var Ju=new Set(Object.values(F));function I1(t){return Ju.has(t)}var vr=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,u,m,h,y,b;let v=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&v.append(F.LOCALE,e.contentLocale):v.append(F.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&v.append(F.QUERY,e.query);let S=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(x=>x.valueFilter&&!x.valueFilter.negative))!==null&&i!==void 0?i:[];if(S.length>0){let x=S.map(C=>{var _,z;let V=((z=(_=C.valueFilter)===null||_===void 0?void 0:_.values)!==null&&z!==void 0?z:[]).map(B=>this.escapeFilters(B)).map(B=>Yu(k1(B))).join("_");return`${C.key}~${V}`}).join("*");v.append(F.VALUE_FILTERS,x)}let A=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(x=>x.dateFilter))!==null&&c!==void 0?c:[];if(A.length>0){let x=A.map(C=>{var _;return`${C.key}~${(_=C.dateFilter)===null||_===void 0?void 0:_.type.toLowerCase()}`}).join("*");v.append(F.DATE_FILTERS,x)}let L=(u=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(x=>x.rangeFilter))!==null&&u!==void 0?u:[];if(L.length>0){let x=L.map(C=>{var _,z;return`${C.key}~${(_=C.rangeFilter)===null||_===void 0?void 0:_.from}_${(z=C.rangeFilter)===null||z===void 0?void 0:z.to}`}).join("*");v.append(F.RANGE_FILTERS,x)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&v.append(F.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&v.append(F.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&v.append(F.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((y=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&y!==void 0?y:this.defaultPerPage)!=this.defaultPerPage&&v.append(F.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&v.append(F.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let w=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let x in w)v.append(x,w[x]);let E=new Array;return v.forEach((x,C)=>{E.push(this.encodeQueryString(C)+"="+this.encodeQueryString(x))}),encodeURI(E.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(L){console.warn("Could not decode search request query params, fallback on raw value",L)}let d=new URLSearchParams(e),u=d.get(F.LOCALE)==="all"?void 0:d.get(F.LOCALE),m=((r=d.get(F.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get(F.SORT))===null||o===void 0?void 0:o.toLowerCase(),y=(a=d.get(F.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get(F.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),v=d.get(F.KEYWORD_MATCH),S=v?v.toUpperCase()===yr.MANDATORY?yr.MANDATORY:yr.OPTIONAL:void 0,A={};for(let L of d.keys())I1(L)||(A[L]=d.get(L));return{contentLocale:u??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(F.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[y])!==null&&c!==void 0?c:"DEFAULT",virtualField:b1(m)?m:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Rt(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:S,otherQueryParams:A}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(F.FILTERS)&&(d=this.parseValueFilters((r=e.get(F.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(F.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(F.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(F.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(F.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(F.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(k1).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:br[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.replaceAll(a,r);return e}parseLegacyPeriodFilter(e){if(v1(e))return[{key:"ft:lastEdition",dateFilter:{type:br[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[F.LOCALE,F.FILTERS,F.VALUE_FILTERS,F.DATE_FILTERS,F.RANGE_FILTERS].forEach(a=>{r.searchParams.delete(a)}),r.toString()}static updateLocaleParamInUrl(e,r){let o=new URL(e);return o.searchParams.delete(F.LOCALE),r!==void 0&&o.searchParams.append(F.LOCALE,r),o.toString()}};var Gi={};H(Gi,{toFtFormComponent:()=>Qu});var $i=Symbol("elementInternals"),Qu=re(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[$i].form}constructor(...o){super(o),this[$i]=this.attachInternals()}setFormValue(o){this[$i].setFormValue(o)}}return e});var Wi={};H(Wi,{DateFormatter:()=>Bt});var Bt=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 Vi={};H(Vi,{ALL_KEYS_VALUE:()=>ji,SameWindowStorageEvent:()=>xr});var ji="__all__",xr=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==ji}};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 xr(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 xr(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new xr(ji))}});var Zi={};H(Zi,{FocusMainContentEvent:()=>Ki});var Ki=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var P1={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function ef(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function tf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",ef);document.addEventListener("click",tf);var z1=k`
47
+ `;var pl={};var fi={};H(fi,{ParametrizedLabelResolver:()=>fo});var fo=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 zi={};H(zi,{FtCommandQueue:()=>po,FtLitElementRedux:()=>zt,FtReduxStore:()=>Ft,FtStateManager:()=>bo,ReduxWatcher:()=>sn,clearAllStores:()=>Vu,isFtReduxStore:()=>ur,redux:()=>dr,reduxEventListener:()=>lu,reduxReactive:()=>cu,watch:()=>Ku,withRedux:()=>hl});var cu=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},dr=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:qe,attribute:!1,...e};R(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})}},lu=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var po=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 ur(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ho=Symbol("internalReduxEventsUnsubscribers"),ut=Symbol("internalStoresUnsubscribers"),Pt=Symbol("internalStores"),hl=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[Pt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Pt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Pt].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Pt].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Pt].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Pt].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 u=this.getStore(s.store);u&&(s.store?this[ut].has(s.store):this[ut].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[ut].set(s,c.subscribe(()=>this.updateFromStores())),this[ho].set(s,[]),ur(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||c.name===u.store)){let h=y=>this[m](y);c.addEventListener(u.eventName,h),this[ho].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ut].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[ut].has(s)&&this[ut].get(s)(),this[ut].delete(s),(c=this[ho].get(s))===null||c===void 0||c.forEach(d=>d()),this[ho].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=ut,r=Pt,o=ho,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),zt=class extends hl(G){};function Re(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 Je(t){return!!t&&!!t[Z]}function ke(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)===yu})(t)||Array.isArray(t)||!!t[Sl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Sl])||Si(t)||Ei(t))}function Dt(t,e,r){r===void 0&&(r=!1),hr(t)===0?(r?Object.keys:pr)(t).forEach((function(o){r&&typeof o=="symbol"||e(o,t[o],t)})):t.forEach((function(o,a){return e(a,o,t)}))}function hr(t){var e=t[Z];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Si(t)?2:Ei(t)?3:0}function fr(t,e){return hr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function du(t,e){return hr(t)===2?t.get(e):t[e]}function El(t,e,r){var o=hr(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function Cl(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Si(t){return mu&&t instanceof Map}function Ei(t){return gu&&t instanceof Set}function ft(t){return t.o||t.t}function Ci(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Ol(t);delete e[Z];for(var r=pr(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 Ai(t,e){return e===void 0&&(e=!1),Li(t)||Je(t)||!ke(t)||(hr(t)>1&&(t.set=t.add=t.clear=t.delete=uu),Object.freeze(t),e&&Dt(t,(function(r,o){return Ai(o,!0)}),!0)),t}function uu(){Re(2)}function Li(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ve(t){var e=xi[t];return e||Re(18,t),e}function fu(t,e){xi[t]||(xi[t]=e)}function yi(){return go}function pi(t,e){e&&(Ve("Patches"),t.u=[],t.s=[],t.v=e)}function tn(t){bi(t),t.p.forEach(pu),t.p=null}function bi(t){t===go&&(go=t.l)}function ml(t){return go={p:[],l:go,h:t,m:!0,_:0}}function pu(t){var e=t[Z];e.i===0||e.i===1?e.j():e.g=!0}function hi(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||Ve("ES5").S(e,t,o),o?(r[Z].P&&(tn(e),Re(4)),ke(t)&&(t=rn(e,t),e.l||on(e,t)),e.u&&Ve("Patches").M(r[Z].t,t,e.u,e.s)):t=rn(e,r,[]),tn(e),e.u&&e.v(e.u,e.s),t!==Ll?t:void 0}function rn(t,e,r){if(Li(e))return e;var o=e[Z];if(!o)return Dt(e,(function(c,d){return gl(t,o,e,c,d,r)}),!0),e;if(o.A!==t)return e;if(!o.P)return on(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Ci(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Dt(i,(function(c,d){return gl(t,o,a,c,d,r,s)})),on(t,a,!1),r&&t.u&&Ve("Patches").N(o,r,t.u,t.s)}return o.o}function gl(t,e,r,o,a,i,s){if(Je(a)){var c=rn(t,a,i&&e&&e.i!==3&&!fr(e.R,o)?i.concat(o):void 0);if(El(r,o,c),!Je(c))return;t.m=!1}else s&&r.add(a);if(ke(a)&&!Li(a)){if(!t.h.D&&t._<1)return;rn(t,a),e&&e.A.l||on(t,a)}}function on(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Ai(e,r)}function mi(t,e){var r=t[Z];return(r?ft(r):t)[e]}function yl(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 pt(t){t.P||(t.P=!0,t.l&&pt(t.l))}function gi(t){t.o||(t.o=Ci(t.t))}function vi(t,e,r){var o=Si(e)?Ve("MapSet").F(e,r):Ei(e)?Ve("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:yi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,u=yo;s&&(d=[c],u=mo);var m=Proxy.revocable(d,u),h=m.revoke,y=m.proxy;return c.k=y,c.j=h,y})(e,r):Ve("ES5").J(e,r);return(r?r.A:yi()).p.push(o),o}function hu(t){return Je(t)||Re(22,t),(function e(r){if(!ke(r))return r;var o,a=r[Z],i=hr(r);if(a){if(!a.P&&(a.i<4||!Ve("ES5").K(a)))return a.t;a.I=!0,o=bl(r,i),a.I=!1}else o=bl(r,i);return Dt(o,(function(s,c){a&&du(a.t,s)===c||El(o,s,e(c))})),i===3?new Set(o):o})(t)}function bl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ci(t)}function Al(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var u=this[Z];return yo.get(u,s)},set:function(u){var m=this[Z];yo.set(m,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][Z];if(!d.P)switch(d.i){case 5:o(d)&&pt(d);break;case 4:r(d)&&pt(d)}}}function r(s){for(var c=s.t,d=s.k,u=pr(d),m=u.length-1;m>=0;m--){var h=u[m];if(h!==Z){var y=c[h];if(y===void 0&&!fr(c,h))return!0;var b=d[h],v=b&&b[Z];if(v?v.t!==y:!Cl(b,y))return!0}}var S=!!c[Z];return u.length!==pr(c).length+(S?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 u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&Re(3,JSON.stringify(ft(s)))}var i={};fu("ES5",{J:function(s,c){var d=Array.isArray(s),u=(function(h,y){if(h){for(var b=Array(y.length),v=0;v<y.length;v++)Object.defineProperty(b,""+v,t(v,!0));return b}var S=Ol(y);delete S[Z];for(var A=pr(S),L=0;L<A.length;L++){var w=A[L];S[w]=t(w,h||!!S[w].enumerable)}return Object.create(Object.getPrototypeOf(y),S)})(d,s),m={i:d?5:4,A:c?c.A:yi(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,Z,{value:m,writable:!0}),u},S:function(s,c,d){d?Je(c)&&c[Z].A===s&&e(s.p):(s.u&&(function u(m){if(m&&typeof m=="object"){var h=m[Z];if(h){var y=h.t,b=h.k,v=h.R,S=h.i;if(S===4)Dt(b,(function(x){x!==Z&&(y[x]!==void 0||fr(y,x)?v[x]||u(b[x]):(v[x]=!0,pt(h)))})),Dt(y,(function(x){b[x]!==void 0||fr(b,x)||(v[x]=!1,pt(h))}));else if(S===5){if(o(h)&&(pt(h),v.length=!0),b.length<y.length)for(var A=b.length;A<y.length;A++)v[A]=!1;else for(var L=y.length;L<b.length;L++)v[L]=!0;for(var w=Math.min(b.length,y.length),E=0;E<w;E++)b.hasOwnProperty(E)||(v[E]=!0),v[E]===void 0&&u(b[E])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var vl,go,Oi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",mu=typeof Map<"u",gu=typeof Set<"u",xl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ll=Oi?Symbol.for("immer-nothing"):((vl={})["immer-nothing"]=!0,vl),Sl=Oi?Symbol.for("immer-draftable"):"__$immer_draftable",Z=Oi?Symbol.for("immer-state"):"__$immer_state";var yu=""+Object.prototype.constructor,pr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ol=Object.getOwnPropertyDescriptors||function(t){var e={};return pr(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},xi={},yo={get:function(t,e){if(e===Z)return t;var r=ft(t);if(!fr(r,e))return(function(a,i,s){var c,d=yl(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||!ke(o)?o:o===mi(t.t,e)?(gi(t),t.o[e]=vi(t.A.h,o,t)):o},has:function(t,e){return e in ft(t)},ownKeys:function(t){return Reflect.ownKeys(ft(t))},set:function(t,e,r){var o=yl(ft(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=mi(ft(t),e),i=a?.[Z];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Cl(r,a)&&(r!==void 0||fr(t.t,e)))return!0;gi(t),pt(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 mi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,gi(t),pt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=ft(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){Re(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Re(12)}},mo={};Dt(yo,(function(t,e){mo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),mo.deleteProperty=function(t,e){return mo.set.call(this,t,e,void 0)},mo.set=function(t,e,r){return yo.set.call(this,t[0],e,r,t[0])};var bu=(function(){function t(r){var o=this;this.O=xl,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(S){var A=this;S===void 0&&(S=c);for(var L=arguments.length,w=Array(L>1?L-1:0),E=1;E<L;E++)w[E-1]=arguments[E];return d.produce(S,(function(x){var C;return(C=i).call.apply(C,[A,x].concat(w))}))}}var u;if(typeof i!="function"&&Re(6),s!==void 0&&typeof s!="function"&&Re(7),ke(a)){var m=ml(o),h=vi(o,a,void 0),y=!0;try{u=i(h),y=!1}finally{y?tn(m):bi(m)}return typeof Promise<"u"&&u instanceof Promise?u.then((function(S){return pi(m,s),hi(S,m)}),(function(S){throw tn(m),S})):(pi(m,s),hi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Ll&&(u=void 0),o.D&&Ai(u,!0),s){var b=[],v=[];Ve("Patches").M(a,u,b,v),s(b,v)}return u}Re(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,h=Array(m>1?m-1:0),y=1;y<m;y++)h[y-1]=arguments[y];return o.produceWithPatches(u,(function(b){return a.apply(void 0,[b].concat(h))}))};var s,c,d=o.produce(a,i,(function(u,m){s=u,c=m}));return typeof Promise<"u"&&d instanceof Promise?d.then((function(u){return[u,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){ke(r)||Re(8),Je(r)&&(r=hu(r));var o=ml(this),a=vi(this,r,void 0);return a[Z].C=!0,bi(o),a},e.finishDraft=function(r,o){var a=r&&r[Z],i=a.A;return pi(i,o),hi(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!xl&&Re(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=Ve("Patches").$;return Je(r)?s(r,o):this.produce(r,(function(c){return s(c,o)}))},t})(),ve=new bu,vu=ve.produce,wg=ve.produceWithPatches.bind(ve),_g=ve.setAutoFreeze.bind(ve),Ng=ve.setUseProxies.bind(ve),Mg=ve.applyPatches.bind(ve),Tg=ve.createDraft.bind(ve),kg=ve.finishDraft.bind(ve),nn=vu;function Ut(t){"@babel/helpers - typeof";return Ut=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},Ut(t)}function Rl(t,e){if(Ut(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Ut(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wl(t){var e=Rl(t,"string");return Ut(e)=="symbol"?e:e+""}function _l(t,e,r){return(e=wl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nl(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 Ri(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nl(Object(r),!0).forEach(function(o){_l(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nl(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function ce(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 Ml=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),wi=function(){return Math.random().toString(36).substring(7).split("").join(".")},an={INIT:"@@redux/INIT"+wi(),REPLACE:"@@redux/REPLACE"+wi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+wi()}};function xu(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 _i(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ce(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ce(1));return r(_i)(t,e)}if(typeof t!="function")throw new Error(ce(2));var a=t,i=e,s=[],c=s,d=!1;function u(){c===s&&(c=s.slice())}function m(){if(d)throw new Error(ce(3));return i}function h(S){if(typeof S!="function")throw new Error(ce(4));if(d)throw new Error(ce(5));var A=!0;return u(),c.push(S),function(){if(A){if(d)throw new Error(ce(6));A=!1,u();var w=c.indexOf(S);c.splice(w,1),s=null}}}function y(S){if(!xu(S))throw new Error(ce(7));if(typeof S.type>"u")throw new Error(ce(8));if(d)throw new Error(ce(9));try{d=!0,i=a(i,S)}finally{d=!1}for(var A=s=c,L=0;L<A.length;L++){var w=A[L];w()}return S}function b(S){if(typeof S!="function")throw new Error(ce(10));a=S,y({type:an.REPLACE})}function v(){var S,A=h;return S={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(ce(11));function E(){w.next&&w.next(m())}E();var x=A(E);return{unsubscribe:x}}},S[Ml]=function(){return this},S}return y({type:an.INIT}),o={dispatch:y,subscribe:h,getState:m,replaceReducer:b},o[Ml]=v,o}function Su(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:an.INIT});if(typeof o>"u")throw new Error(ce(12));if(typeof r(void 0,{type:an.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ce(13))})}function Tl(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{Su(r)}catch(d){c=d}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var h;for(var y=!1,b={},v=0;v<i.length;v++){var S=i[v],A=r[S],L=u[S],w=A(L,m);if(typeof w>"u"){var E=m&&m.type;throw new Error(ce(14))}b[S]=w,y=y||w!==L}return y=y||i.length!==Object.keys(u).length,y?b:u}}function mr(){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 kl(){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(ce(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=mr.apply(void 0,c)(a.dispatch),Ri(Ri({},a),{},{dispatch:i})}}}function Il(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 Pl=Il();Pl.withExtraArgument=Il;var Ni=Pl;var Bl=(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)}})(),Eu=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(u){return function(m){return d([u,m])}}function d(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=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=e.call(t,r)}catch(m){u=[6,m],a=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},gr=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},Cu=Object.defineProperty,Au=Object.defineProperties,Lu=Object.getOwnPropertyDescriptors,zl=Object.getOwnPropertySymbols,Ou=Object.prototype.hasOwnProperty,Ru=Object.prototype.propertyIsEnumerable,Dl=function(t,e,r){return e in t?Cu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},ht=function(t,e){for(var r in e||(e={}))Ou.call(e,r)&&Dl(t,r,e[r]);if(zl)for(var o=0,a=zl(e);o<a.length;o++){var r=a[o];Ru.call(e,r)&&Dl(t,r,e[r])}return t},Mi=function(t,e){return Au(t,Lu(e))},wu=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(u){a(u)}},s=function(d){try{c(r.throw(d))}catch(u){a(u)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var _u=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?mr:mr.apply(null,arguments)},Xg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Nu(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function mt(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 ht(ht({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}var Mu=(function(t){Bl(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,gr([void 0],r[0].concat(this)))):new(e.bind.apply(e,gr([void 0],r.concat(this))))},e})(Array),Tu=(function(t){Bl(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,gr([void 0],r[0].concat(this)))):new(e.bind.apply(e,gr([void 0],r.concat(this))))},e})(Array);function Ii(t){return ke(t)?nn(t,function(){}):t}function ku(t){return typeof t=="boolean"}function Iu(){return function(e){return Pu(e)}}function Pu(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=t.actionCreatorCheck,d=c===void 0?!0:c,u=new Mu;if(r&&(ku(r)?u.push(Ni):u.push(Ni.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var h;if(d)var y}return u}var Ti=!0;function Hl(t){var e=Iu(),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,u=r.preloadedState,m=u===void 0?void 0:u,h=r.enhancers,y=h===void 0?void 0:h,b;if(typeof a=="function")b=a;else if(Nu(a))b=Tl(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 v=s;if(typeof v=="function"&&(v=v(e),!Ti&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ti&&v.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=kl.apply(void 0,v),A=mr;d&&(A=_u(ht({trace:!Ti},typeof d=="object"&&d)));var L=new Tu(S),w=L;Array.isArray(y)?w=gr([S],y):typeof y=="function"&&(w=y(L));var E=A.apply(void 0,w);return _i(b,m,E)}function $l(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(!c)throw new Error("`builder.addCase` cannot be called with an empty action type");if(c in e)throw new Error("`builder.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 zu(t){return typeof t=="function"}function Du(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?$l(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(zu(t))d=function(){return Ii(t())};else{var u=Ii(t);d=function(){return u}}function m(h,y){h===void 0&&(h=d());var b=gr([i[y.type]],s.filter(function(v){var S=v.matcher;return S(y)}).map(function(v){var S=v.reducer;return S}));return b.filter(function(v){return!!v}).length===0&&(b=[c]),b.reduce(function(v,S){if(S)if(Je(v)){var A=v,L=S(A,y);return L===void 0?v:L}else{if(ke(v))return nn(v,function(w){return S(w,y)});var L=S(v,y);if(L===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return L}return v},h)}return m.getInitialState=d,m}function Uu(t,e){return t+"/"+e}function Gl(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:Ii(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(m){var h=o[m],y=Uu(e,m),b,v;"reducer"in h?(b=h.reducer,v=h.prepare):b=h,i[m]=b,s[y]=b,c[m]=v?mt(y,v):mt(y)});function d(){var m=typeof t.extraReducers=="function"?$l(t.extraReducers):[t.extraReducers],h=m[0],y=h===void 0?{}:h,b=m[1],v=b===void 0?[]:b,S=m[2],A=S===void 0?void 0:S,L=ht(ht({},y),s);return Du(r,function(w){for(var E in L)w.addCase(E,L[E]);for(var x=0,C=v;x<C.length;x++){var _=C[x];w.addMatcher(_.matcher,_.reducer)}A&&w.addDefaultCase(A)})}var u;return{name:e,reducer:function(m,h){return u||(u=d()),u(m,h)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var Fu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Bu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Fu[Math.random()*64|0];return e},Hu=["name","message","stack","code"],ki=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Ul=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),$u=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Hu;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},t9=(function(){function t(e,r,o){var a=mt(e+"/fulfilled",function(m,h,y,b){return{payload:m,meta:Mi(ht({},b||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),i=mt(e+"/pending",function(m,h,y){return{payload:void 0,meta:Mi(ht({},y||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=mt(e+"/rejected",function(m,h,y,b,v){return{payload:b,error:(o&&o.serializeError||$u)(m||"Rejected"),meta:Mi(ht({},v||{}),{arg:y,requestId:h,rejectedWithValue:!!b,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,d=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(h,y,b){var v=o?.idGenerator?o.idGenerator(m):Bu(),S=new d,A,L=!1;function w(x){A=x,S.abort()}var E=(function(){return wu(this,null,function(){var x,C,_,z,V,B,M;return Eu(this,function(I){switch(I.label){case 0:return I.trys.push([0,4,,5]),z=(x=o?.condition)==null?void 0:x.call(o,m,{getState:y,extra:b}),Wu(z)?[4,z]:[3,2];case 1:z=I.sent(),I.label=2;case 2:if(z===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return L=!0,V=new Promise(function($,Q){return S.signal.addEventListener("abort",function(){return Q({name:"AbortError",message:A||"Aborted"})})}),h(i(v,m,(C=o?.getPendingMeta)==null?void 0:C.call(o,{requestId:v,arg:m},{getState:y,extra:b}))),[4,Promise.race([V,Promise.resolve(r(m,{dispatch:h,getState:y,extra:b,requestId:v,signal:S.signal,abort:w,rejectWithValue:function($,Q){return new ki($,Q)},fulfillWithValue:function($,Q){return new Ul($,Q)}})).then(function($){if($ instanceof ki)throw $;return $ instanceof Ul?a($.payload,v,m,$.meta):a($,v,m)})])];case 3:return _=I.sent(),[3,5];case 4:return B=I.sent(),_=B instanceof ki?s(null,v,m,B.payload,B.meta):s(B,v,m),[3,5];case 5:return M=o&&!o.dispatchConditionRejection&&s.match(_)&&_.meta.condition,M||h(_),[2,_]}})})})();return Object.assign(E,{abort:w,requestId:v,arg:m,unwrap:function(){return E.then(Gu)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function Gu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Wu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Wl="listener",jl="completed",Vl="cancelled",r9="task-"+Vl,o9="task-"+jl,n9=Wl+"-"+Vl,a9=Wl+"-"+jl;var Pi="listenerMiddleware";var i9=mt(Pi+"/add"),s9=mt(Pi+"/removeAll"),c9=mt(Pi+"/remove");var Fl,l9=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Fl||(Fl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},ju=function(t){return function(e){setTimeout(e,t)}},d9=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ju(10);Al();window.ftReduxStores||(window.ftReduxStores={});var Ft=class t extends Ye{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(ur(i))return i;if(a==null)return;let s=Gl({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=Hl({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=Me(s.getInitialState());for(let h of u.keeping)m[h]=(d??m)[h];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...u.overwrites};return s.reducer(d,u)}});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 po;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,u=i[d];return u?(...m)=>{let h=u(...m.map(a));return this.reduxStore.dispatch(h),h}:m=>{this.setState({[d]:a(m)})}}}),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 Vu(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))ur(e)&&e.clear()}var sn=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);qe(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 Ku(t,e,r){return new sn(t,e,r).watch()}var bo=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 Fi={};H(Fi,{scrollHelper:()=>Zu});var Di,cn=new Map,Ui=class{lock(e,r){if(r){let o=cn.get(r);if(o==null||o===e)return cn.set(r,e),r}}release(e,r){r&&cn.get(r)===e&&cn.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of ca(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=Rt(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=(Di=window.FluidTopicsScrollHelper)!==null&&Di!==void 0?Di:new Ui;var Zu=window.FluidTopicsScrollHelper;var Hi={};H(Hi,{SearchPlaceConverter:()=>vr,SearchPlaceQueryParams:()=>F,isSearchPlaceQueryParams:()=>I1,serializeRequest:()=>Xu});var Kl;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Kl||(Kl={}));var Zl;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Zl||(Zl={}));var ql;(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"})(ql||(ql={}));var Yl;(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"})(Yl||(Yl={}));var Xl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Xl||(Xl={}));var Jl;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Jl||(Jl={}));var Ql;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Ql||(Ql={}));var e1;(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"})(e1||(e1={}));var t1;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(t1||(t1={}));var r1;(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"})(r1||(r1={}));var o1;(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"})(o1||(o1={}));var n1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(n1||(n1={}));var a1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(a1||(a1={}));var i1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(i1||(i1={}));var s1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(s1||(s1={}));var c1;(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"})(c1||(c1={}));var yr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(yr||(yr={}));var l1;(function(t){t.ASC="ASC",t.DESC="DESC"})(l1||(l1={}));var d1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(d1||(d1={}));var Bi;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Bi||(Bi={}));var b1=t=>Object.keys(Bi).includes(t);var u1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(u1||(u1={}));var f1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(f1||(f1={}));var p1;(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"})(p1||(p1={}));var br;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(br||(br={}));var v1=t=>Object.keys(br).includes(t);var h1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(h1||(h1={}));var m1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(m1||(m1={}));var g1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(g1||(g1={}));var J;(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"})(J||(J={}));var we;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(we||(we={}));var y1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(y1||(y1={}));var x1;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(x1||(x1={}));var S1;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(S1||(S1={}));var E1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(E1||(E1={}));var C1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(C1||(C1={}));var A1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(A1||(A1={}));var L1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(L1||(L1={}));var O1;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(O1||(O1={}));var R1;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(R1||(R1={}));var w1;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(w1||(w1={}));var _1;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(_1||(_1={}));var N1;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(N1||(N1={}));var qu={[J.PERSONAL_BOOK_SHARE_USER]:[J.PERSONAL_BOOK_USER],[J.HTML_EXPORT_USER]:[J.PERSONAL_BOOK_USER],[J.PDF_EXPORT_USER]:[J.PERSONAL_BOOK_USER],[J.KHUB_ADMIN]:[J.CONTENT_PUBLISHER],[J.ADMIN]:[J.KHUB_ADMIN,J.USERS_ADMIN,J.PORTAL_ADMIN,J.BEHAVIOR_DATA_USER],[J.GENERATIVE_AI_EXPORT_USER]:[J.GENERATIVE_AI_USER]};function M1(t,e){return t===e||(qu[t]??[]).some(r=>M1(r,e))}function T1(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=>M1(o,e))}function Yu(t){return`"${t}"`}function k1(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Xu(t,e){return new vr(t).serialize(e)}var F;(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"})(F||(F={}));var Ju=new Set(Object.values(F));function I1(t){return Ju.has(t)}var vr=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,u,m,h,y,b;let v=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&v.append(F.LOCALE,e.contentLocale):v.append(F.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&v.append(F.QUERY,e.query);let S=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(x=>x.valueFilter&&!x.valueFilter.negative))!==null&&i!==void 0?i:[];if(S.length>0){let x=S.map(C=>{var _,z;let V=((z=(_=C.valueFilter)===null||_===void 0?void 0:_.values)!==null&&z!==void 0?z:[]).map(B=>this.escapeFilters(B)).map(B=>Yu(k1(B))).join("_");return`${C.key}~${V}`}).join("*");v.append(F.VALUE_FILTERS,x)}let A=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(x=>x.dateFilter))!==null&&c!==void 0?c:[];if(A.length>0){let x=A.map(C=>{var _;return`${C.key}~${(_=C.dateFilter)===null||_===void 0?void 0:_.type.toLowerCase()}`}).join("*");v.append(F.DATE_FILTERS,x)}let L=(u=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(x=>x.rangeFilter))!==null&&u!==void 0?u:[];if(L.length>0){let x=L.map(C=>{var _,z;return`${C.key}~${(_=C.rangeFilter)===null||_===void 0?void 0:_.from}_${(z=C.rangeFilter)===null||z===void 0?void 0:z.to}`}).join("*");v.append(F.RANGE_FILTERS,x)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&v.append(F.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&v.append(F.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&v.append(F.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((y=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&y!==void 0?y:this.defaultPerPage)!=this.defaultPerPage&&v.append(F.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&v.append(F.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let w=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let x in w)v.append(x,w[x]);let E=new Array;return v.forEach((x,C)=>{E.push(this.encodeQueryString(C)+"="+this.encodeQueryString(x))}),encodeURI(E.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(L){console.warn("Could not decode search request query params, fallback on raw value",L)}let d=new URLSearchParams(e),u=d.get(F.LOCALE)==="all"?void 0:d.get(F.LOCALE),m=((r=d.get(F.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get(F.SORT))===null||o===void 0?void 0:o.toLowerCase(),y=(a=d.get(F.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get(F.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),v=d.get(F.KEYWORD_MATCH),S=v?v.toUpperCase()===yr.MANDATORY?yr.MANDATORY:yr.OPTIONAL:void 0,A={};for(let L of d.keys())I1(L)||(A[L]=d.get(L));return{contentLocale:u??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(F.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[y])!==null&&c!==void 0?c:"DEFAULT",virtualField:b1(m)?m:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Rt(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:S,otherQueryParams:A}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(F.FILTERS)&&(d=this.parseValueFilters((r=e.get(F.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(F.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(F.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(F.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(F.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(F.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(k1).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:br[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.replaceAll(a,r);return e}parseLegacyPeriodFilter(e){if(v1(e))return[{key:"ft:lastEdition",dateFilter:{type:br[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[F.LOCALE,F.FILTERS,F.VALUE_FILTERS,F.DATE_FILTERS,F.RANGE_FILTERS].forEach(a=>{r.searchParams.delete(a)}),r.toString()}static updateLocaleParamInUrl(e,r){let o=new URL(e);return o.searchParams.delete(F.LOCALE),r!==void 0&&o.searchParams.append(F.LOCALE,r),o.toString()}};var Gi={};H(Gi,{toFtFormComponent:()=>Qu});var $i=Symbol("elementInternals"),Qu=re(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[$i].form}constructor(...o){super(o),this[$i]=this.attachInternals()}setFormValue(o){this[$i].setFormValue(o)}}return e});var Wi={};H(Wi,{DateFormatter:()=>Bt});var Bt=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 Vi={};H(Vi,{ALL_KEYS_VALUE:()=>ji,SameWindowStorageEvent:()=>xr});var ji="__all__",xr=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==ji}};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 xr(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 xr(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new xr(ji))}});var Zi={};H(Zi,{FocusMainContentEvent:()=>Ki});var Ki=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var P1={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function ef(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function tf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",ef);document.addEventListener("click",tf);var z1=k`
48
48
  .sr-only {
49
49
  position:absolute;
50
50
  left:-10000px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ftds-tabs",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "description": "The design system tabs component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,15 +19,15 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-ripple": "2.1.5",
23
- "@fluid-topics/ft-tooltip": "2.1.5",
24
- "@fluid-topics/ft-wc-utils": "2.1.5",
25
- "@fluid-topics/ftds-icon": "2.1.5",
26
- "@fluid-topics/ftds-typography": "2.1.5",
22
+ "@fluid-topics/ft-ripple": "2.1.6",
23
+ "@fluid-topics/ft-tooltip": "2.1.6",
24
+ "@fluid-topics/ft-wc-utils": "2.1.6",
25
+ "@fluid-topics/ftds-icon": "2.1.6",
26
+ "@fluid-topics/ftds-typography": "2.1.6",
27
27
  "lit": "3.1.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@fluid-topics/ft-wc-test-utils": "2.1.5"
30
+ "@fluid-topics/ft-wc-test-utils": "2.1.6"
31
31
  },
32
- "gitHead": "cea42544a196f1f784982f8a666a27c534578779"
32
+ "gitHead": "70ba8e6b58f0f1c74a92965f3b7dbf3db605698e"
33
33
  }