@fluid-topics/ftds-reorderable-list 2.2.15 → 2.2.16
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.
|
@@ -1996,7 +1996,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
1996
1996
|
position: relative;
|
|
1997
1997
|
word-break: break-word;
|
|
1998
1998
|
}
|
|
1999
|
-
`;var Yl=["top","right","bottom","left"],Zl=["start","end"],Ra=Yl.reduce((e,t)=>e.concat(t,t+"-"+Zl[0],t+"-"+Zl[1]),[]),Gr=Math.min,ct=Math.max,Hr=Math.round;var Be=e=>({x:e,y:e}),$u={left:"right",right:"left",bottom:"top",top:"bottom"};function Xl(e,t,n){return ct(e,Gr(t,n))}function Fn(e,t){return typeof e=="function"?e(t):e}function Wr(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function wa(e){return e==="x"?"y":"x"}function Na(e){return e==="y"?"height":"width"}function $n(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ma(e){return wa($n(e))}function Ql(e,t,n){n===void 0&&(n=!1);let o=lt(e),a=Ma(e),i=Na(a),s=a==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=_a(s)),[s,_a(s)]}function Jl(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function _a(e){let t=Wr(e);return $u[t]+e.slice(t.length)}function Bu(e){var t,n,o,a;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(a=e.left)!=null?a:0}}function e1(e){return typeof e!="number"?Bu(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){let{x:t,y:n,width:o,height:a}=e;return{width:o,height:a,top:n,left:t,right:t+o,bottom:n+a,x:t,y:n}}function t1(e,t,n){let{reference:o,floating:a}=e,i=$n(t),s=Ma(t),l=Na(s),f=Wr(t),m=i==="y",h=o.x+o.width/2-a.width/2,g=o.y+o.height/2-a.height/2,b=o[l]/2-a[l]/2,x;switch(f){case"top":x={x:h,y:o.y-a.height};break;case"bottom":x={x:h,y:o.y+o.height};break;case"right":x={x:o.x+o.width,y:g};break;case"left":x={x:o.x-a.width,y:g};break;default:x={x:o.x,y:o.y}}let L=lt(t);return L&&(x[s]+=b*(L==="end"?1:-1)*(n&&m?-1:1)),x}async function r1(e,t){var n;t===void 0&&(t={});let{x:o,y:a,platform:i,rects:s,elements:l,strategy:f}=e,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:b=!1,padding:x=0}=Fn(t,e),L=e1(x),O=l[b?g==="floating"?"reference":"floating":g],N=Dt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(O)))==null||n?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:m,rootBoundary:h,strategy:f})),T=g==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),k=await(i.isElement==null?void 0:i.isElement(R))&&await(i.getScale==null?void 0:i.getScale(R))||{x:1,y:1},I=Dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:T,offsetParent:R,strategy:f}):T);return{top:(N.top-I.top+L.top)/k.y,bottom:(I.bottom-N.bottom+L.bottom)/k.y,left:(N.left-I.left+L.left)/k.x,right:(I.right-N.right+L.right)/k.x}}var Gu=50,n1=async(e,t,n)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:r1},f=await(s.isRTL==null?void 0:s.isRTL(t)),m=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:g}=t1(m,o,f),b=o,x=0,L={};for(let _=0;_<i.length;_++){let O=i[_];if(!O)continue;let{name:N,fn:T}=O,{x:R,y:k,data:I,reset:B}=await T({x:h,y:g,initialPlacement:o,placement:b,strategy:a,middlewareData:L,rects:m,platform:l,elements:{reference:e,floating:t}});h=R??h,g=k??g,L[N]={...L[N],...I},B&&x<Gu&&(x++,typeof B=="object"&&(B.placement&&(b=B.placement),B.rects&&(m=B.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):B.rects),{x:h,y:g}=t1(m,b,f)),_=-1)}return{x:h,y:g,placement:b,strategy:a,middlewareData:L}};function Hu(e,t,n){return(e?[...n.filter(a=>lt(a)===e),...n.filter(a=>lt(a)!==e)]:n.filter(a=>Wr(a)===a)).filter(a=>e?lt(a)===e||(t?Jl(a)!==a:!1):!0)}var o1=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:m}=t,{crossAxis:h=!1,alignment:g,allowedPlacements:b=Ra,autoAlignment:x=!0,...L}=Fn(e,t),_=g!==void 0||b===Ra?Hu(g||null,x,b):b,O=((n=s.autoPlacement)==null?void 0:n.index)||0,N=_[O];if(N==null)return{};if(l!==N)return{reset:{placement:_[0]}};let T=await f.detectOverflow(t,L),R=Ql(N,i,await(f.isRTL==null?void 0:f.isRTL(m.floating))),k=[T[Wr(N)],T[R[0]],T[R[1]]],I=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:N,overflows:k}],B=_[O+1];if(B)return{data:{index:O+1,overflows:I},reset:{placement:B}};let $=I.map(Ce=>{let gt=lt(Ce.placement);return[Ce.placement,gt&&h?Ce.overflows.slice(0,2).reduce((j0,K0)=>j0+K0,0):Ce.overflows[0],Ce.overflows]}).sort((Ce,gt)=>Ce[1]-gt[1]),ht=((a=$.filter(Ce=>Ce[2].slice(0,lt(Ce[0])?2:3).every(gt=>gt<=0))[0])==null?void 0:a[0])||$[0][0];return ht!==l?{data:{index:O+1,overflows:I},reset:{placement:ht}}:{}}}};var a1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:T=>{let{x:R,y:k}=T;return{x:R,y:k}}},...m}=Fn(e,t),h={x:n,y:o},g=await i.detectOverflow(t,m),b=$n(a),x=wa(b),L=h[x],_=h[b],O=(T,R)=>Xl(R+g[T==="y"?"top":"left"],R,R-g[T==="y"?"bottom":"right"]);s&&(L=O(x,L)),l&&(_=O(b,_));let N=f.fn({...t,[x]:L,[b]:_});return{...N,data:{x:N.x-n,y:N.y-o,enabled:{[x]:s,[b]:l}}}}}};function Gn(){return typeof window<"u"}function Ft(e){return s1(e)?(e.nodeName||"").toLowerCase():"#document"}function me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xe(e){var t;return(t=(s1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function s1(e){return Gn()?e instanceof Node||e instanceof me(e).Node:!1}function ke(e){return Gn()?e instanceof Element||e instanceof me(e).Element:!1}function Qe(e){return Gn()?e instanceof HTMLElement||e instanceof me(e).HTMLElement:!1}function i1(e){return!Gn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof me(e).ShadowRoot}function Vr(e){let{overflow:t,overflowX:n,overflowY:o,display:a}=Ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&a!=="inline"&&a!=="contents"}function c1(e){return/^(table|td|th)$/.test(Ft(e))}function jr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Wu=/transform|translate|scale|rotate|perspective|filter/,Vu=/paint|layout|strict|content/,Ut=e=>!!e&&e!=="none",za;function dr(e){let t=ke(e)?Ie(e):e;return Ut(t.transform)||Ut(t.translate)||Ut(t.scale)||Ut(t.rotate)||Ut(t.perspective)||!Hn()&&(Ut(t.backdropFilter)||Ut(t.filter))||Wu.test(t.willChange||"")||Vu.test(t.contain||"")}function l1(e){let t=dt(e);for(;Qe(t)&&!fr(t);){if(dr(t))return t;if(jr(t))return null;t=dt(t)}return null}function Hn(){return za==null&&(za=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),za}function fr(e){return/^(html|body|#document)$/.test(Ft(e))}function Ie(e){return me(e).getComputedStyle(e)}function Kr(e){return ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dt(e){if(Ft(e)==="html")return e;let t=e.assignedSlot||e.parentNode||i1(e)&&e.host||Xe(e);return i1(t)?t.host:t}function d1(e){let t=dt(e);return fr(t)?(e.ownerDocument||e).body:Qe(t)&&Vr(t)?t:d1(t)}function Bn(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);let a=d1(e),i=a===((o=e.ownerDocument)==null?void 0:o.body),s=me(a);if(i){let l=Wn(s);return t.concat(s,s.visualViewport||[],Vr(a)?a:[],l&&n?Bn(l):[])}else return t.concat(a,Bn(a,[],n))}function Wn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function p1(e){let t=Ie(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,a=Qe(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:o,l=Hr(n)!==i||Hr(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function m1(e){return ke(e)?e:e.contextElement}function ur(e){let t=m1(e);if(!Qe(t))return Be(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:i}=p1(t),s=(i?Hr(n.width):n.width)/o,l=(i?Hr(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var ju=Be(0);function h1(e){let t=me(e);return!Hn()||!t.visualViewport?ju:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ku(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===me(e)}function qr(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),i=m1(e),s=Be(1);t&&(o?ke(o)&&(s=ur(o)):s=ur(e));let l=Ku(i,n,o)?h1(i):Be(0),f=(a.left+l.x)/s.x,m=(a.top+l.y)/s.y,h=a.width/s.x,g=a.height/s.y;if(i&&o){let b=me(i),x=ke(o)?me(o):o,L=b,_=Wn(L);for(;_&&x!==L;){let O=ur(_),N=_.getBoundingClientRect(),T=Ie(_),R=N.left+(_.clientLeft+parseFloat(T.paddingLeft))*O.x,k=N.top+(_.clientTop+parseFloat(T.paddingTop))*O.y;f*=O.x,m*=O.y,h*=O.x,g*=O.y,f+=R,m+=k,L=me(_),_=Wn(L)}}return Dt({width:h,height:g,x:f,y:m})}function Vn(e,t){let n=Kr(e).scrollLeft;return t?t.left+n:qr(Xe(e)).left+n}function g1(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Vn(e,n),a=n.top+t.scrollTop;return{x:o,y:a}}function qu(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e,i=a==="fixed",s=Xe(o),l=t?jr(t.floating):!1;if(o===s||l&&i)return n;let f={scrollLeft:0,scrollTop:0},m=Be(1),h=Be(0),g=Qe(o);if((g||!i)&&((Ft(o)!=="body"||Vr(s))&&(f=Kr(o)),g)){let x=qr(o);m=ur(o),h.x=x.x+o.clientLeft,h.y=x.y+o.clientTop}let b=s&&!g&&!i?g1(s,f):Be(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-f.scrollLeft*m.x+h.x+b.x,y:n.y*m.y-f.scrollTop*m.y+h.y+b.y}}function Zu(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Yu(e){let t=Kr(e),n=e.ownerDocument.body,o=ct(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=ct(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),i=-t.scrollLeft+Vn(e),s=-t.scrollTop;return Ie(n).direction==="rtl"&&(i+=ct(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}var Xu=25;function Qu(e,t,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",a=me(e),i=Xe(e),s=a.visualViewport,l=i.clientWidth,f=i.clientHeight,m=0,h=0;if(s){let b=!Hn()||t==="fixed";o?b||(m=-s.offsetLeft,h=-s.offsetTop):(l=s.width,f=s.height,b&&(m=s.offsetLeft,h=s.offsetTop))}if(Vn(i)<=0){let b=i.ownerDocument,x=b.body,L=getComputedStyle(x),_=b.compatMode==="CSS1Compat"&&parseFloat(L.marginLeft)+parseFloat(L.marginRight)||0,O=Math.abs(i.clientWidth-x.clientWidth-_),N=getComputedStyle(i).scrollbarGutter==="stable both-edges"?O/2:O;N<=Xu&&(l-=N)}return{width:l,height:f,x:m,y:h}}function Ju(e,t){let n=qr(e,!0,t==="fixed"),o=n.top+e.clientTop,a=n.left+e.clientLeft,i=ur(e),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,m=o*i.y;return{width:s,height:l,x:f,y:m}}function f1(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Qu(e,n,t);else if(t==="document")o=Yu(Xe(e));else if(ke(t))o=Ju(t,n);else{let a=h1(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Dt(o)}function e3(e,t){let n=t.get(e);if(n)return n;let o=Bn(e,[],!1).filter(l=>ke(l)&&Ft(l)!=="body"),a=null,i=Ie(e).position==="fixed",s=i?dt(e):e;for(;ke(s)&&!fr(s);){let l=Ie(s),f=dr(s),m=a?a.position:i?"fixed":"";!f&&(m==="fixed"||m==="absolute"&&l.position==="static")?o=o.filter(g=>g!==s):a=l,s=dt(s)}return t.set(e,o),o}function t3(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e,s=[...n==="clippingAncestors"?jr(t)?[]:e3(t,this._c):[].concat(n),o],l=f1(t,s[0],a),f=l.top,m=l.right,h=l.bottom,g=l.left;for(let b=1;b<s.length;b++){let x=f1(t,s[b],a);f=ct(x.top,f),m=Gr(x.right,m),h=Gr(x.bottom,h),g=ct(x.left,g)}return{width:m-g,height:h-f,x:g,y:f}}function r3(e){let{width:t,height:n}=p1(e);return{width:t,height:n}}function n3(e,t,n){let o=Qe(t),a=Xe(t),i=n==="fixed",s=qr(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=Be(0);if((o||!i)&&((Ft(t)!=="body"||Vr(a))&&(l=Kr(t)),o)){let b=qr(t,!0,i,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}!o&&a&&(f.x=Vn(a));let m=a&&!o&&!i?g1(a,l):Be(0),h=s.left+l.scrollLeft-f.x-m.x,g=s.top+l.scrollTop-f.y-m.y;return{x:h,y:g,width:s.width,height:s.height}}function ka(e){return Ie(e).position==="static"}function u1(e,t){if(!Qe(e)||Ie(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Xe(e)===n&&(n=n.ownerDocument.body),n}function y1(e,t){let n=me(e);if(jr(e))return n;if(!Qe(e)){let a=dt(e);for(;a&&!fr(a);){if(ke(a)&&!ka(a))return a;a=dt(a)}return n}let o=u1(e,t);for(;o&&c1(o)&&ka(o);)o=u1(o,t);return o&&fr(o)&&ka(o)&&!dr(o)?n:o||l1(e)||n}var o3=async function(e){let t=this.getOffsetParent||y1,n=this.getDimensions,o=await n(e.floating);return{reference:n3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function a3(e){return Ie(e).direction==="rtl"}var jn={convertOffsetParentRelativeRectToViewportRelativeRect:qu,getDocumentElement:Xe,getClippingRect:t3,getOffsetParent:y1,getElementRects:o3,getClientRects:Zu,getDimensions:r3,getScale:ur,isElement:ke,isRTL:a3};var b1=o1,x1=a1;var v1=(e,t,n)=>{let o=new Map,a=n??{},i={...jn,...a.platform,_c:o};return n1(e,t,{...a,platform:i})};function S1(e){return i3(e)}function Ia(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function i3(e){for(let t=e;t;t=Ia(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Ia(e);t;t=Ia(t)){if(!(t instanceof Element))continue;let n=getComputedStyle(t);if(n.display!=="contents"&&(n.position!=="static"||dr(n)||t.tagName==="BODY"))return t}return null}async function C1(e,t,n){let o;return typeof n=="object"?o=n:o={placement:n},v1(e,t,{strategy:o.strategy,platform:{...jn,getOffsetParent:a=>jn.getOffsetParent(a,S1)},middleware:[x1({crossAxis:!0}),b1({allowedPlacements:[o.placement]})]})}var Sr=C(P());var ri=C(oe());var E1=C(oe(),1);var Ta=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function A1(e,t){return(0,E1.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return Zr(e);try{return JSON.parse(n)}catch{return Zr(e)}},toAttribute:n=>JSON.stringify(n)},hasChanged:Yr,...t??{}})}function s3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!pr(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!pr(o[1],t.get(o[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[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(n=i.length,n!==a(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){let s=i[o];if(!pr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pr(e,t){try{return s3(e,t)}catch{return!1}}function Yr(e,t){return!pr(e,t)}function Zr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Kn(e,t){let n=o=>o[e]===!0;return o=>{if(n(o))return o;let a=t(o);return a[e]=!0,a}}var L1=C(oe(),1);var Pa=e=>{let t=e??{};return(n,o)=>{var a;let i={hasChanged:Yr,attribute:!1,...t};(0,L1.property)(i)(n,o);let s=n.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[o]),store:t.store})}};var qn=class{constructor(){this.queue=[]}add(t,n=!1){n&&this.clear(t.type),this.queue.push(t)}consume(t){let n=this.queue.find(o=>o.type===t);return n&&(this.queue=this.queue.filter(o=>o!==n)),n}clear(t){typeof t=="string"?this.queue=this.queue.filter(n=>n.type!==t):this.queue=this.queue.filter(n=>!t.test(n.type))}};var $t=C(oe(),1);var Zn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,n){return this.callbacks=[t],this.debounce(n)}queue(t,n){return this.callbacks.push(t),this.debounce(n)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((n,o)=>{this.resolvePromise=n,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,n;let o=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(n=this.resolvePromise)!==null&&n!==void 0?n:(()=>null);this.clearPromise();for(let s of o)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 _1=C(j(),1);var Yn=globalThis,c3=Yn.ShadowRoot&&(Yn.ShadyCSS===void 0||Yn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var O1=(e,t)=>{if(c3)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(let n of t){let o=document.createElement("style"),a=Yn.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=n.cssText,e.appendChild(o)}};var Xn=class extends _1.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let n={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(n);return O1(o,t.elementStyles),o}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([n,o])=>this.defineScopedElement(n,o))}static defineScopedElement(t,n){Ta(t)(n),this.canDefineScopedElement(t)&&this.registry.define(t,n)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,n){this.scopedRegistryConstructor.defineScopedElement(t,n)}};function R1(e,t,...n){var o;let a=e.querySelector(t);for(let i of n)a=(o=a?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return a}var hr=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},z1,w1=Symbol("constructorPrototype"),N1=Symbol("constructorName"),k1=Symbol("exportpartsDebouncer"),M1=Symbol("dynamicDependenciesLoaded"),mr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};mr.eventName="exportparts-updated";var Ge=class extends Xn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[z1]=new Zn(5),this.scheduleExportpartsUpdate=()=>{var t,n,o;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(o=(n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)!==null&&o!==void 0&&o)&&this[k1].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[N1]=this.constructor.name,this[w1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[N1]&&Object.setPrototypeOf(this,this[w1])}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(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let n=this.constructor;n[M1]||(n[M1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(mr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(mr.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 mr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:n,selector:o,shadowPath:a}=this.elementToFocus;if(o!=null){let i=[...a??[],o];n=R1(this.shadowRoot,...i)}n?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||n?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var n,o,a;if(((o=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).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 n,o,a,i,s,l;let f=b=>b!=null&&b.trim().length>0,m=t.filter(f).map(b=>b.trim());if(m.length===0){this.exportparts=void 0;return}let h=new Set;for(let b of(o=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let x=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],L=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],_=[...x,...L].filter(f).map(O=>O.trim());for(let O of _)h.add(O)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(b=>m.map(x=>`${b}:${x}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};z1=k1;hr([(0,$t.property)()],Ge.prototype,"exportpartsPrefix",void 0);hr([A1([])],Ge.prototype,"exportpartsPrefixes",void 0);hr([(0,$t.property)({reflect:!0})],Ge.prototype,"exportparts",void 0);hr([(0,$t.property)()],Ge.prototype,"customStylesheet",void 0);hr([(0,$t.property)()],Ge.prototype,"elementToFocus",void 0);hr([(0,$t.state)()],Ge.prototype,"useAdoptedStyleSheets",void 0);function Qn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Xr=Symbol("internalReduxEventsUnsubscribers"),ft=Symbol("internalStoresUnsubscribers"),Bt=Symbol("internalStores"),l3=Kn(Symbol("withRedux"),function(e){var t,n,o;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[n]=new Map,this[o]=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[Bt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Bt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Bt].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Bt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Bt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Bt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let m=this.getStore(s.store);m&&(s.store?this[ft].has(s.store):this[ft].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var f;this[ft].set(s,l.subscribe(()=>this.updateFromStores())),this[Xr].set(s,[]),Qn(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((m,h)=>{if(typeof this[h]=="function"&&(!m.store||l.name===m.store)){let g=b=>this[h](b);l.addEventListener(m.eventName,g),this[Xr].get(s).push(()=>l.removeEventListener(m.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ft].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[ft].has(s)&&this[ft].get(s)(),this[ft].delete(s),(l=this[Xr].get(s))===null||l===void 0||l.forEach(f=>f()),this[Xr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ft,n=Bt,o=Xr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),I1=class extends l3(Ge){};function ne(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 d3=typeof Symbol=="function"&&Symbol.observable||"@@observable",T1=d3,Da=()=>Math.random().toString(36).substring(7).split("").join("."),f3={INIT:`@@redux/INIT${Da()}`,REPLACE:`@@redux/REPLACE${Da()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Da()}`},Jn=f3;function eo(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ua(e,t,n){if(typeof e!="function")throw new Error(ne(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ne(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ne(1));return n(Ua)(e,t)}let o=e,a=t,i=new Map,s=i,l=0,f=!1;function m(){s===i&&(s=new Map,i.forEach((O,N)=>{s.set(N,O)}))}function h(){if(f)throw new Error(ne(3));return a}function g(O){if(typeof O!="function")throw new Error(ne(4));if(f)throw new Error(ne(5));let N=!0;m();let T=l++;return s.set(T,O),function(){if(N){if(f)throw new Error(ne(6));N=!1,m(),s.delete(T),i=null}}}function b(O){if(!eo(O))throw new Error(ne(7));if(typeof O.type>"u")throw new Error(ne(8));if(typeof O.type!="string")throw new Error(ne(17));if(f)throw new Error(ne(9));try{f=!0,a=o(a,O)}finally{f=!1}return(i=s).forEach(T=>{T()}),O}function x(O){if(typeof O!="function")throw new Error(ne(10));o=O,b({type:Jn.REPLACE})}function L(){let O=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(ne(11));function T(){let k=N;k.next&&k.next(h())}return T(),{unsubscribe:O(T)}},[T1](){return this}}}return b({type:Jn.INIT}),{dispatch:b,subscribe:g,getState:h,replaceReducer:x,[T1]:L}}function u3(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:Jn.INIT})>"u")throw new Error(ne(12));if(typeof n(void 0,{type:Jn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ne(13))})}function P1(e){let t=Object.keys(e),n={};for(let s=0;s<t.length;s++){let l=t[s];typeof e[l]=="function"&&(n[l]=e[l])}let o=Object.keys(n),a,i;try{u3(n)}catch(s){i=s}return function(l={},f){if(i)throw i;let m=!1,h={};for(let g=0;g<o.length;g++){let b=o[g],x=n[b],L=l[b],_=x(L,f);if(typeof _>"u"){let O=f&&f.type;throw new Error(ne(14))}h[b]=_,m=m||_!==L}return m=m||o.length!==Object.keys(l).length,m?h:l}}function Qr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function D1(...e){return t=>(n,o)=>{let a=t(n,o),i=()=>{throw new Error(ne(15))},s={getState:a.getState,dispatch:(f,...m)=>i(f,...m)},l=e.map(f=>f(s));return i=Qr(...l)(a.dispatch),{...a,dispatch:i}}}function U1(e){return eo(e)&&"type"in e&&typeof e.type=="string"}var K1=Symbol.for("immer-nothing"),F1=Symbol.for("immer-draftable"),ie=Symbol.for("immer-state");function Te(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var xe=Object,yr=xe.getPrototypeOf,oo="constructor",fo="prototype",Ga="configurable",ao="enumerable",ro="writable",Jr="value",He=e=>!!e&&!!e[ie];function ve(e){return e?q1(e)||po(e)||!!e[F1]||!!e[oo]?.[F1]||mo(e)||ho(e):!1}var p3=xe[fo][oo].toString(),$1=new WeakMap;function q1(e){if(!e||!Ya(e))return!1;let t=yr(e);if(t===null||t===xe[fo])return!0;let n=xe.hasOwnProperty.call(t,oo)&&t[oo];if(n===Object)return!0;if(!gr(n))return!1;let o=$1.get(n);return o===void 0&&(o=Function.toString.call(n),$1.set(n,o)),o===p3}function uo(e,t,n=!0){rn(e)===0?(n?Reflect.ownKeys(e):xe.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((o,a)=>t(a,o,e))}function rn(e){let t=e[ie];return t?t.type_:po(e)?1:mo(e)?2:ho(e)?3:0}var Fa=(e,t,n=rn(e))=>n===2?e.has(t):xe[fo].hasOwnProperty.call(e,t),Ha=(e,t,n=rn(e))=>n===2?e.get(t):e[t],io=(e,t,n,o=rn(e))=>{o===2?e.set(t,n):o===3?e.add(n):e[t]=n};function m3(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var po=Array.isArray,mo=e=>e instanceof Map,ho=e=>e instanceof Set,Ya=e=>typeof e=="object",gr=e=>typeof e=="function",$a=e=>typeof e=="boolean";function h3(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Je=e=>e.copy_||e.base_;var Xa=e=>e.modified_?e.copy_:e.base_;function Wa(e,t){if(mo(e))return new Map(e);if(ho(e))return new Set(e);if(po(e))return Array[fo].slice.call(e);let n=q1(e);if(t===!0||t==="class_only"&&!n){let o=xe.getOwnPropertyDescriptors(e);delete o[ie];let a=Reflect.ownKeys(o);for(let i=0;i<a.length;i++){let s=a[i],l=o[s];l[ro]===!1&&(l[ro]=!0,l[Ga]=!0),(l.get||l.set)&&(o[s]={[Ga]:!0,[ro]:!0,[ao]:l[ao],[Jr]:e[s]})}return xe.create(yr(e),o)}else{let o=yr(e);if(o!==null&&n)return{...e};let a=xe.create(o);return xe.assign(a,e)}}function Qa(e,t=!1){return go(e)||He(e)||!ve(e)||(rn(e)>1&&xe.defineProperties(e,{set:to,add:to,clear:to,delete:to}),xe.freeze(e),t&&uo(e,(n,o)=>{Qa(o,!0)},!1)),e}function g3(){Te(2)}var to={[Jr]:g3};function go(e){return e===null||!Ya(e)?!0:xe.isFrozen(e)}var so="MapSet",Va="Patches",B1="ArrayMethods",Z1={};function Gt(e){let t=Z1[e];return t||Te(0,e),t}var G1=e=>!!Z1[e];var en,Y1=()=>en,y3=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:G1(so)?Gt(so):void 0,arrayMethodsPlugin_:G1(B1)?Gt(B1):void 0});function H1(e,t){t&&(e.patchPlugin_=Gt(Va),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ja(e){Ka(e),e.drafts_.forEach(b3),e.drafts_=null}function Ka(e){e===en&&(en=e.parent_)}var W1=e=>en=y3(en,e);function b3(e){let t=e[ie];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function V1(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[ie].modified_&&(ja(t),Te(4)),ve(e)&&(e=j1(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[ie].base_,e,t)}else e=j1(t,n);return x3(t,e,!0),ja(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==K1?e:void 0}function j1(e,t){if(go(t))return t;let n=t[ie];if(!n)return co(t,e.handledSet_,e);if(!yo(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:o}=n;if(o)for(;o.length>0;)o.pop()(e);J1(n,e)}return n.copy_}function x3(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Qa(t,n)}function X1(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var yo=(e,t)=>e.scope_===t,v3=[];function Q1(e,t,n,o){let a=Je(e),i=e.type_;if(o!==void 0&&Ha(a,o,i)===t){io(a,o,n,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;uo(a,(f,m)=>{if(He(m)){let h=l.get(m)||[];h.push(f),l.set(m,h)}})}let s=e.draftLocations_.get(t)??v3;for(let l of s)io(a,l,n,i)}function S3(e,t,n){e.callbacks_.push(function(a){let i=t;if(!i||!yo(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=Xa(i);Q1(e,i.draft_??i,s,n),J1(i,a)})}function J1(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:o}=t;if(o){let a=o.getPath(e);a&&o.generatePatches_(e,a,t)}X1(e)}}function C3(e,t,n){let{scope_:o}=e;if(He(n)){let a=n[ie];yo(a,o)&&a.callbacks_.push(function(){no(e);let s=Xa(a);Q1(e,n,s,t)})}else ve(n)&&e.callbacks_.push(function(){let i=Je(e);e.type_===3?i.has(n)&&co(n,o.handledSet_,o):Ha(i,t,e.type_)===n&&o.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&co(Ha(e.copy_,t,e.type_),o.handledSet_,o)})}function co(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||He(e)||t.has(e)||!ve(e)||go(e)||(t.add(e),uo(e,(o,a)=>{if(He(a)){let i=a[ie];if(yo(i,n)){let s=Xa(i);io(e,o,s,e.type_),X1(i)}}else ve(a)&&co(a,t,n)})),e}function E3(e,t){let n=po(e),o={type_:n?1:0,scope_:t?t.scope_:Y1(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=o,i=lo;n&&(a=[o],i=tn);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return o.draft_=l,o.revoke_=s,[l,o]}var lo={get(e,t){if(t===ie)return e;let n=e.scope_.arrayMethodsPlugin_,o=e.type_===1&&typeof t=="string";if(o&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let a=Je(e);if(!Fa(a,t,e.type_))return L3(e,a,t);let i=a[t];if(e.finalized_||!ve(i)||o&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&h3(t))return i;if(i===Ba(e.base_,t)||A3(e,t,i)){no(e);let s=e.type_===1?+t:t,l=Za(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in Je(e)},ownKeys(e){return Reflect.ownKeys(Je(e))},set(e,t,n){let o=e2(Je(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){let a=Ba(Je(e),t),i=a?.[ie];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(m3(n,a)&&(n!==void 0||Fa(e.base_,t,e.type_)))return!0;no(e),qa(e)}return e.copy_[t]===n&&(n!==void 0||Fa(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),C3(e,t,n)),!0},deleteProperty(e,t){return no(e),Ba(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),qa(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Je(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{[ro]:!0,[Ga]:e.type_!==1||t!=="length",[ao]:o[ao],[Jr]:n[t]}},defineProperty(){Te(11)},getPrototypeOf(e){return yr(e.base_)},setPrototypeOf(){Te(12)}},tn={};for(let e in lo){let t=lo[e];tn[e]=function(){let n=arguments;return n[0]=n[0][0],t.apply(this,n)}}tn.deleteProperty=function(e,t){return tn.set.call(this,e,t,void 0)};tn.set=function(e,t,n){return lo.set.call(this,e[0],t,n,e[0])};function Ba(e,t){let n=e[ie];return(n?Je(n):e)[t]}function A3(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!ve(n)||n[ie]?!1:e.baseRefs_.has(n)}function L3(e,t,n){let o=e2(t,n);return o?Jr in o?o[Jr]:o.get?.call(e.draft_):void 0}function e2(e,t){if(!(t in e))return;let n=yr(e);for(;n;){let o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=yr(n)}}function qa(e){e.modified_||(e.modified_=!0,e.parent_&&qa(e.parent_))}function no(e){e.copy_||(e.assigned_=new Map,e.copy_=Wa(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var O3=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,o)=>{if(gr(t)&&!gr(n)){let i=n;n=t;let s=this;return function(f=i,...m){return s.produce(f,h=>n.call(this,h,...m))}}gr(n)||Te(6),o!==void 0&&!gr(o)&&Te(7);let a;if(ve(t)){let i=W1(this),s=Za(i,t,void 0),l=!0;try{a=n(s),l=!1}finally{l?ja(i):Ka(i)}return H1(i,o),V1(a,i)}else if(!t||!Ya(t)){if(a=n(t),a===void 0&&(a=t),a===K1&&(a=void 0),this.autoFreeze_&&Qa(a,!0),o){let i=[],s=[];Gt(Va).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),o(i,s)}return a}else Te(1,t)},this.produceWithPatches=(t,n)=>{if(gr(t))return(s,...l)=>this.produceWithPatches(s,f=>t(f,...l));let o,a;return[this.produce(t,n,(s,l)=>{o=s,a=l}),o,a]},$a(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),$a(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),$a(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ve(e)||Te(8),He(e)&&(e=t2(e));let t=W1(this),n=Za(t,e,void 0);return n[ie].isManual_=!0,Ka(t),n}finishDraft(e,t){let n=e&&e[ie];(!n||!n.isManual_)&&Te(9);let{scope_:o}=n;return H1(o,t),V1(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));let o=Gt(Va).applyPatches_;return He(e)?o(e,t):this.produce(e,a=>o(a,t))}};function Za(e,t,n,o){let[a,i]=mo(t)?Gt(so).proxyMap_(t,n):ho(t)?Gt(so).proxySet_(t,n):E3(t,n);return(n?.scope_??Y1()).drafts_.push(a),i.callbacks_=n?.callbacks_??[],i.key_=o,n&&o!==void 0?S3(n,i,o):i.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:m}=f;i.modified_&&m&&m.generatePatches_(i,[],f)}),a}function t2(e){return He(e)||Te(10,e),r2(e)}function r2(e){if(!ve(e)||go(e))return e;let t=e[ie],n,o=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Wa(e,t.scope_.immer_.useStrictShallowCopy_),o=t.scope_.immer_.shouldUseStrictIteration()}else n=Wa(e,!0);return uo(n,(a,i)=>{io(n,a,r2(i))},o),t&&(t.finalized_=!1),n}var _3=globalThis.Iterator,Kg=typeof _3?.from=="function";var R3=new O3,Ja=R3.produce;function n2(e){return({dispatch:n,getState:o})=>a=>i=>typeof i=="function"?i(n,o,e):a(i)}var o2=n2(),a2=n2;var w3=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Qr:Qr.apply(null,arguments)},ey=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},N3=e=>e&&typeof e.match=="function";function ut(e,t){function n(...o){if(t){let a=t(...o);if(!a)throw new Error(et(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:o[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=o=>U1(o)&&o.type===e,n}var d2=class nn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,nn.prototype)}static get[Symbol.species](){return nn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new nn(...t[0].concat(this)):new nn(...t.concat(this))}};function i2(e){return ve(e)?Ja(e,()=>{}):e}function bo(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function M3(e){return typeof e=="boolean"}var z3=()=>function(t){let{thunk:n=!0,immutableCheck:o=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{},s=new d2;return n&&(M3(n)?s.push(o2):s.push(a2(n.extraArgument))),s},k3="RTK_autoBatch";var s2=e=>t=>{setTimeout(t,e)},I3=(e,t)=>n=>{let o=!1,a=()=>{o||(o=!0,cancelAnimationFrame(i),clearTimeout(s),n())},i=e(a),s=setTimeout(a,t)},T3=(e={type:"raf"})=>t=>(...n)=>{let o=t(...n),a=!0,i=!1,s=!1,l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?I3(window.requestAnimationFrame,100):s2(10):e.type==="callback"?e.queueNotification:s2(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(h=>h()))};return Object.assign({},o,{subscribe(h){let g=()=>a&&h(),b=o.subscribe(g);return l.add(h),()=>{b(),l.delete(h)}},dispatch(h){try{return a=!h?.meta?.[k3],i=!a,i&&(s||(s=!0,f(m))),o.dispatch(h)}finally{a=!0}}})},P3=e=>function(n){let{autoBatch:o=!0}=n??{},a=new d2(e);return o&&a.push(T3(typeof o=="object"?o:void 0)),a};function f2(e){let t=z3(),{reducer:n=void 0,middleware:o,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{},f;if(typeof n=="function")f=n;else if(eo(n))f=P1(n);else throw new Error(et(1));let m;typeof o=="function"?m=o(t):m=t();let h=Qr;a&&(h=w3({trace:!1,...typeof a=="object"&&a}));let g=D1(...m),b=P3(g),x=typeof l=="function"?l(b):b(),L=h(...x);return Ua(f,s,L)}function u2(e){let t={},n=[],o,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(et(28));if(l in t)throw new Error(et(29));return t[l]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return n.push({matcher:i,reducer:s}),a},addDefaultCase(i){return o=i,a}};return e(a),[t,n,o]}function D3(e){return typeof e=="function"}function U3(e,t){let[n,o,a]=u2(t),i;if(D3(e))i=()=>i2(e());else{let l=i2(e);i=()=>l}function s(l=i(),f){let m=[n[f.type],...o.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return m.filter(h=>!!h).length===0&&(m=[a]),m.reduce((h,g)=>{if(g)if(He(h)){let x=g(h,f);return x===void 0?h:x}else{if(ve(h))return Ja(h,b=>g(b,f));{let b=g(h,f);if(b===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return b}}return h},l)}return s.getInitialState=i,s}var F3=(e,t)=>N3(e)?e.match(t):e(t);function $3(...e){return t=>e.some(n=>F3(n,t))}var B3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",G3=(e=21)=>{let t="",n=e;for(;n--;)t+=B3[Math.random()*64|0];return t},H3=["name","message","stack","code"],ei=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},c2=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},W3=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of H3)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},l2="External signal was aborted",V3=(()=>{function e(t,n,o){let a=ut(t+"/fulfilled",(f,m,h,g)=>({payload:f,meta:{...g||{},arg:h,requestId:m,requestStatus:"fulfilled"}})),i=ut(t+"/pending",(f,m,h)=>({payload:void 0,meta:{...h||{},arg:m,requestId:f,requestStatus:"pending"}})),s=ut(t+"/rejected",(f,m,h,g,b)=>({payload:g,error:(o&&o.serializeError||W3)(f||"Rejected"),meta:{...b||{},arg:h,requestId:m,rejectedWithValue:!!g,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function l(f,{signal:m}={}){return(h,g,b)=>{let x=o?.idGenerator?o.idGenerator(f):G3(),L=new AbortController,_,O;function N(R){O=R,L.abort()}m&&(m.aborted?N(l2):m.addEventListener("abort",()=>N(l2),{once:!0}));let T=(async function(){let R;try{let I=o?.condition?.(f,{getState:g,extra:b});if(K3(I)&&(I=await I),I===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let B=new Promise(($,G)=>{_=()=>{G({name:"AbortError",message:O||"Aborted"})},L.signal.addEventListener("abort",_,{once:!0})});h(i(x,f,o?.getPendingMeta?.({requestId:x,arg:f},{getState:g,extra:b}))),R=await Promise.race([B,Promise.resolve(n(f,{dispatch:h,getState:g,extra:b,requestId:x,signal:L.signal,abort:N,rejectWithValue:(($,G)=>new ei($,G)),fulfillWithValue:(($,G)=>new c2($,G))})).then($=>{if($ instanceof ei)throw $;return $ instanceof c2?a($.payload,x,f,$.meta):a($,x,f)})])}catch(I){R=I instanceof ei?s(null,x,f,I.payload,I.meta):s(I,x,f)}finally{_&&L.signal.removeEventListener("abort",_)}return o&&!o.dispatchConditionRejection&&s.match(R)&&R.meta.condition||h(R),R})();return Object.assign(T,{abort:N,requestId:x,arg:f,unwrap(){return T.then(j3)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:a,settled:$3(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function j3(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function K3(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var p2=Symbol.for("rtk-slice-createasyncthunk"),ry={[p2]:V3};function q3(e,t){return`${e}/${t}`}function Z3({creators:e}={}){let t=e?.asyncThunk?.[p2];return function(o){let{name:a,reducerPath:i=a}=o;if(!a)throw new Error(et(11));typeof process<"u";let s=(typeof o.reducers=="function"?o.reducers(X3()):o.reducers)||{},l=Object.keys(s),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(R,k){let I=typeof R=="string"?R:R.type;if(!I)throw new Error(et(12));if(I in f.sliceCaseReducersByType)throw new Error(et(13));return f.sliceCaseReducersByType[I]=k,m},addMatcher(R,k){return f.sliceMatchers.push({matcher:R,reducer:k}),m},exposeAction(R,k){return f.actionCreators[R]=k,m},exposeCaseReducer(R,k){return f.sliceCaseReducersByName[R]=k,m}};l.forEach(R=>{let k=s[R],I={reducerName:R,type:q3(a,R),createNotation:typeof o.reducers=="function"};J3(k)?tp(I,k,m,t):Q3(I,k,m)});function h(){let[R={},k=[],I=void 0]=typeof o.extraReducers=="function"?u2(o.extraReducers):[o.extraReducers],B={...R,...f.sliceCaseReducersByType};return U3(o.initialState,$=>{for(let G in B)$.addCase(G,B[G]);for(let G of f.sliceMatchers)$.addMatcher(G.matcher,G.reducer);for(let G of k)$.addMatcher(G.matcher,G.reducer);I&&$.addDefaultCase(I)})}let g=R=>R,b=new Map,x=new WeakMap,L;function _(R,k){return L||(L=h()),L(R,k)}function O(){return L||(L=h()),L.getInitialState()}function N(R,k=!1){function I($){let G=$[R];return typeof G>"u"&&k&&(G=bo(x,I,O)),G}function B($=g){let G=bo(b,k,()=>new WeakMap);return bo(G,$,()=>{let ht={};for(let[Ce,gt]of Object.entries(o.selectors??{}))ht[Ce]=Y3(gt,$,()=>bo(x,$,O),k);return ht})}return{reducerPath:R,getSelectors:B,get selectors(){return B(I)},selectSlice:I}}let T={name:a,reducer:_,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:O,...N(i),injectInto(R,{reducerPath:k,...I}={}){let B=k??i;return R.inject({reducerPath:B,reducer:_},I),{...T,...N(B,!0)}}};return T}}function Y3(e,t,n,o){function a(i,...s){let l=t(i);return typeof l>"u"&&o&&(l=n()),e(l,...s)}return a.unwrapped=e,a}var m2=Z3();function X3(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Q3({type:e,reducerName:t,createNotation:n},o,a){let i,s;if("reducer"in o){if(n&&!ep(o))throw new Error(et(17));i=o.reducer,s=o.prepare}else i=o;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?ut(e,s):ut(e))}function J3(e){return e._reducerDefinitionType==="asyncThunk"}function ep(e){return e._reducerDefinitionType==="reducerWithPrepare"}function tp({type:e,reducerName:t},n,o,a){if(!a)throw new Error(et(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:f,settled:m,options:h}=n,g=a(e,i,h);o.exposeAction(t,g),s&&o.addCase(g.fulfilled,s),l&&o.addCase(g.pending,l),f&&o.addCase(g.rejected,f),m&&o.addMatcher(g.settled,m),o.exposeCaseReducer(t,{fulfilled:s||xo,pending:l||xo,rejected:f||xo,settled:m||xo})}function xo(){}var h2="listener",g2="completed",y2="cancelled",ny=`task-${y2}`,oy=`task-${g2}`,ay=`${h2}-${y2}`,iy=`${h2}-${g2}`;var{assign:b2}=Object;var ti="listenerMiddleware";var rp=b2(ut(`${ti}/add`),{withTypes:()=>rp}),sy=ut(`${ti}/removeAll`),np=b2(ut(`${ti}/remove`),{withTypes:()=>np});function et(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var op=Kn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(n,o,a){this.eventBus.addEventListener(n,o,a)}dispatchEvent(n){return this.eventBus.dispatchEvent(n)}removeEventListener(n,o,a){this.eventBus.removeEventListener(n,o,a)}}}),vo=class extends op(Object){};window.ftReduxStores||(window.ftReduxStores={});var x2=class e extends vo{static get(t){var n;let o=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[o];if(Qn(i))return i;if(a==null)return;let s=m2({...a,reducers:(n=a.reducers)!==null&&n!==void 0?n:{}}),l=f2({reducer:(f,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let h=Zr(s.getInitialState());for(let g of m.keeping)h[g]=(f??h)[g];return h}else if(typeof m.type=="string"&&m.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...m.overwrites};return s.reducer(f,m)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,n,o){super(),this.reduxSlice=t,this.reduxStore=n,this.isFtReduxStore=!0,this.commands=new qn,this.injectInto=(i,s)=>this.reduxSlice.injectInto(i,s),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,m=i[f];return m?(...h)=>{let g=m(...h.map(a));return this.reduxStore.dispatch(g),g}:h=>{let g=f,b=this.getState()[g];pr(b,h)||this.setState({[g]:a(h)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var So=class{static format(t,n,o,a,i){return window.moment?window.moment(t).locale(n).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(t,n,o,a,!!i)}static getMomentDateFormat(t,n,o){return o?"LT":t?n?"lll":"ll":n?"L LT":"L"}static getIntlDateTime(t,n,o,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(n,{dateStyle:o?"medium":"short"}).format(s),f=new Intl.DateTimeFormat(n,{timeStyle:"short"}).format(s);return i?f:a?`${l} ${f}`:l}static getTimezoneAsString(){let t=o=>String(Math.floor(o)).padStart(2,"0"),n=new Date().getTimezoneOffset();return`${n<0?"+":"-"}${t(Math.abs(n)/60)}:${t(Math.abs(n)%60)}`}};var Co=C(P()),ap="ft-app-info",Ht=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ht.eventName="authentication-change";var on=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};on.eventName="ui-locale-changed";var ip={session:(e,t)=>{(0,Co.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>D.dispatchEvent(new Ht(t.payload)),0))}},D=Co.FtReduxStore.get({name:ap,reducers:ip,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var v2=C(P()),Eo=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},Dy=(0,v2.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(D)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>So.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Eo([(0,ri.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Eo([(0,ri.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Eo([Pa({store:D.name,selector:n=>{var o,a;return(a=(o=n.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),Eo([Pa({store:D.name})],t.prototype,"uiLocale",void 0),t});var S2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(S2||(S2={}));var C2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(C2||(C2={}));var E2;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(E2||(E2={}));var A2;(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"})(A2||(A2={}));var L2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(L2||(L2={}));var O2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(O2||(O2={}));var _2;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(_2||(_2={}));var R2;(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"})(R2||(R2={}));var w2;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(w2||(w2={}));var N2;(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"})(N2||(N2={}));var M2;(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"})(M2||(M2={}));var z2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(z2||(z2={}));var k2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(k2||(k2={}));var I2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(I2||(I2={}));var T2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(T2||(T2={}));var P2;(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"})(P2||(P2={}));var D2;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(D2||(D2={}));var U2;(function(e){e.ASC="ASC",e.DESC="DESC"})(U2||(U2={}));var F2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(F2||(F2={}));var $2;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})($2||($2={}));var B2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(B2||(B2={}));var G2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(G2||(G2={}));var H2;(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"})(H2||(H2={}));var W2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(W2||(W2={}));var V2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(V2||(V2={}));var j2;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(j2||(j2={}));var K2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(K2||(K2={}));var Q;(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"})(Q||(Q={}));var Ae;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Ae||(Ae={}));var q2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(q2||(q2={}));var Z2;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Z2||(Z2={}));var Y2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Y2||(Y2={}));var X2;(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"})(X2||(X2={}));var Q2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Q2||(Q2={}));var J2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(J2||(J2={}));var e0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(e0||(e0={}));var t0;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(t0||(t0={}));var r0;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(r0||(r0={}));var n0;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(n0||(n0={}));var o0;(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"})(o0||(o0={}));var a0;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(a0||(a0={}));var sp={[Q.PERSONAL_BOOK_SHARE_USER]:[Q.PERSONAL_BOOK_USER],[Q.HTML_EXPORT_USER]:[Q.PERSONAL_BOOK_USER],[Q.PDF_EXPORT_USER]:[Q.PERSONAL_BOOK_USER],[Q.KHUB_ADMIN]:[Q.CONTENT_PUBLISHER],[Q.ADMIN]:[Q.KHUB_ADMIN,Q.USERS_ADMIN,Q.PORTAL_ADMIN,Q.BEHAVIOR_DATA_USER],[Q.GENERATIVE_AI_EXPORT_USER]:[Q.GENERATIVE_AI_USER]};function i0(e,t){return e===t||(sp[e]??[]).some(n=>i0(n,t))}function s0(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(o=>i0(o,t))}var Ro=C(P());var ni=C(P());var Wt=class e{static get(t){let{baseUrl:n,apiIntegrationIdentifier:o}=D.getState(),a=t??o;if(n&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(n,a,!0)}static await(t){return new Promise(n=>{let o=e.get(t);if(o)n(o);else{let a=D.subscribe(()=>{o=e.get(t),o&&(a(),n(o))})}})}};var br=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Wt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Wt.await()}};var Se=class extends br{constructor(t=!0,n){var o;super(n),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new ni.CacheRegistry,this.cache=t?a.commonCache:new ni.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((n,o)=>0|31*n+o.charCodeAt(0),0))}};var Ao=class extends Se{async listMySearches(){let{session:t}=D.getState();return s0(t,Q.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Lo=class extends Se{async listMyBookmarks(){let t=D.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Oo=class extends Se{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=D.getState().session;return!!t?.sessionAuthenticated}};var _o=class extends Se{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=D.getState().session;return!!t?.sessionAuthenticated}};var cp="ft-user-assets",lp={setAssetCount:(e,t)=>{let{userAssetType:n,count:o}=t.payload.assetCount;e.assetCounts.allAsset[n]=o},clearAssetCount:e=>{Object.values(Ae).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let n=t.payload.mapId;e.assetCounts.bookmarkByMap[n]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:n,mapId:o,asset:a}=t.payload;ai(e,n,[...oi(e,n),a]),c0(e,n,1,o),l0(e,a)},editAsset:(e,t)=>{let{assetType:n,asset:o}=t.payload;ai(e,n,oi(e,n).map(a=>a.id===o.id?o:a)),l0(e,o)},removeAsset:(e,t)=>{let{assetType:n,mapId:o,assetId:a}=t.payload;ai(e,n,oi(e,n).filter(i=>i.id!==a)),c0(e,n,-1,o)}},d0={[Ae.SEARCHES]:"savedSearches",[Ae.BOOKMARKS]:"bookmarks",[Ae.BOOKS]:void 0,[Ae.COLLECTIONS]:void 0},oi=(e,t)=>{var n;let o=d0[t];return o?(n=e[o])!==null&&n!==void 0?n:[]:[]},ai=(e,t,n)=>{let o=d0[t];o&&(e[o]=n)},c0=(e,t,n,o)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+n),t===Ae.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+n)}},l0=(e,t)=>{let n=e.assetLabels.map(a=>a.title),o=t.labels.filter(a=>!n.includes(a)).map(a=>({title:a}));e.assetLabels.push(...o)},de=Ro.FtReduxStore.get({name:cp,reducers:lp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ae).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ii=class{constructor(t=new Oo,n=new _o){this.assetCountsService=t,this.assetLabelsService=n,this.currentSession=D.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Lo,this.savedSearchesService=new Ao,D.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:n}=D.getState();(0,Ro.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,n?.profile)||(this.currentSession=n,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),de.actions.clearAssetCount(),de.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),de.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),de.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();de.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();de.actions.assetLabels(t)}async loadAssetCount(t){let n=await this.assetCountsService.getUserAssetCount(t);n&&de.getState().assetCounts.allAsset[t]!==n.count&&de.actions.setAssetCount({assetCount:n})}async loadBookmarkByMapId(t){let n=await this.assetCountsService.getUserBookmarkCountByMap(t);n&&de.getState().assetCounts.bookmarkByMap[t]!==n.count&&de.actions.setBookmarkCountByMap({count:n.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let n=Object.keys(de.getState().assetCounts.bookmarkByMap).length!==0;t===Ae.BOOKMARKS&&n&&de.actions.clearBookmarkCountByMap(),de.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 n=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;de.actions.bookmarks(n)}}},dp=new ii;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=dp);var si=class{addCommand(t,n=!1){D.commands.add(t,n)}consumeCommand(t){return D.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new si;var Le=C(P());var f0,xr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},fp=Symbol("clearAfterUnitTest"),wo=class extends(0,Le.withEventBus)(Se){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[f0]=()=>{this.defaultMessages={},this.cache=new Le.CacheRegistry,this.listeners={}},this.currentUiLocale=D.getState().uiLocale,D.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=D.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let n=t.name.toLowerCase();this.cache.setFinal(n,t),this.notify(n)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,n){var o;if(t=t.toLowerCase(),n&&Object.keys(n).length>0){let a={...(o=this.defaultMessages[t])!==null&&o!==void 0?o:{},...n};(0,Le.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var n,o;return this.fetchContext(t),(o=(n=this.cache.getNow(t))===null||n===void 0?void 0:n.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(t,n){let o=t.toLowerCase();return this.resolveContext(o)[n]}resolveMessage(t,n,...o){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Le.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(n,...o)}async fetchContext(t){let n=!this.cache.has(t),o;try{o=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),n&&await this.notify(t)}catch(a){!(a instanceof Le.CanceledPromiseError)&&n&&console.error(a)}return o}subscribe(t,n){var o;return t=t.toLowerCase(),this.listeners[t]=(o=this.listeners[t])!==null&&o!==void 0?o:new Set,this.listeners[t].add(n),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(n)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new xr({loadedContexts:t})),this.dispatchEvent(new xr({loadedContexts:t})),await Promise.all(t.map(n=>this.notify(n,!1)))}async notify(t,n=!0){n&&(document.body.dispatchEvent(new xr({loadedContexts:[t]})),this.dispatchEvent(new xr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,Le.delay)(0).then(()=>o()).catch(()=>null)))}};f0=fp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends wo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends wo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var an=window.FluidTopicsI18nService,ci=window.FluidTopicsCustomI18nService;var u0=C(P()),li=class{highlightHtml(t,n,o){(0,u0.highlightHtml)(t,n,o)}};window.FluidTopicsHighlightHtmlService=new li;var p0=C(P());var di=class{isDate(t){var n,o,a,i;return(i=(a=((o=(n=D.getState().metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,n){var o,a,i,s;if(t==null)return"";try{return p0.DateFormatter.format(t,(o=n?.locale)!==null&&o!==void 0?o:D.getState().uiLocale,(a=n?.longFormat)!==null&&a!==void 0?a:!1,(i=n?.withTime)!==null&&i!==void 0?i:!1,(s=n?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new di;var m0=C(P());var sn=class{static get(t,n){var o,a,i,s;let l=D.getState(),{lang:f,region:m}=(i=(a=(o=l.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new m0.SearchPlaceConverter(l.baseUrl,t??20,(s=l.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,n??`${f}-${m}`)}};var fi=class{urlToSearchRequest(t){return sn.get().parse(t)}searchRequestToUrl(t){return sn.get().serialize(t)}};window.FluidTopicsUrlService=new fi;var tt=C(P());var Vt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Vt.eventName="before-location-change";var jt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};jt.eventName="change";var ui=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let n=sessionStorage.getItem(this.itemName(t));return n?JSON.parse(n):void 0}set(t,n){sessionStorage.setItem(this.itemName(t),JSON.stringify(n))}},h0=new ui;var No=class e extends tt.WithEventBus{static build(){return new e(window.history,h0,()=>window.location,!1)}constructor(t,n,o,a){var i,s;super(),this.history=t,this.historyStorage=n,this.windowLocation=o,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,n=!1){let o=n&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,tt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new jt(this.currentItem())),0)}installProxies(){let t=n=>(o,a,[i,s,l])=>{let f=new Vt(new URL(typeof l=="string"?l:(l??this.windowLocation()).href,window.location.origin));this.dispatchEvent(f);let m=n(),h={...m===this.currentIndex?this.currentState:void 0,...i,index:m,href:f.detail.nextLocation.href};o.apply(a,[h,s,h.href]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let n=this.history.length-1;n>=0;n--)t?this.states[n]=this.historyStorage.get(n):setTimeout(()=>this.states[n]=this.historyStorage.get(n),this.history.length-n)}updateCurrentState(t){var n;let o={...this.buildCurrentState(),...t,index:this.currentIndex,title:(n=t?.title)!==null&&n!==void 0?n:this.currentState.title};this.setCurrentState(o)}addBeforeLocationChangeListener(t){this.addEventListener(Vt.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Vt.eventName,t)}addHistoryChangeListener(t){this.addEventListener(jt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(jt.eventName,t)}currentItem(){return(0,tt.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,tt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let n=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return(0,tt.deepCopy)(n.find(o=>t(o)))}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,tt.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 n;let o=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;if(!o)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,n;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(n=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&n!==void 0?n:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,n){var o;if(!this.hasState(t))return!1;let a=n??this.currentState.majorStateId,i=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=No.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var g0=C(j());var y0=g0.css`
|
|
1999
|
+
`;var Yl=["top","right","bottom","left"],Zl=["start","end"],Ra=Yl.reduce((e,t)=>e.concat(t,t+"-"+Zl[0],t+"-"+Zl[1]),[]),Gr=Math.min,ct=Math.max,Hr=Math.round;var Be=e=>({x:e,y:e}),$u={left:"right",right:"left",bottom:"top",top:"bottom"};function Xl(e,t,n){return ct(e,Gr(t,n))}function Fn(e,t){return typeof e=="function"?e(t):e}function Wr(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function wa(e){return e==="x"?"y":"x"}function Na(e){return e==="y"?"height":"width"}function $n(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ma(e){return wa($n(e))}function Ql(e,t,n){n===void 0&&(n=!1);let o=lt(e),a=Ma(e),i=Na(a),s=a==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=_a(s)),[s,_a(s)]}function Jl(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function _a(e){let t=Wr(e);return $u[t]+e.slice(t.length)}function Bu(e){var t,n,o,a;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(a=e.left)!=null?a:0}}function e1(e){return typeof e!="number"?Bu(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){let{x:t,y:n,width:o,height:a}=e;return{width:o,height:a,top:n,left:t,right:t+o,bottom:n+a,x:t,y:n}}function t1(e,t,n){let{reference:o,floating:a}=e,i=$n(t),s=Ma(t),l=Na(s),f=Wr(t),m=i==="y",h=o.x+o.width/2-a.width/2,g=o.y+o.height/2-a.height/2,b=o[l]/2-a[l]/2,x;switch(f){case"top":x={x:h,y:o.y-a.height};break;case"bottom":x={x:h,y:o.y+o.height};break;case"right":x={x:o.x+o.width,y:g};break;case"left":x={x:o.x-a.width,y:g};break;default:x={x:o.x,y:o.y}}let L=lt(t);return L&&(x[s]+=b*(L==="end"?1:-1)*(n&&m?-1:1)),x}async function r1(e,t){var n;t===void 0&&(t={});let{x:o,y:a,platform:i,rects:s,elements:l,strategy:f}=e,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:b=!1,padding:x=0}=Fn(t,e),L=e1(x),O=l[b?g==="floating"?"reference":"floating":g],N=Dt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(O)))==null||n?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:m,rootBoundary:h,strategy:f})),T=g==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),k=await(i.isElement==null?void 0:i.isElement(R))&&await(i.getScale==null?void 0:i.getScale(R))||{x:1,y:1},I=Dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:T,offsetParent:R,strategy:f}):T);return{top:(N.top-I.top+L.top)/k.y,bottom:(I.bottom-N.bottom+L.bottom)/k.y,left:(N.left-I.left+L.left)/k.x,right:(I.right-N.right+L.right)/k.x}}var Gu=50,n1=async(e,t,n)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:r1},f=await(s.isRTL==null?void 0:s.isRTL(t)),m=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:g}=t1(m,o,f),b=o,x=0,L={};for(let _=0;_<i.length;_++){let O=i[_];if(!O)continue;let{name:N,fn:T}=O,{x:R,y:k,data:I,reset:B}=await T({x:h,y:g,initialPlacement:o,placement:b,strategy:a,middlewareData:L,rects:m,platform:l,elements:{reference:e,floating:t}});h=R??h,g=k??g,L[N]={...L[N],...I},B&&x<Gu&&(x++,typeof B=="object"&&(B.placement&&(b=B.placement),B.rects&&(m=B.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):B.rects),{x:h,y:g}=t1(m,b,f)),_=-1)}return{x:h,y:g,placement:b,strategy:a,middlewareData:L}};function Hu(e,t,n){return(e?[...n.filter(a=>lt(a)===e),...n.filter(a=>lt(a)!==e)]:n.filter(a=>Wr(a)===a)).filter(a=>e?lt(a)===e||(t?Jl(a)!==a:!1):!0)}var o1=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:m}=t,{crossAxis:h=!1,alignment:g,allowedPlacements:b=Ra,autoAlignment:x=!0,...L}=Fn(e,t),_=g!==void 0||b===Ra?Hu(g||null,x,b):b,O=((n=s.autoPlacement)==null?void 0:n.index)||0,N=_[O];if(N==null)return{};if(l!==N)return{reset:{placement:_[0]}};let T=await f.detectOverflow(t,L),R=Ql(N,i,await(f.isRTL==null?void 0:f.isRTL(m.floating))),k=[T[Wr(N)],T[R[0]],T[R[1]]],I=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:N,overflows:k}],B=_[O+1];if(B)return{data:{index:O+1,overflows:I},reset:{placement:B}};let $=I.map(Ce=>{let gt=lt(Ce.placement);return[Ce.placement,gt&&h?Ce.overflows.slice(0,2).reduce((j0,K0)=>j0+K0,0):Ce.overflows[0],Ce.overflows]}).sort((Ce,gt)=>Ce[1]-gt[1]),ht=((a=$.filter(Ce=>Ce[2].slice(0,lt(Ce[0])?2:3).every(gt=>gt<=0))[0])==null?void 0:a[0])||$[0][0];return ht!==l?{data:{index:O+1,overflows:I},reset:{placement:ht}}:{}}}};var a1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:T=>{let{x:R,y:k}=T;return{x:R,y:k}}},...m}=Fn(e,t),h={x:n,y:o},g=await i.detectOverflow(t,m),b=$n(a),x=wa(b),L=h[x],_=h[b],O=(T,R)=>Xl(R+g[T==="y"?"top":"left"],R,R-g[T==="y"?"bottom":"right"]);s&&(L=O(x,L)),l&&(_=O(b,_));let N=f.fn({...t,[x]:L,[b]:_});return{...N,data:{x:N.x-n,y:N.y-o,enabled:{[x]:s,[b]:l}}}}}};function Gn(){return typeof window<"u"}function Ft(e){return s1(e)?(e.nodeName||"").toLowerCase():"#document"}function me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xe(e){var t;return(t=(s1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function s1(e){return Gn()?e instanceof Node||e instanceof me(e).Node:!1}function ke(e){return Gn()?e instanceof Element||e instanceof me(e).Element:!1}function Qe(e){return Gn()?e instanceof HTMLElement||e instanceof me(e).HTMLElement:!1}function i1(e){return!Gn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof me(e).ShadowRoot}function Vr(e){let{overflow:t,overflowX:n,overflowY:o,display:a}=Ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&a!=="inline"&&a!=="contents"}function c1(e){return/^(table|td|th)$/.test(Ft(e))}function jr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Wu=/transform|translate|scale|rotate|perspective|filter/,Vu=/paint|layout|strict|content/,Ut=e=>!!e&&e!=="none",za;function dr(e){let t=ke(e)?Ie(e):e;return Ut(t.transform)||Ut(t.translate)||Ut(t.scale)||Ut(t.rotate)||Ut(t.perspective)||!Hn()&&(Ut(t.backdropFilter)||Ut(t.filter))||Wu.test(t.willChange||"")||Vu.test(t.contain||"")}function l1(e){let t=dt(e);for(;Qe(t)&&!fr(t);){if(dr(t))return t;if(jr(t))return null;t=dt(t)}return null}function Hn(){return za==null&&(za=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),za}function fr(e){return/^(html|body|#document)$/.test(Ft(e))}function Ie(e){return me(e).getComputedStyle(e)}function Kr(e){return ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dt(e){if(Ft(e)==="html")return e;let t=e.assignedSlot||e.parentNode||i1(e)&&e.host||Xe(e);return i1(t)?t.host:t}function d1(e){let t=dt(e);return fr(t)?(e.ownerDocument||e).body:Qe(t)&&Vr(t)?t:d1(t)}function Bn(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);let a=d1(e),i=a===((o=e.ownerDocument)==null?void 0:o.body),s=me(a);if(i){let l=Wn(s);return t.concat(s,s.visualViewport||[],Vr(a)?a:[],l&&n?Bn(l):[])}else return t.concat(a,Bn(a,[],n))}function Wn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function p1(e){let t=Ie(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,a=Qe(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:o,l=Hr(n)!==i||Hr(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function m1(e){return ke(e)?e:e.contextElement}function ur(e){let t=m1(e);if(!Qe(t))return Be(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:i}=p1(t),s=(i?Hr(n.width):n.width)/o,l=(i?Hr(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var ju=Be(0);function h1(e){let t=me(e);return!Hn()||!t.visualViewport?ju:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ku(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===me(e)}function qr(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),i=m1(e),s=Be(1);t&&(o?ke(o)&&(s=ur(o)):s=ur(e));let l=Ku(i,n,o)?h1(i):Be(0),f=(a.left+l.x)/s.x,m=(a.top+l.y)/s.y,h=a.width/s.x,g=a.height/s.y;if(i&&o){let b=me(i),x=ke(o)?me(o):o,L=b,_=Wn(L);for(;_&&x!==L;){let O=ur(_),N=_.getBoundingClientRect(),T=Ie(_),R=N.left+(_.clientLeft+parseFloat(T.paddingLeft))*O.x,k=N.top+(_.clientTop+parseFloat(T.paddingTop))*O.y;f*=O.x,m*=O.y,h*=O.x,g*=O.y,f+=R,m+=k,L=me(_),_=Wn(L)}}return Dt({width:h,height:g,x:f,y:m})}function Vn(e,t){let n=Kr(e).scrollLeft;return t?t.left+n:qr(Xe(e)).left+n}function g1(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Vn(e,n),a=n.top+t.scrollTop;return{x:o,y:a}}function qu(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e,i=a==="fixed",s=Xe(o),l=t?jr(t.floating):!1;if(o===s||l&&i)return n;let f={scrollLeft:0,scrollTop:0},m=Be(1),h=Be(0),g=Qe(o);if((g||!i)&&((Ft(o)!=="body"||Vr(s))&&(f=Kr(o)),g)){let x=qr(o);m=ur(o),h.x=x.x+o.clientLeft,h.y=x.y+o.clientTop}let b=s&&!g&&!i?g1(s,f):Be(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-f.scrollLeft*m.x+h.x+b.x,y:n.y*m.y-f.scrollTop*m.y+h.y+b.y}}function Zu(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Yu(e){let t=Kr(e),n=e.ownerDocument.body,o=ct(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=ct(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),i=-t.scrollLeft+Vn(e),s=-t.scrollTop;return Ie(n).direction==="rtl"&&(i+=ct(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}var Xu=25;function Qu(e,t,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",a=me(e),i=Xe(e),s=a.visualViewport,l=i.clientWidth,f=i.clientHeight,m=0,h=0;if(s){let b=!Hn()||t==="fixed";o?b||(m=-s.offsetLeft,h=-s.offsetTop):(l=s.width,f=s.height,b&&(m=s.offsetLeft,h=s.offsetTop))}if(Vn(i)<=0){let b=i.ownerDocument,x=b.body,L=getComputedStyle(x),_=b.compatMode==="CSS1Compat"&&parseFloat(L.marginLeft)+parseFloat(L.marginRight)||0,O=Math.abs(i.clientWidth-x.clientWidth-_),N=getComputedStyle(i).scrollbarGutter==="stable both-edges"?O/2:O;N<=Xu&&(l-=N)}return{width:l,height:f,x:m,y:h}}function Ju(e,t){let n=qr(e,!0,t==="fixed"),o=n.top+e.clientTop,a=n.left+e.clientLeft,i=ur(e),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,m=o*i.y;return{width:s,height:l,x:f,y:m}}function f1(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Qu(e,n,t);else if(t==="document")o=Yu(Xe(e));else if(ke(t))o=Ju(t,n);else{let a=h1(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Dt(o)}function e3(e,t){let n=t.get(e);if(n)return n;let o=Bn(e,[],!1).filter(l=>ke(l)&&Ft(l)!=="body"),a=null,i=Ie(e).position==="fixed",s=i?dt(e):e;for(;ke(s)&&!fr(s);){let l=Ie(s),f=dr(s),m=a?a.position:i?"fixed":"";!f&&(m==="fixed"||m==="absolute"&&l.position==="static")?o=o.filter(g=>g!==s):a=l,s=dt(s)}return t.set(e,o),o}function t3(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e,s=[...n==="clippingAncestors"?jr(t)?[]:e3(t,this._c):[].concat(n),o],l=f1(t,s[0],a),f=l.top,m=l.right,h=l.bottom,g=l.left;for(let b=1;b<s.length;b++){let x=f1(t,s[b],a);f=ct(x.top,f),m=Gr(x.right,m),h=Gr(x.bottom,h),g=ct(x.left,g)}return{width:m-g,height:h-f,x:g,y:f}}function r3(e){let{width:t,height:n}=p1(e);return{width:t,height:n}}function n3(e,t,n){let o=Qe(t),a=Xe(t),i=n==="fixed",s=qr(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=Be(0);if((o||!i)&&((Ft(t)!=="body"||Vr(a))&&(l=Kr(t)),o)){let b=qr(t,!0,i,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}!o&&a&&(f.x=Vn(a));let m=a&&!o&&!i?g1(a,l):Be(0),h=s.left+l.scrollLeft-f.x-m.x,g=s.top+l.scrollTop-f.y-m.y;return{x:h,y:g,width:s.width,height:s.height}}function ka(e){return Ie(e).position==="static"}function u1(e,t){if(!Qe(e)||Ie(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Xe(e)===n&&(n=n.ownerDocument.body),n}function y1(e,t){let n=me(e);if(jr(e))return n;if(!Qe(e)){let a=dt(e);for(;a&&!fr(a);){if(ke(a)&&!ka(a))return a;a=dt(a)}return n}let o=u1(e,t);for(;o&&c1(o)&&ka(o);)o=u1(o,t);return o&&fr(o)&&ka(o)&&!dr(o)?n:o||l1(e)||n}var o3=async function(e){let t=this.getOffsetParent||y1,n=this.getDimensions,o=await n(e.floating);return{reference:n3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function a3(e){return Ie(e).direction==="rtl"}var jn={convertOffsetParentRelativeRectToViewportRelativeRect:qu,getDocumentElement:Xe,getClippingRect:t3,getOffsetParent:y1,getElementRects:o3,getClientRects:Zu,getDimensions:r3,getScale:ur,isElement:ke,isRTL:a3};var b1=o1,x1=a1;var v1=(e,t,n)=>{let o=new Map,a=n??{},i={...jn,...a.platform,_c:o};return n1(e,t,{...a,platform:i})};function S1(e){return i3(e)}function Ia(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function i3(e){for(let t=e;t;t=Ia(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Ia(e);t;t=Ia(t)){if(!(t instanceof Element))continue;let n=getComputedStyle(t);if(n.display!=="contents"&&(n.position!=="static"||dr(n)||t.tagName==="BODY"))return t}return null}async function C1(e,t,n){let o;return typeof n=="object"?o=n:o={placement:n},v1(e,t,{strategy:o.strategy,platform:{...jn,getOffsetParent:a=>jn.getOffsetParent(a,S1)},middleware:[x1({crossAxis:!0}),b1({allowedPlacements:[o.placement]})]})}var Sr=C(P());var ri=C(oe());var E1=C(oe(),1);var Ta=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function A1(e,t){return(0,E1.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return Zr(e);try{return JSON.parse(n)}catch{return Zr(e)}},toAttribute:n=>JSON.stringify(n)},hasChanged:Yr,...t??{}})}function s3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!pr(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!pr(o[1],t.get(o[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[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(n=i.length,n!==a(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){let s=i[o];if(!pr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pr(e,t){try{return s3(e,t)}catch{return!1}}function Yr(e,t){return!pr(e,t)}function Zr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Kn(e,t){let n=o=>o[e]===!0;return o=>{if(n(o))return o;let a=t(o);return a[e]=!0,a}}var L1=C(oe(),1);var Pa=e=>{let t=e??{};return(n,o)=>{var a;let i={hasChanged:Yr,attribute:!1,...t};(0,L1.property)(i)(n,o);let s=n.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[o]),store:t.store})}};var qn=class{constructor(){this.queue=[]}add(t,n=!1){n&&this.clear(t.type),this.queue.push(t)}consume(t){let n=this.queue.find(o=>o.type===t);return n&&(this.queue=this.queue.filter(o=>o!==n)),n}clear(t){typeof t=="string"?this.queue=this.queue.filter(n=>n.type!==t):this.queue=this.queue.filter(n=>!t.test(n.type))}};var $t=C(oe(),1);var Zn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,n){return this.callbacks=[t],this.debounce(n)}queue(t,n){return this.callbacks.push(t),this.debounce(n)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((n,o)=>{this.resolvePromise=n,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,n;let o=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(n=this.resolvePromise)!==null&&n!==void 0?n:(()=>null);this.clearPromise();for(let s of o)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 _1=C(j(),1);var Yn=globalThis,c3=Yn.ShadowRoot&&(Yn.ShadyCSS===void 0||Yn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var O1=(e,t)=>{if(c3)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(let n of t){let o=document.createElement("style"),a=Yn.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=n.cssText,e.appendChild(o)}};var Xn=class extends _1.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let n={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(n);return O1(o,t.elementStyles),o}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([n,o])=>this.defineScopedElement(n,o))}static defineScopedElement(t,n){Ta(t)(n),this.canDefineScopedElement(t)&&this.registry.define(t,n)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,n){this.scopedRegistryConstructor.defineScopedElement(t,n)}};function R1(e,t,...n){var o;let a=e.querySelector(t);for(let i of n)a=(o=a?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return a}var hr=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},z1,w1=Symbol("constructorPrototype"),N1=Symbol("constructorName"),k1=Symbol("exportpartsDebouncer"),M1=Symbol("dynamicDependenciesLoaded"),mr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};mr.eventName="exportparts-updated";var Ge=class extends Xn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[z1]=new Zn(5),this.scheduleExportpartsUpdate=()=>{var t,n,o;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(o=(n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)!==null&&o!==void 0&&o)&&this[k1].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[N1]=this.constructor.name,this[w1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[N1]&&Object.setPrototypeOf(this,this[w1])}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(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let n=this.constructor;n[M1]||(n[M1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(mr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(mr.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 mr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:n,selector:o,shadowPath:a}=this.elementToFocus;if(o!=null){let i=[...a??[],o];n=R1(this.shadowRoot,...i)}n?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||n?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var n,o,a;if(((o=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).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 n,o,a,i,s,l;let f=b=>b!=null&&b.trim().length>0,m=t.filter(f).map(b=>b.trim());if(m.length===0){this.exportparts=void 0;return}let h=new Set;for(let b of(o=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let x=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],L=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],_=[...x,...L].filter(f).map(O=>O.trim());for(let O of _)h.add(O)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(b=>m.map(x=>`${b}:${x}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};z1=k1;hr([(0,$t.property)()],Ge.prototype,"exportpartsPrefix",void 0);hr([A1([])],Ge.prototype,"exportpartsPrefixes",void 0);hr([(0,$t.property)({reflect:!0})],Ge.prototype,"exportparts",void 0);hr([(0,$t.property)()],Ge.prototype,"customStylesheet",void 0);hr([(0,$t.property)()],Ge.prototype,"elementToFocus",void 0);hr([(0,$t.state)()],Ge.prototype,"useAdoptedStyleSheets",void 0);function Qn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Xr=Symbol("internalReduxEventsUnsubscribers"),ft=Symbol("internalStoresUnsubscribers"),Bt=Symbol("internalStores"),l3=Kn(Symbol("withRedux"),function(e){var t,n,o;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[n]=new Map,this[o]=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[Bt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Bt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Bt].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Bt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Bt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Bt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let m=this.getStore(s.store);m&&(s.store?this[ft].has(s.store):this[ft].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var f;this[ft].set(s,l.subscribe(()=>this.updateFromStores())),this[Xr].set(s,[]),Qn(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((m,h)=>{if(typeof this[h]=="function"&&(!m.store||l.name===m.store)){let g=b=>this[h](b);l.addEventListener(m.eventName,g),this[Xr].get(s).push(()=>l.removeEventListener(m.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ft].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[ft].has(s)&&this[ft].get(s)(),this[ft].delete(s),(l=this[Xr].get(s))===null||l===void 0||l.forEach(f=>f()),this[Xr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ft,n=Bt,o=Xr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),I1=class extends l3(Ge){};function ne(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 d3=typeof Symbol=="function"&&Symbol.observable||"@@observable",T1=d3,Da=()=>Math.random().toString(36).substring(7).split("").join("."),f3={INIT:`@@redux/INIT${Da()}`,REPLACE:`@@redux/REPLACE${Da()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Da()}`},Jn=f3;function eo(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ua(e,t,n){if(typeof e!="function")throw new Error(ne(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ne(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ne(1));return n(Ua)(e,t)}let o=e,a=t,i=new Map,s=i,l=0,f=!1;function m(){s===i&&(s=new Map,i.forEach((O,N)=>{s.set(N,O)}))}function h(){if(f)throw new Error(ne(3));return a}function g(O){if(typeof O!="function")throw new Error(ne(4));if(f)throw new Error(ne(5));let N=!0;m();let T=l++;return s.set(T,O),function(){if(N){if(f)throw new Error(ne(6));N=!1,m(),s.delete(T),i=null}}}function b(O){if(!eo(O))throw new Error(ne(7));if(typeof O.type>"u")throw new Error(ne(8));if(typeof O.type!="string")throw new Error(ne(17));if(f)throw new Error(ne(9));try{f=!0,a=o(a,O)}finally{f=!1}return(i=s).forEach(T=>{T()}),O}function x(O){if(typeof O!="function")throw new Error(ne(10));o=O,b({type:Jn.REPLACE})}function L(){let O=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(ne(11));function T(){let k=N;k.next&&k.next(h())}return T(),{unsubscribe:O(T)}},[T1](){return this}}}return b({type:Jn.INIT}),{dispatch:b,subscribe:g,getState:h,replaceReducer:x,[T1]:L}}function u3(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:Jn.INIT})>"u")throw new Error(ne(12));if(typeof n(void 0,{type:Jn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ne(13))})}function P1(e){let t=Object.keys(e),n={};for(let s=0;s<t.length;s++){let l=t[s];typeof e[l]=="function"&&(n[l]=e[l])}let o=Object.keys(n),a,i;try{u3(n)}catch(s){i=s}return function(l={},f){if(i)throw i;let m=!1,h={};for(let g=0;g<o.length;g++){let b=o[g],x=n[b],L=l[b],_=x(L,f);if(typeof _>"u"){let O=f&&f.type;throw new Error(ne(14))}h[b]=_,m=m||_!==L}return m=m||o.length!==Object.keys(l).length,m?h:l}}function Qr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function D1(...e){return t=>(n,o)=>{let a=t(n,o),i=()=>{throw new Error(ne(15))},s={getState:a.getState,dispatch:(f,...m)=>i(f,...m)},l=e.map(f=>f(s));return i=Qr(...l)(a.dispatch),{...a,dispatch:i}}}function U1(e){return eo(e)&&"type"in e&&typeof e.type=="string"}var K1=Symbol.for("immer-nothing"),F1=Symbol.for("immer-draftable"),ie=Symbol.for("immer-state");function Te(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var xe=Object,yr=xe.getPrototypeOf,oo="constructor",fo="prototype",Ga="configurable",ao="enumerable",ro="writable",Jr="value",He=e=>!!e&&!!e[ie];function ve(e){return e?q1(e)||po(e)||!!e[F1]||!!e[oo]?.[F1]||mo(e)||ho(e):!1}var p3=xe[fo][oo].toString(),$1=new WeakMap;function q1(e){if(!e||!Ya(e))return!1;let t=yr(e);if(t===null||t===xe[fo])return!0;let n=xe.hasOwnProperty.call(t,oo)&&t[oo];if(n===Object)return!0;if(!gr(n))return!1;let o=$1.get(n);return o===void 0&&(o=Function.toString.call(n),$1.set(n,o)),o===p3}function uo(e,t,n=!0){rn(e)===0?(n?Reflect.ownKeys(e):xe.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((o,a)=>t(a,o,e))}function rn(e){let t=e[ie];return t?t.type_:po(e)?1:mo(e)?2:ho(e)?3:0}var Fa=(e,t,n=rn(e))=>n===2?e.has(t):xe[fo].hasOwnProperty.call(e,t),Ha=(e,t,n=rn(e))=>n===2?e.get(t):e[t],io=(e,t,n,o=rn(e))=>{o===2?e.set(t,n):o===3?e.add(n):e[t]=n};function m3(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var po=Array.isArray,mo=e=>e instanceof Map,ho=e=>e instanceof Set,Ya=e=>typeof e=="object",gr=e=>typeof e=="function",$a=e=>typeof e=="boolean";function h3(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Je=e=>e.copy_||e.base_;var Xa=e=>e.modified_?e.copy_:e.base_;function Wa(e,t){if(mo(e))return new Map(e);if(ho(e))return new Set(e);if(po(e))return Array[fo].slice.call(e);let n=q1(e);if(t===!0||t==="class_only"&&!n){let o=xe.getOwnPropertyDescriptors(e);delete o[ie];let a=Reflect.ownKeys(o);for(let i=0;i<a.length;i++){let s=a[i],l=o[s];l[ro]===!1&&(l[ro]=!0,l[Ga]=!0),(l.get||l.set)&&(o[s]={[Ga]:!0,[ro]:!0,[ao]:l[ao],[Jr]:e[s]})}return xe.create(yr(e),o)}else{let o=yr(e);if(o!==null&&n)return{...e};let a=xe.create(o);return xe.assign(a,e)}}function Qa(e,t=!1){return go(e)||He(e)||!ve(e)||(rn(e)>1&&xe.defineProperties(e,{set:to,add:to,clear:to,delete:to}),xe.freeze(e),t&&uo(e,(n,o)=>{Qa(o,!0)},!1)),e}function g3(){Te(2)}var to={[Jr]:g3};function go(e){return e===null||!Ya(e)?!0:xe.isFrozen(e)}var so="MapSet",Va="Patches",B1="ArrayMethods",Z1={};function Gt(e){let t=Z1[e];return t||Te(0,e),t}var G1=e=>!!Z1[e];var en,Y1=()=>en,y3=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:G1(so)?Gt(so):void 0,arrayMethodsPlugin_:G1(B1)?Gt(B1):void 0});function H1(e,t){t&&(e.patchPlugin_=Gt(Va),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ja(e){Ka(e),e.drafts_.forEach(b3),e.drafts_=null}function Ka(e){e===en&&(en=e.parent_)}var W1=e=>en=y3(en,e);function b3(e){let t=e[ie];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function V1(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[ie].modified_&&(ja(t),Te(4)),ve(e)&&(e=j1(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[ie].base_,e,t)}else e=j1(t,n);return x3(t,e,!0),ja(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==K1?e:void 0}function j1(e,t){if(go(t))return t;let n=t[ie];if(!n)return co(t,e.handledSet_,e);if(!yo(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:o}=n;if(o)for(;o.length>0;)o.pop()(e);J1(n,e)}return n.copy_}function x3(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Qa(t,n)}function X1(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var yo=(e,t)=>e.scope_===t,v3=[];function Q1(e,t,n,o){let a=Je(e),i=e.type_;if(o!==void 0&&Ha(a,o,i)===t){io(a,o,n,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;uo(a,(f,m)=>{if(He(m)){let h=l.get(m)||[];h.push(f),l.set(m,h)}})}let s=e.draftLocations_.get(t)??v3;for(let l of s)io(a,l,n,i)}function S3(e,t,n){e.callbacks_.push(function(a){let i=t;if(!i||!yo(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=Xa(i);Q1(e,i.draft_??i,s,n),J1(i,a)})}function J1(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:o}=t;if(o){let a=o.getPath(e);a&&o.generatePatches_(e,a,t)}X1(e)}}function C3(e,t,n){let{scope_:o}=e;if(He(n)){let a=n[ie];yo(a,o)&&a.callbacks_.push(function(){no(e);let s=Xa(a);Q1(e,n,s,t)})}else ve(n)&&e.callbacks_.push(function(){let i=Je(e);e.type_===3?i.has(n)&&co(n,o.handledSet_,o):Ha(i,t,e.type_)===n&&o.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&co(Ha(e.copy_,t,e.type_),o.handledSet_,o)})}function co(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||He(e)||t.has(e)||!ve(e)||go(e)||(t.add(e),uo(e,(o,a)=>{if(He(a)){let i=a[ie];if(yo(i,n)){let s=Xa(i);io(e,o,s,e.type_),X1(i)}}else ve(a)&&co(a,t,n)})),e}function E3(e,t){let n=po(e),o={type_:n?1:0,scope_:t?t.scope_:Y1(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=o,i=lo;n&&(a=[o],i=tn);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return o.draft_=l,o.revoke_=s,[l,o]}var lo={get(e,t){if(t===ie)return e;let n=e.scope_.arrayMethodsPlugin_,o=e.type_===1&&typeof t=="string";if(o&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let a=Je(e);if(!Fa(a,t,e.type_))return L3(e,a,t);let i=a[t];if(e.finalized_||!ve(i)||o&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&h3(t))return i;if(i===Ba(e.base_,t)||A3(e,t,i)){no(e);let s=e.type_===1?+t:t,l=Za(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in Je(e)},ownKeys(e){return Reflect.ownKeys(Je(e))},set(e,t,n){let o=e2(Je(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){let a=Ba(Je(e),t),i=a?.[ie];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(m3(n,a)&&(n!==void 0||Fa(e.base_,t,e.type_)))return!0;no(e),qa(e)}return e.copy_[t]===n&&(n!==void 0||Fa(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),C3(e,t,n)),!0},deleteProperty(e,t){return no(e),Ba(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),qa(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Je(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{[ro]:!0,[Ga]:e.type_!==1||t!=="length",[ao]:o[ao],[Jr]:n[t]}},defineProperty(){Te(11)},getPrototypeOf(e){return yr(e.base_)},setPrototypeOf(){Te(12)}},tn={};for(let e in lo){let t=lo[e];tn[e]=function(){let n=arguments;return n[0]=n[0][0],t.apply(this,n)}}tn.deleteProperty=function(e,t){return tn.set.call(this,e,t,void 0)};tn.set=function(e,t,n){return lo.set.call(this,e[0],t,n,e[0])};function Ba(e,t){let n=e[ie];return(n?Je(n):e)[t]}function A3(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!ve(n)||n[ie]?!1:e.baseRefs_.has(n)}function L3(e,t,n){let o=e2(t,n);return o?Jr in o?o[Jr]:o.get?.call(e.draft_):void 0}function e2(e,t){if(!(t in e))return;let n=yr(e);for(;n;){let o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=yr(n)}}function qa(e){e.modified_||(e.modified_=!0,e.parent_&&qa(e.parent_))}function no(e){e.copy_||(e.assigned_=new Map,e.copy_=Wa(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var O3=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,o)=>{if(gr(t)&&!gr(n)){let i=n;n=t;let s=this;return function(f=i,...m){return s.produce(f,h=>n.call(this,h,...m))}}gr(n)||Te(6),o!==void 0&&!gr(o)&&Te(7);let a;if(ve(t)){let i=W1(this),s=Za(i,t,void 0),l=!0;try{a=n(s),l=!1}finally{l?ja(i):Ka(i)}return H1(i,o),V1(a,i)}else if(!t||!Ya(t)){if(a=n(t),a===void 0&&(a=t),a===K1&&(a=void 0),this.autoFreeze_&&Qa(a,!0),o){let i=[],s=[];Gt(Va).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),o(i,s)}return a}else Te(1,t)},this.produceWithPatches=(t,n)=>{if(gr(t))return(s,...l)=>this.produceWithPatches(s,f=>t(f,...l));let o,a;return[this.produce(t,n,(s,l)=>{o=s,a=l}),o,a]},$a(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),$a(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),$a(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ve(e)||Te(8),He(e)&&(e=t2(e));let t=W1(this),n=Za(t,e,void 0);return n[ie].isManual_=!0,Ka(t),n}finishDraft(e,t){let n=e&&e[ie];(!n||!n.isManual_)&&Te(9);let{scope_:o}=n;return H1(o,t),V1(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));let o=Gt(Va).applyPatches_;return He(e)?o(e,t):this.produce(e,a=>o(a,t))}};function Za(e,t,n,o){let[a,i]=mo(t)?Gt(so).proxyMap_(t,n):ho(t)?Gt(so).proxySet_(t,n):E3(t,n);return(n?.scope_??Y1()).drafts_.push(a),i.callbacks_=n?.callbacks_??[],i.key_=o,n&&o!==void 0?S3(n,i,o):i.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:m}=f;i.modified_&&m&&m.generatePatches_(i,[],f)}),a}function t2(e){return He(e)||Te(10,e),r2(e)}function r2(e){if(!ve(e)||go(e))return e;let t=e[ie],n,o=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Wa(e,t.scope_.immer_.useStrictShallowCopy_),o=t.scope_.immer_.shouldUseStrictIteration()}else n=Wa(e,!0);return uo(n,(a,i)=>{io(n,a,r2(i))},o),t&&(t.finalized_=!1),n}var _3=globalThis.Iterator,Kg=typeof _3?.from=="function";var R3=new O3,Ja=R3.produce;function n2(e){return({dispatch:n,getState:o})=>a=>i=>typeof i=="function"?i(n,o,e):a(i)}var o2=n2(),a2=n2;var w3=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Qr:Qr.apply(null,arguments)},ey=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},N3=e=>e&&typeof e.match=="function";function ut(e,t){function n(...o){if(t){let a=t(...o);if(!a)throw new Error(et(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:o[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=o=>U1(o)&&o.type===e,n}var d2=class nn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,nn.prototype)}static get[Symbol.species](){return nn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new nn(...t[0].concat(this)):new nn(...t.concat(this))}};function i2(e){return ve(e)?Ja(e,()=>{}):e}function bo(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function M3(e){return typeof e=="boolean"}var z3=()=>function(t){let{thunk:n=!0,immutableCheck:o=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{},s=new d2;return n&&(M3(n)?s.push(o2):s.push(a2(n.extraArgument))),s},k3="RTK_autoBatch";var s2=e=>t=>{setTimeout(t,e)},I3=(e,t)=>n=>{let o=!1,a=()=>{o||(o=!0,cancelAnimationFrame(i),clearTimeout(s),n())},i=e(a),s=setTimeout(a,t)},T3=(e={type:"raf"})=>t=>(...n)=>{let o=t(...n),a=!0,i=!1,s=!1,l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?I3(window.requestAnimationFrame,100):s2(10):e.type==="callback"?e.queueNotification:s2(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(h=>h()))};return Object.assign({},o,{subscribe(h){let g=()=>a&&h(),b=o.subscribe(g);return l.add(h),()=>{b(),l.delete(h)}},dispatch(h){try{return a=!h?.meta?.[k3],i=!a,i&&(s||(s=!0,f(m))),o.dispatch(h)}finally{a=!0}}})},P3=e=>function(n){let{autoBatch:o=!0}=n??{},a=new d2(e);return o&&a.push(T3(typeof o=="object"?o:void 0)),a};function f2(e){let t=z3(),{reducer:n=void 0,middleware:o,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{},f;if(typeof n=="function")f=n;else if(eo(n))f=P1(n);else throw new Error(et(1));let m;typeof o=="function"?m=o(t):m=t();let h=Qr;a&&(h=w3({trace:!1,...typeof a=="object"&&a}));let g=D1(...m),b=P3(g),x=typeof l=="function"?l(b):b(),L=h(...x);return Ua(f,s,L)}function u2(e){let t={},n=[],o,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(et(28));if(l in t)throw new Error(et(29));return t[l]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return n.push({matcher:i,reducer:s}),a},addDefaultCase(i){return o=i,a}};return e(a),[t,n,o]}function D3(e){return typeof e=="function"}function U3(e,t){let[n,o,a]=u2(t),i;if(D3(e))i=()=>i2(e());else{let l=i2(e);i=()=>l}function s(l=i(),f){let m=[n[f.type],...o.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return m.filter(h=>!!h).length===0&&(m=[a]),m.reduce((h,g)=>{if(g)if(He(h)){let x=g(h,f);return x===void 0?h:x}else{if(ve(h))return Ja(h,b=>g(b,f));{let b=g(h,f);if(b===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return b}}return h},l)}return s.getInitialState=i,s}var F3=(e,t)=>N3(e)?e.match(t):e(t);function $3(...e){return t=>e.some(n=>F3(n,t))}var B3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",G3=(e=21)=>{let t="",n=e;for(;n--;)t+=B3[Math.random()*64|0];return t},H3=["name","message","stack","code"],ei=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},c2=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},W3=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of H3)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},l2="External signal was aborted",V3=(()=>{function e(t,n,o){let a=ut(t+"/fulfilled",(f,m,h,g)=>({payload:f,meta:{...g||{},arg:h,requestId:m,requestStatus:"fulfilled"}})),i=ut(t+"/pending",(f,m,h)=>({payload:void 0,meta:{...h||{},arg:m,requestId:f,requestStatus:"pending"}})),s=ut(t+"/rejected",(f,m,h,g,b)=>({payload:g,error:(o&&o.serializeError||W3)(f||"Rejected"),meta:{...b||{},arg:h,requestId:m,rejectedWithValue:!!g,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function l(f,{signal:m}={}){return(h,g,b)=>{let x=o?.idGenerator?o.idGenerator(f):G3(),L=new AbortController,_,O;function N(R){O=R,L.abort()}m&&(m.aborted?N(l2):m.addEventListener("abort",()=>N(l2),{once:!0}));let T=(async function(){let R;try{let I=o?.condition?.(f,{getState:g,extra:b});if(K3(I)&&(I=await I),I===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let B=new Promise(($,G)=>{_=()=>{G({name:"AbortError",message:O||"Aborted"})},L.signal.addEventListener("abort",_,{once:!0})});h(i(x,f,o?.getPendingMeta?.({requestId:x,arg:f},{getState:g,extra:b}))),R=await Promise.race([B,Promise.resolve(n(f,{dispatch:h,getState:g,extra:b,requestId:x,signal:L.signal,abort:N,rejectWithValue:(($,G)=>new ei($,G)),fulfillWithValue:(($,G)=>new c2($,G))})).then($=>{if($ instanceof ei)throw $;return $ instanceof c2?a($.payload,x,f,$.meta):a($,x,f)})])}catch(I){R=I instanceof ei?s(null,x,f,I.payload,I.meta):s(I,x,f)}finally{_&&L.signal.removeEventListener("abort",_)}return o&&!o.dispatchConditionRejection&&s.match(R)&&R.meta.condition||h(R),R})();return Object.assign(T,{abort:N,requestId:x,arg:f,unwrap(){return T.then(j3)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:a,settled:$3(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function j3(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function K3(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var p2=Symbol.for("rtk-slice-createasyncthunk"),ry={[p2]:V3};function q3(e,t){return`${e}/${t}`}function Z3({creators:e}={}){let t=e?.asyncThunk?.[p2];return function(o){let{name:a,reducerPath:i=a}=o;if(!a)throw new Error(et(11));typeof process<"u";let s=(typeof o.reducers=="function"?o.reducers(X3()):o.reducers)||{},l=Object.keys(s),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(R,k){let I=typeof R=="string"?R:R.type;if(!I)throw new Error(et(12));if(I in f.sliceCaseReducersByType)throw new Error(et(13));return f.sliceCaseReducersByType[I]=k,m},addMatcher(R,k){return f.sliceMatchers.push({matcher:R,reducer:k}),m},exposeAction(R,k){return f.actionCreators[R]=k,m},exposeCaseReducer(R,k){return f.sliceCaseReducersByName[R]=k,m}};l.forEach(R=>{let k=s[R],I={reducerName:R,type:q3(a,R),createNotation:typeof o.reducers=="function"};J3(k)?tp(I,k,m,t):Q3(I,k,m)});function h(){let[R={},k=[],I=void 0]=typeof o.extraReducers=="function"?u2(o.extraReducers):[o.extraReducers],B={...R,...f.sliceCaseReducersByType};return U3(o.initialState,$=>{for(let G in B)$.addCase(G,B[G]);for(let G of f.sliceMatchers)$.addMatcher(G.matcher,G.reducer);for(let G of k)$.addMatcher(G.matcher,G.reducer);I&&$.addDefaultCase(I)})}let g=R=>R,b=new Map,x=new WeakMap,L;function _(R,k){return L||(L=h()),L(R,k)}function O(){return L||(L=h()),L.getInitialState()}function N(R,k=!1){function I($){let G=$[R];return typeof G>"u"&&k&&(G=bo(x,I,O)),G}function B($=g){let G=bo(b,k,()=>new WeakMap);return bo(G,$,()=>{let ht={};for(let[Ce,gt]of Object.entries(o.selectors??{}))ht[Ce]=Y3(gt,$,()=>bo(x,$,O),k);return ht})}return{reducerPath:R,getSelectors:B,get selectors(){return B(I)},selectSlice:I}}let T={name:a,reducer:_,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:O,...N(i),injectInto(R,{reducerPath:k,...I}={}){let B=k??i;return R.inject({reducerPath:B,reducer:_},I),{...T,...N(B,!0)}}};return T}}function Y3(e,t,n,o){function a(i,...s){let l=t(i);return typeof l>"u"&&o&&(l=n()),e(l,...s)}return a.unwrapped=e,a}var m2=Z3();function X3(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Q3({type:e,reducerName:t,createNotation:n},o,a){let i,s;if("reducer"in o){if(n&&!ep(o))throw new Error(et(17));i=o.reducer,s=o.prepare}else i=o;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?ut(e,s):ut(e))}function J3(e){return e._reducerDefinitionType==="asyncThunk"}function ep(e){return e._reducerDefinitionType==="reducerWithPrepare"}function tp({type:e,reducerName:t},n,o,a){if(!a)throw new Error(et(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:f,settled:m,options:h}=n,g=a(e,i,h);o.exposeAction(t,g),s&&o.addCase(g.fulfilled,s),l&&o.addCase(g.pending,l),f&&o.addCase(g.rejected,f),m&&o.addMatcher(g.settled,m),o.exposeCaseReducer(t,{fulfilled:s||xo,pending:l||xo,rejected:f||xo,settled:m||xo})}function xo(){}var h2="listener",g2="completed",y2="cancelled",ny=`task-${y2}`,oy=`task-${g2}`,ay=`${h2}-${y2}`,iy=`${h2}-${g2}`;var{assign:b2}=Object;var ti="listenerMiddleware";var rp=b2(ut(`${ti}/add`),{withTypes:()=>rp}),sy=ut(`${ti}/removeAll`),np=b2(ut(`${ti}/remove`),{withTypes:()=>np});function et(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var op=Kn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(n,o,a){this.eventBus.addEventListener(n,o,a)}dispatchEvent(n){return this.eventBus.dispatchEvent(n)}removeEventListener(n,o,a){this.eventBus.removeEventListener(n,o,a)}}}),vo=class extends op(Object){};window.ftReduxStores||(window.ftReduxStores={});var x2=class e extends vo{static get(t){var n;let o=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[o];if(Qn(i))return i;if(a==null)return;let s=m2({...a,reducers:(n=a.reducers)!==null&&n!==void 0?n:{}}),l=f2({reducer:(f,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let h=Zr(s.getInitialState());for(let g of m.keeping)h[g]=(f??h)[g];return h}else if(typeof m.type=="string"&&m.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...m.overwrites};return s.reducer(f,m)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,n,o){super(),this.reduxSlice=t,this.reduxStore=n,this.isFtReduxStore=!0,this.commands=new qn,this.injectInto=(i,s)=>this.reduxSlice.injectInto(i,s),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,m=i[f];return m?(...h)=>{let g=m(...h.map(a));return this.reduxStore.dispatch(g),g}:h=>{let g=f,b=this.getState()[g];pr(b,h)||this.setState({[g]:a(h)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var So=class{static format(t,n,o,a,i){return window.moment?window.moment(t).locale(n).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(t,n,o,a,!!i)}static getMomentDateFormat(t,n,o){return o?"LT":t?n?"lll":"ll":n?"L LT":"L"}static getIntlDateTime(t,n,o,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(n,{dateStyle:o?"medium":"short"}).format(s),f=new Intl.DateTimeFormat(n,{timeStyle:"short"}).format(s);return i?f:a?`${l} ${f}`:l}static getTimezoneAsString(){let t=o=>String(Math.floor(o)).padStart(2,"0"),n=new Date().getTimezoneOffset();return`${n<0?"+":"-"}${t(Math.abs(n)/60)}:${t(Math.abs(n)%60)}`}};var Co=C(P()),ap="ft-app-info",Ht=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ht.eventName="authentication-change";var on=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};on.eventName="ui-locale-changed";var ip={session:(e,t)=>{(0,Co.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>D.dispatchEvent(new Ht(t.payload)),0))}},D=Co.FtReduxStore.get({name:ap,reducers:ip,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var v2=C(P()),Eo=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},Dy=(0,v2.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(D)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>So.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Eo([(0,ri.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Eo([(0,ri.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Eo([Pa({store:D.name,selector:n=>{var o,a;return(a=(o=n.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),Eo([Pa({store:D.name})],t.prototype,"uiLocale",void 0),t});var S2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(S2||(S2={}));var C2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(C2||(C2={}));var E2;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(E2||(E2={}));var A2;(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"})(A2||(A2={}));var L2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(L2||(L2={}));var O2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(O2||(O2={}));var _2;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(_2||(_2={}));var R2;(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"})(R2||(R2={}));var w2;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(w2||(w2={}));var N2;(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"})(N2||(N2={}));var M2;(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"})(M2||(M2={}));var z2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(z2||(z2={}));var k2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(k2||(k2={}));var I2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(I2||(I2={}));var T2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(T2||(T2={}));var P2;(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"})(P2||(P2={}));var D2;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(D2||(D2={}));var U2;(function(e){e.ASC="ASC",e.DESC="DESC"})(U2||(U2={}));var F2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(F2||(F2={}));var $2;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})($2||($2={}));var B2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(B2||(B2={}));var G2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(G2||(G2={}));var H2;(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"})(H2||(H2={}));var W2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(W2||(W2={}));var V2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(V2||(V2={}));var j2;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(j2||(j2={}));var K2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(K2||(K2={}));var Q;(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"})(Q||(Q={}));var Ae;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Ae||(Ae={}));var q2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(q2||(q2={}));var Z2;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Z2||(Z2={}));var Y2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Y2||(Y2={}));var X2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(X2||(X2={}));var Q2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Q2||(Q2={}));var J2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(J2||(J2={}));var e0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(e0||(e0={}));var t0;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(t0||(t0={}));var r0;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(r0||(r0={}));var n0;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(n0||(n0={}));var o0;(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"})(o0||(o0={}));var a0;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(a0||(a0={}));var sp={[Q.PERSONAL_BOOK_SHARE_USER]:[Q.PERSONAL_BOOK_USER],[Q.HTML_EXPORT_USER]:[Q.PERSONAL_BOOK_USER],[Q.PDF_EXPORT_USER]:[Q.PERSONAL_BOOK_USER],[Q.KHUB_ADMIN]:[Q.CONTENT_PUBLISHER],[Q.ADMIN]:[Q.KHUB_ADMIN,Q.USERS_ADMIN,Q.PORTAL_ADMIN,Q.BEHAVIOR_DATA_USER],[Q.GENERATIVE_AI_EXPORT_USER]:[Q.GENERATIVE_AI_USER]};function i0(e,t){return e===t||(sp[e]??[]).some(n=>i0(n,t))}function s0(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(o=>i0(o,t))}var Ro=C(P());var ni=C(P());var Wt=class e{static get(t){let{baseUrl:n,apiIntegrationIdentifier:o}=D.getState(),a=t??o;if(n&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(n,a,!0)}static await(t){return new Promise(n=>{let o=e.get(t);if(o)n(o);else{let a=D.subscribe(()=>{o=e.get(t),o&&(a(),n(o))})}})}};var br=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Wt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Wt.await()}};var Se=class extends br{constructor(t=!0,n){var o;super(n),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new ni.CacheRegistry,this.cache=t?a.commonCache:new ni.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((n,o)=>0|31*n+o.charCodeAt(0),0))}};var Ao=class extends Se{async listMySearches(){let{session:t}=D.getState();return s0(t,Q.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Lo=class extends Se{async listMyBookmarks(){let t=D.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Oo=class extends Se{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=D.getState().session;return!!t?.sessionAuthenticated}};var _o=class extends Se{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=D.getState().session;return!!t?.sessionAuthenticated}};var cp="ft-user-assets",lp={setAssetCount:(e,t)=>{let{userAssetType:n,count:o}=t.payload.assetCount;e.assetCounts.allAsset[n]=o},clearAssetCount:e=>{Object.values(Ae).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let n=t.payload.mapId;e.assetCounts.bookmarkByMap[n]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:n,mapId:o,asset:a}=t.payload;ai(e,n,[...oi(e,n),a]),c0(e,n,1,o),l0(e,a)},editAsset:(e,t)=>{let{assetType:n,asset:o}=t.payload;ai(e,n,oi(e,n).map(a=>a.id===o.id?o:a)),l0(e,o)},removeAsset:(e,t)=>{let{assetType:n,mapId:o,assetId:a}=t.payload;ai(e,n,oi(e,n).filter(i=>i.id!==a)),c0(e,n,-1,o)}},d0={[Ae.SEARCHES]:"savedSearches",[Ae.BOOKMARKS]:"bookmarks",[Ae.BOOKS]:void 0,[Ae.COLLECTIONS]:void 0},oi=(e,t)=>{var n;let o=d0[t];return o?(n=e[o])!==null&&n!==void 0?n:[]:[]},ai=(e,t,n)=>{let o=d0[t];o&&(e[o]=n)},c0=(e,t,n,o)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+n),t===Ae.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+n)}},l0=(e,t)=>{let n=e.assetLabels.map(a=>a.title),o=t.labels.filter(a=>!n.includes(a)).map(a=>({title:a}));e.assetLabels.push(...o)},de=Ro.FtReduxStore.get({name:cp,reducers:lp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ae).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ii=class{constructor(t=new Oo,n=new _o){this.assetCountsService=t,this.assetLabelsService=n,this.currentSession=D.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Lo,this.savedSearchesService=new Ao,D.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:n}=D.getState();(0,Ro.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,n?.profile)||(this.currentSession=n,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),de.actions.clearAssetCount(),de.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),de.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),de.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();de.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();de.actions.assetLabels(t)}async loadAssetCount(t){let n=await this.assetCountsService.getUserAssetCount(t);n&&de.getState().assetCounts.allAsset[t]!==n.count&&de.actions.setAssetCount({assetCount:n})}async loadBookmarkByMapId(t){let n=await this.assetCountsService.getUserBookmarkCountByMap(t);n&&de.getState().assetCounts.bookmarkByMap[t]!==n.count&&de.actions.setBookmarkCountByMap({count:n.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let n=Object.keys(de.getState().assetCounts.bookmarkByMap).length!==0;t===Ae.BOOKMARKS&&n&&de.actions.clearBookmarkCountByMap(),de.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 n=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;de.actions.bookmarks(n)}}},dp=new ii;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=dp);var si=class{addCommand(t,n=!1){D.commands.add(t,n)}consumeCommand(t){return D.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new si;var Le=C(P());var f0,xr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},fp=Symbol("clearAfterUnitTest"),wo=class extends(0,Le.withEventBus)(Se){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[f0]=()=>{this.defaultMessages={},this.cache=new Le.CacheRegistry,this.listeners={}},this.currentUiLocale=D.getState().uiLocale,D.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=D.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let n=t.name.toLowerCase();this.cache.setFinal(n,t),this.notify(n)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,n){var o;if(t=t.toLowerCase(),n&&Object.keys(n).length>0){let a={...(o=this.defaultMessages[t])!==null&&o!==void 0?o:{},...n};(0,Le.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var n,o;return this.fetchContext(t),(o=(n=this.cache.getNow(t))===null||n===void 0?void 0:n.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(t,n){let o=t.toLowerCase();return this.resolveContext(o)[n]}resolveMessage(t,n,...o){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Le.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(n,...o)}async fetchContext(t){let n=!this.cache.has(t),o;try{o=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),n&&await this.notify(t)}catch(a){!(a instanceof Le.CanceledPromiseError)&&n&&console.error(a)}return o}subscribe(t,n){var o;return t=t.toLowerCase(),this.listeners[t]=(o=this.listeners[t])!==null&&o!==void 0?o:new Set,this.listeners[t].add(n),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(n)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new xr({loadedContexts:t})),this.dispatchEvent(new xr({loadedContexts:t})),await Promise.all(t.map(n=>this.notify(n,!1)))}async notify(t,n=!0){n&&(document.body.dispatchEvent(new xr({loadedContexts:[t]})),this.dispatchEvent(new xr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,Le.delay)(0).then(()=>o()).catch(()=>null)))}};f0=fp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends wo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends wo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var an=window.FluidTopicsI18nService,ci=window.FluidTopicsCustomI18nService;var u0=C(P()),li=class{highlightHtml(t,n,o){(0,u0.highlightHtml)(t,n,o)}};window.FluidTopicsHighlightHtmlService=new li;var p0=C(P());var di=class{isDate(t){var n,o,a,i;return(i=(a=((o=(n=D.getState().metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,n){var o,a,i,s;if(t==null)return"";try{return p0.DateFormatter.format(t,(o=n?.locale)!==null&&o!==void 0?o:D.getState().uiLocale,(a=n?.longFormat)!==null&&a!==void 0?a:!1,(i=n?.withTime)!==null&&i!==void 0?i:!1,(s=n?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new di;var m0=C(P());var sn=class{static get(t,n){var o,a,i,s;let l=D.getState(),{lang:f,region:m}=(i=(a=(o=l.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new m0.SearchPlaceConverter(l.baseUrl,t??20,(s=l.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,n??`${f}-${m}`)}};var fi=class{urlToSearchRequest(t){return sn.get().parse(t)}searchRequestToUrl(t){return sn.get().serialize(t)}};window.FluidTopicsUrlService=new fi;var tt=C(P());var Vt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Vt.eventName="before-location-change";var jt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};jt.eventName="change";var ui=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let n=sessionStorage.getItem(this.itemName(t));return n?JSON.parse(n):void 0}set(t,n){sessionStorage.setItem(this.itemName(t),JSON.stringify(n))}},h0=new ui;var No=class e extends tt.WithEventBus{static build(){return new e(window.history,h0,()=>window.location,!1)}constructor(t,n,o,a){var i,s;super(),this.history=t,this.historyStorage=n,this.windowLocation=o,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,n=!1){let o=n&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,tt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new jt(this.currentItem())),0)}installProxies(){let t=n=>(o,a,[i,s,l])=>{let f=new Vt(new URL(typeof l=="string"?l:(l??this.windowLocation()).href,window.location.origin));this.dispatchEvent(f);let m=n(),h={...m===this.currentIndex?this.currentState:void 0,...i,index:m,href:f.detail.nextLocation.href};o.apply(a,[h,s,h.href]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let n=this.history.length-1;n>=0;n--)t?this.states[n]=this.historyStorage.get(n):setTimeout(()=>this.states[n]=this.historyStorage.get(n),this.history.length-n)}updateCurrentState(t){var n;let o={...this.buildCurrentState(),...t,index:this.currentIndex,title:(n=t?.title)!==null&&n!==void 0?n:this.currentState.title};this.setCurrentState(o)}addBeforeLocationChangeListener(t){this.addEventListener(Vt.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Vt.eventName,t)}addHistoryChangeListener(t){this.addEventListener(jt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(jt.eventName,t)}currentItem(){return(0,tt.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,tt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let n=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return(0,tt.deepCopy)(n.find(o=>t(o)))}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,tt.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 n;let o=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;if(!o)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,n;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(n=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&n!==void 0?n:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,n){var o;if(!this.hasState(t))return!1;let a=n??this.currentState.majorStateId,i=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=No.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var g0=C(j());var y0=g0.css`
|
|
2000
2000
|
`;var v0=C(j()),fe=C(oe()),Zt=C(P());var Kt=C(P());function b0(e,t){let{authenticationRequired:n,session:o}=D.getState();return n&&!o?.sessionAuthenticated?Promise.resolve(t):e()}var Mo=class extends br{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var pi=class e extends Kt.FtStateManager{static build(t){return new e(D,t)}constructor(t,n){super(),this.store=t,this.cache=new Kt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Mo,this.cleanSessionDebouncer=new Kt.Debouncer,this.reloadConfiguration=()=>{var o;(o=this.cache)===null||o===void 0||o.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Kt.Debouncer(500),this.apiProvider=n??(()=>Wt.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Ht.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Ht.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let n=await this.apiProvider().getCurrentSession();return n.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},n.idleTimeoutInMillis),n});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 n=await this.cache.get("availableContentLocales",()=>b0(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=n.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,n){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:n}).then(o=>{o.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new on(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)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},x0=pi.build();var qt=class extends Event{constructor(t,n,o,a){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=n,this.callback=o,this.subscribe=a??!1}};var cn=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let n=this.pendingContextRequests.get(t.context);if(n===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:o}=n;for(let{elementRef:a,callbackRef:i}of o){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new qt(t.context,s,l,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let n=t.contextTarget??t.composedPath()[0],o=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(n);i===void 0&&a.callbacks.set(n,i=new WeakSet),i.has(o)||(i.add(o),a.requests.push({elementRef:new WeakRef(n),callbackRef:new WeakRef(o)}))}}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 ee=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},V=class extends Zt.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=x0,this.contextRoot=new cn}render(){return v0.html`
|
|
2001
2001
|
<slot></slot>
|
|
2002
2002
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var n;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>an.addContext(o)),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")&&((n=this.stateManager)===null||n===void 0||n.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};V.elementDefinitions={};V.styles=y0;ee([(0,fe.property)()],V.prototype,"baseUrl",void 0);ee([(0,fe.property)()],V.prototype,"tenantId",void 0);ee([(0,fe.property)()],V.prototype,"apiIntegrationIdentifier",void 0);ee([(0,fe.property)()],V.prototype,"apiIntegrationAppVersion",void 0);ee([(0,fe.property)()],V.prototype,"uiLocale",void 0);ee([(0,Zt.jsonProperty)(null)],V.prototype,"availableUiLocales",void 0);ee([(0,Zt.jsonProperty)(null)],V.prototype,"metadataConfiguration",void 0);ee([(0,fe.property)({type:Boolean})],V.prototype,"editorMode",void 0);ee([(0,fe.property)({type:Boolean})],V.prototype,"noCustom",void 0);ee([(0,fe.property)({type:Boolean})],V.prototype,"openExternalDocumentInNewTab",void 0);ee([(0,fe.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],V.prototype,"noCustomComponent",void 0);ee([(0,fe.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],V.prototype,"noCustomCode",void 0);ee([(0,fe.property)({type:Boolean})],V.prototype,"withManualResources",void 0);ee([(0,fe.property)({type:Boolean})],V.prototype,"navigatorOnline",void 0);ee([(0,fe.property)({type:Boolean})],V.prototype,"forcedOffline",void 0);ee([(0,fe.property)({type:Boolean})],V.prototype,"authenticationRequired",void 0);ee([(0,Zt.jsonProperty)([])],V.prototype,"messageContexts",void 0);ee([(0,Zt.jsonProperty)(void 0)],V.prototype,"session",void 0);var C0=C(P());var S0={"ft-app-context":V};(0,C0.customElements)(S0);var E0=C(oe());var mi=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[n,o]=t.split(".");return{context:n,key:o,custom:n!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},vr=new mi;var mp=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},dn=Symbol("i18nAttributes"),A0=Symbol("i18nListAttributes"),L0=Symbol("i18nProperties"),zo=Symbol("i18nContexts"),ln=Symbol("i18nUnsubs"),O0=(0,Sr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,n;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[n]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?ci:an}i18n(i){let{context:s,key:l,message:f}=i,{custom:m,args:h,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,m);let b=h??(g?g(this):[]);return this.getI18nService(m).resolveMessage(s,l,...b)}return f}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(vr.isI18nKey(i)){let[l,f]=i.split(".");return this.i18n({custom:!0,context:l,key:f,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,f)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,f)=>{var m;return((m=f?.context)===null||m===void 0?void 0:m.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let f=this,m=(h,g,b)=>b?.context&&b.key&&i(h,g,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...h})}:b;(s=this[dn])===null||s===void 0||s.forEach((h,g)=>f[g]=m(h,g,f[g])),(l=this[A0])===null||l===void 0||l.forEach((h,g)=>{var b;return f[g]=(b=f[g])===null||b===void 0?void 0:b.map(x=>m(h,g,x))})}updateI18nProperties(i){var s;(s=this[L0])===null||s===void 0||s.forEach((l,f)=>{i(l,f)&&(this[f]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let f=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[zo].set(f,{isCustomContext:l}),this[ln].has(f)||this[ln].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[zo].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[zo].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[ln].forEach(i=>i()),this[ln].clear()}}return t=zo,n=ln,mp([(0,E0.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),ko=class extends O0(Sr.FtLitElement){},Io=class extends O0(Sr.FtLitElementRedux){};var _0=C(P());var hi=class{fromAttribute(t){if(!t)return[];try{let n=JSON.parse(t);return Array.isArray(n)?n.map(o=>typeof o=="string"?vr.fromAttribute(o):o):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},hp=new hi;var R0=(e,t)=>(n,o)=>{var a;n.constructor.createProperty(o,{type:Object,hasChanged:_0.hasChanged,converter:vr,...t}),n[dn]=(a=n[dn])!==null&&a!==void 0?a:new Map,n[dn].set(o,e??{})};var w0=C(j());var N0=w0.css`
|